You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/CommunityToolkit.Maui.SourceGenerators.Internal.UnitTests/BindablePropertyAttributeSourceGeneratorTests/CommonUsageTests.cs
+17-33Lines changed: 17 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,7 @@ public partial class {{defaultTestClassName}}
38
38
/// Backing BindableProperty for the <see cref = "Text"/> property.
public partial string Text { get => __initializingText ? field : (string)GetValue(TextProperty); internal set => SetValue(TextProperty, field = value); }
389
+
public partial string Text { get => (string)GetValue(TextProperty); internal set => SetValue(TextProperty, value); }
399
390
}
400
391
""";
401
392
@@ -437,8 +428,7 @@ public partial class {{defaultTestClassName}}
public static readonly global::Microsoft.Maui.Controls.BindableProperty TextProperty = textPropertyKey.BindableProperty;
440
-
bool __initializingText = false;
441
-
public partial string Text { get => __initializingText ? field : (string)GetValue(TextProperty); private protected set => SetValue(textPropertyKey, field = value); }
431
+
public partial string Text { get => (string)GetValue(TextProperty); private protected set => SetValue(textPropertyKey, value); }
442
432
}
443
433
""";
444
434
@@ -479,8 +469,7 @@ public partial class {{defaultTestClassName}}
479
469
/// Backing BindableProperty for the <see cref = "Text"/> property.
public partial string Text { get => __initializingText ? field : (string)GetValue(TextProperty); protected internal set => SetValue(TextProperty, field = value); }
472
+
public partial string Text { get => (string)GetValue(TextProperty); protected internal set => SetValue(TextProperty, value); }
484
473
}
485
474
""";
486
475
@@ -522,8 +511,7 @@ public partial class {{defaultTestClassName}}
public static readonly global::Microsoft.Maui.Controls.BindableProperty TextProperty = textPropertyKey.BindableProperty;
525
-
bool __initializingText = false;
526
-
public partial string Text { get => __initializingText ? field : (string)GetValue(TextProperty); protected set => SetValue(textPropertyKey, field = value); }
514
+
public partial string Text { get => (string)GetValue(TextProperty); protected set => SetValue(textPropertyKey, value); }
527
515
}
528
516
""";
529
517
@@ -565,8 +553,7 @@ public partial class {{defaultTestClassName}}
public static readonly global::Microsoft.Maui.Controls.BindableProperty TextProperty = textPropertyKey.BindableProperty;
568
-
bool __initializingText = false;
569
-
public partial string Text { get => __initializingText ? field : (string)GetValue(TextProperty); private set => SetValue(textPropertyKey, field = value); }
556
+
public partial string Text { get => (string)GetValue(TextProperty); private set => SetValue(textPropertyKey, value); }
570
557
}
571
558
""";
572
559
@@ -608,8 +595,7 @@ public partial class {{defaultTestClassName}}
public partial System.TimeSpan Position { get => __initializingPosition ? field : (System.TimeSpan)GetValue(PositionProperty); set => SetValue(PositionProperty, field = value); }
643
+
public partial System.TimeSpan Position { get => (System.TimeSpan)GetValue(PositionProperty); set => SetValue(PositionProperty, value); }
659
644
660
645
/// <summary>
661
646
/// Backing BindableProperty for the <see cref = "CustomDuration"/> property.
662
647
/// </summary>
663
648
public static readonly global::Microsoft.Maui.Controls.BindableProperty CustomDurationProperty = global::Microsoft.Maui.Controls.BindableProperty.Create("CustomDuration", typeof(System.TimeSpan), typeof({{defaultTestNamespace}}.{{defaultTestClassName}}), new global::System.TimeSpan(900000000), Microsoft.Maui.Controls.BindingMode.OneWay, null, null, null, null, null);
664
-
bool __initializingCustomDuration = false;
665
-
public partial System.TimeSpan CustomDuration { get => __initializingCustomDuration ? field : (System.TimeSpan)GetValue(CustomDurationProperty); set => SetValue(CustomDurationProperty, field = value); }
649
+
public partial System.TimeSpan CustomDuration { get => (System.TimeSpan)GetValue(CustomDurationProperty); set => SetValue(CustomDurationProperty, value); }
0 commit comments