Skip to content

Commit 272eb55

Browse files
authored
Merge pull request #18658 from unoplatform/dev/eb/xaml-trimming
fix: Fix regression in XAML Trimming
2 parents ac3c4f3 + b4e479d commit 272eb55

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/SourceGenerators/Uno.UI.SourceGenerators/BindableTypeProviders/BindableTypeProvidersGenerationTask.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ where field.IsStatic
302302
writer.AppendLineIndented("[global::System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainability\", \"CA1505:AvoidUnmaintainableCode\", Justification = \"Must be ignored even if generated code is checked.\")]");
303303
using (writer.BlockInvariant("internal static global::Uno.UI.DataBinding.IBindableType Build(global::Uno.UI.DataBinding.BindableType parent)"))
304304
{
305-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "global::Uno.UI.DataBinding.IBindableType Build(global::Uno.UI.DataBinding.BindableType)");
305+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "Uno.UI.DataBinding.IBindableType Build(Uno.UI.DataBinding.BindableType)");
306306

307307
writer.AppendLineInvariantIndented(
308308
@"var bindableType = parent ?? new global::Uno.UI.DataBinding.BindableType({0}, typeof({1}));",
@@ -327,7 +327,7 @@ where field.IsStatic
327327
writer.AppendLineIndented(@"bindableType.AddActivator(CreateInstance);");
328328
postWriter.AppendLineIndented($@"private static object CreateInstance() => new {ownerTypeName}();");
329329

330-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "global::System.Object CreateInstance()");
330+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "System.Object CreateInstance()");
331331
}
332332
}
333333

@@ -341,12 +341,12 @@ where field.IsStatic
341341
writer.AppendLineIndented("bindableType.AddIndexer(GetIndexer, SetIndexer);");
342342

343343
postWriter.AppendLineIndented($@"private static object GetIndexer(object instance, string name) => (({ownerTypeName})instance)[name];");
344-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "global::System.Object GetIndexer(global::System.Object, global::System.String)");
344+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "System.Object GetIndexer(System.Object, System.String)");
345345

346346
if (property.SetMethod != null)
347347
{
348348
postWriter.AppendLineIndented($@"private static void SetIndexer(object instance, string name, object value) => (({ownerTypeName})instance)[name] = ({propertyTypeName})value;");
349-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "global::System.Void SetIndexer(global::System.Object, global::System.String, global::System.Object)");
349+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, "System.Void SetIndexer(System.Object,System.String,System.Object)");
350350
}
351351
else
352352
{
@@ -386,8 +386,8 @@ where field.IsStatic
386386
postWriter.AppendLineIndented($@"private static void Set{propertyName}(object instance, object value, global::Microsoft.UI.Xaml.DependencyPropertyValuePrecedences? precedence) => (({ownerTypeName})instance).{propertyName} = ({propertyTypeName})value;");
387387
}
388388

389-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"global::System.Object Get{propertyName}(global::System.Object, global::System.Nullable`1<global::Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
390-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"global::System.Void Set{propertyName}(global::System.Object, global::System.Object, global::System.Nullable`1<global::Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
389+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"System.Object Get{propertyName}(System.Object,System.Nullable`1<Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
390+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"System.Void Set{propertyName}(System.Object,System.Object,System.Nullable`1<Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
391391

392392
}
393393
else if (HasPublicGetter(property))
@@ -396,7 +396,7 @@ where field.IsStatic
396396

397397
postWriter.AppendLineIndented($@"private static object Get{propertyName}(object instance, global::Microsoft.UI.Xaml.DependencyPropertyValuePrecedences? precedence) => (({ownerTypeName})instance).{propertyName};");
398398

399-
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"global::System.Object Get{propertyName}(global::System.Object, global::System.Nullable`1<global::Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
399+
RegisterHintMethod($"MetadataBuilder_{typeInfo.Index:000}", ownerType, $"System.Object Get{propertyName}(System.Object,System.Nullable`1<Microsoft.UI.Xaml.DependencyPropertyValuePrecedences>)");
400400
}
401401
}
402402

0 commit comments

Comments
 (0)