@@ -14,6 +14,8 @@ public void GenerateSimpleBinding()
14
14
""" ;
15
15
16
16
var result = SourceGenHelpers . Run ( source ) ;
17
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
18
+
17
19
AssertExtensions . AssertNoDiagnostics ( result ) ;
18
20
AssertExtensions . CodeIsEqual (
19
21
$$ """
@@ -39,7 +41,7 @@ internal static partial class GeneratedBindableObjectExtensions
39
41
40
42
{{ BindingCodeWriter . GeneratedCodeAttribute }}
41
43
[InterceptsLocationAttribute(@"Path\To\Program.cs", 3, 7)]
42
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
44
+ public static void SetBinding{{ id }} (
43
45
this BindableObject bindableObject,
44
46
BindableProperty bindableProperty,
45
47
Func<string, int> getter,
@@ -107,6 +109,7 @@ public class B
107
109
""" ;
108
110
109
111
var result = SourceGenHelpers . Run ( source ) ;
112
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
110
113
AssertExtensions . AssertNoDiagnostics ( result ) ;
111
114
AssertExtensions . CodeIsEqual (
112
115
$$ """
@@ -132,7 +135,7 @@ internal static partial class GeneratedBindableObjectExtensions
132
135
133
136
{{ BindingCodeWriter . GeneratedCodeAttribute }}
134
137
[InterceptsLocationAttribute(@"Path\To\Program.cs", 6, 7)]
135
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
138
+ public static void SetBinding{{ id }} (
136
139
this BindableObject bindableObject,
137
140
BindableProperty bindableProperty,
138
141
Func<global::MyNamespace.A?, int> getter,
@@ -209,6 +212,7 @@ public class B
209
212
""" ;
210
213
211
214
var result = SourceGenHelpers . Run ( source ) ;
215
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
212
216
AssertExtensions . AssertNoDiagnostics ( result ) ;
213
217
AssertExtensions . CodeIsEqual (
214
218
$$ """
@@ -234,7 +238,7 @@ internal static partial class GeneratedBindableObjectExtensions
234
238
235
239
{{ BindingCodeWriter . GeneratedCodeAttribute }}
236
240
[InterceptsLocationAttribute(@"Path\To\Program.cs", 7, 7)]
237
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
241
+ public static void SetBinding{{ id }} (
238
242
this BindableObject bindableObject,
239
243
BindableProperty bindableProperty,
240
244
Func<global::MyNamespace.A?, int> getter,
@@ -416,6 +420,7 @@ public class C
416
420
public void GenerateSimpleBindingWhenNullableDisabledAndPropertyNullable ( string source )
417
421
{
418
422
var result = SourceGenHelpers . Run ( source ) ;
423
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
419
424
AssertExtensions . AssertNoDiagnostics ( result ) ;
420
425
AssertExtensions . CodeIsEqual (
421
426
$$ """
@@ -441,7 +446,7 @@ internal static partial class GeneratedBindableObjectExtensions
441
446
442
447
{{ BindingCodeWriter . GeneratedCodeAttribute }}
443
448
[InterceptsLocationAttribute(@"Path\To\Program.cs", 7, 7)]
444
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
449
+ public static void SetBinding{{ id }} (
445
450
this BindableObject bindableObject,
446
451
BindableProperty bindableProperty,
447
452
Func<global::MyNamespace.A?, global::MyNamespace.C?> getter,
@@ -532,6 +537,7 @@ public class D {
532
537
""" ;
533
538
534
539
var result = SourceGenHelpers . Run ( source ) ;
540
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
535
541
AssertExtensions . AssertNoDiagnostics ( result ) ;
536
542
AssertExtensions . CodeIsEqual (
537
543
$$ """
@@ -557,7 +563,7 @@ internal static partial class GeneratedBindableObjectExtensions
557
563
558
564
{{ BindingCodeWriter . GeneratedCodeAttribute }}
559
565
[InterceptsLocationAttribute(@"Path\To\Program.cs", 7, 7)]
560
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
566
+ public static void SetBinding{{ id }} (
561
567
this BindableObject bindableObject,
562
568
BindableProperty bindableProperty,
563
569
Func<global::MyNamespace.A?, global::MyNamespace.D?> getter,
@@ -648,6 +654,7 @@ public class MyPropertyClass
648
654
""" ;
649
655
650
656
var result = SourceGenHelpers . Run ( source ) ;
657
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
651
658
652
659
AssertExtensions . AssertNoDiagnostics ( result ) ;
653
660
AssertExtensions . CodeIsEqual (
@@ -674,7 +681,7 @@ internal static partial class GeneratedBindableObjectExtensions
674
681
675
682
{{ BindingCodeWriter . GeneratedCodeAttribute }}
676
683
[InterceptsLocationAttribute(@"Path\To\Program.cs", 4, 7)]
677
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
684
+ public static void SetBinding{{ id }} (
678
685
this BindableObject bindableObject,
679
686
BindableProperty bindableProperty,
680
687
Func<global::MyNamespace.MySourceClass, global::MyNamespace.MyPropertyClass?> getter,
@@ -770,6 +777,7 @@ public class MyPropertyClass
770
777
""" ;
771
778
772
779
var result = SourceGenHelpers . Run ( source ) ;
780
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
773
781
774
782
AssertExtensions . AssertNoDiagnostics ( result ) ;
775
783
AssertExtensions . CodeIsEqual (
@@ -796,7 +804,7 @@ internal static partial class GeneratedBindableObjectExtensions
796
804
797
805
{{ BindingCodeWriter . GeneratedCodeAttribute }}
798
806
[InterceptsLocationAttribute(@"Path\To\Program.cs", 4, 7)]
799
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
807
+ public static void SetBinding{{ id }} (
800
808
this BindableObject bindableObject,
801
809
BindableProperty bindableProperty,
802
810
Func<global::MyNamespace.MySourceClass, global::MyNamespace.MyPropertyClass> getter,
@@ -879,6 +887,7 @@ public class Wrapper
879
887
""" ;
880
888
881
889
var result = SourceGenHelpers . Run ( source ) ;
890
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
882
891
883
892
AssertExtensions . AssertNoDiagnostics ( result ) ;
884
893
AssertExtensions . CodeIsEqual (
@@ -904,7 +913,7 @@ internal static partial class GeneratedBindableObjectExtensions
904
913
{
905
914
{{ BindingCodeWriter . GeneratedCodeAttribute }}
906
915
[InterceptsLocationAttribute(@"Path\To\Program.cs", 3, 7)]
907
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
916
+ public static void SetBinding{{ id }} (
908
917
this BindableObject bindableObject,
909
918
BindableProperty bindableProperty,
910
919
Func<global::MyNamespace.A, int> getter,
@@ -984,6 +993,7 @@ public class MyPropertyClass
984
993
""" ;
985
994
986
995
var result = SourceGenHelpers . Run ( source ) ;
996
+ var id = Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) ;
987
997
988
998
AssertExtensions . AssertNoDiagnostics ( result ) ;
989
999
AssertExtensions . CodeIsEqual (
@@ -1010,7 +1020,7 @@ internal static partial class GeneratedBindableObjectExtensions
1010
1020
1011
1021
{{ BindingCodeWriter . GeneratedCodeAttribute }}
1012
1022
[InterceptsLocationAttribute(@"Path\To\Program.cs", 6, 7)]
1013
- public static void SetBinding{{ Math . Abs ( result . Binding ! . Location . GetHashCode ( ) ) }} (
1023
+ public static void SetBinding{{ id }} (
1014
1024
this BindableObject bindableObject,
1015
1025
BindableProperty bindableProperty,
1016
1026
Func<global::MyNamespace.MySourceClass, global::MyNamespace.MyPropertyClass?> getter,
0 commit comments