@@ -224,7 +224,7 @@ public static void StaticMethod(TestTypeToTrack staticMethodParameter)
224
224
new PropertyMapperCollection (
225
225
new PropertyMapper ( // Definitely null => unflagged, definitely non-null => flagged, otherwise => maybe.
226
226
"AString" ,
227
- ( PointsToAbstractValue pointsToAbstractValue ) =>
227
+ pointsToAbstractValue =>
228
228
{
229
229
return pointsToAbstractValue . NullState switch
230
230
{
@@ -237,7 +237,7 @@ public static void StaticMethod(TestTypeToTrack staticMethodParameter)
237
237
new HazardousUsageEvaluatorCollection (
238
238
new HazardousUsageEvaluator ( // When TypeToTrack.Method() is invoked, need to evaluate its state.
239
239
"Method" ,
240
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
240
+ ( methodSymbol , abstractValue ) =>
241
241
{
242
242
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
243
243
@@ -253,7 +253,7 @@ public static void StaticMethod(TestTypeToTrack staticMethodParameter)
253
253
"OtherClass" ,
254
254
"OtherMethod" ,
255
255
"t" ,
256
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
256
+ ( methodSymbol , abstractValue ) =>
257
257
{
258
258
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
259
259
@@ -270,7 +270,7 @@ public static void StaticMethod(TestTypeToTrack staticMethodParameter)
270
270
"OtherClass" ,
271
271
"StaticMethod" ,
272
272
"staticMethodParameter" ,
273
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
273
+ ( methodSymbol , abstractValue ) =>
274
274
{
275
275
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
276
276
@@ -399,7 +399,7 @@ void TestMethod()
399
399
new (
400
400
"TestTypeToTrackWithConstructor" ,
401
401
new ConstructorMapper (
402
- ( IMethodSymbol method , IReadOnlyList < PointsToAbstractValue > argumentPointsToAbstractValues ) =>
402
+ ( method , argumentPointsToAbstractValues ) =>
403
403
{
404
404
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
405
405
PropertySetAbstractValueKind kind = PropertySetAbstractValueKind . Unknown ;
@@ -420,7 +420,7 @@ void TestMethod()
420
420
new PropertyMapperCollection (
421
421
new PropertyMapper ( // Definitely null => unflagged, definitely non-null => flagged, otherwise => maybe.
422
422
"AString" ,
423
- ( PointsToAbstractValue pointsToAbstractValue ) =>
423
+ pointsToAbstractValue =>
424
424
{
425
425
return pointsToAbstractValue . NullState switch
426
426
{
@@ -433,7 +433,7 @@ void TestMethod()
433
433
new HazardousUsageEvaluatorCollection (
434
434
new HazardousUsageEvaluator (
435
435
"Method" ,
436
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
436
+ ( methodSymbol , abstractValue ) =>
437
437
{
438
438
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
439
439
@@ -525,14 +525,14 @@ void TestMethod()
525
525
new PropertyMapperCollection (
526
526
new PropertyMapper (
527
527
"AnEnum" ,
528
- ( ValueContentAbstractValue valueContentAbstractValue ) =>
528
+ valueContentAbstractValue =>
529
529
{
530
530
return PropertySetCallbacks . EvaluateLiteralValues ( valueContentAbstractValue , v => v is not null && v . Equals ( 0 ) ) ;
531
531
} ) ) ,
532
532
new HazardousUsageEvaluatorCollection (
533
533
new HazardousUsageEvaluator ( // When TypeToTrack.Method() is invoked, need to evaluate its state.
534
534
"Method" ,
535
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
535
+ ( methodSymbol , abstractValue ) =>
536
536
{
537
537
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
538
538
@@ -586,7 +586,7 @@ void TestMethod()
586
586
new (
587
587
"TestTypeToTrackWithConstructor" ,
588
588
new ConstructorMapper (
589
- ( IMethodSymbol method , IReadOnlyList < ValueContentAbstractValue > argumentValueContentAbstractValues , IReadOnlyList < PointsToAbstractValue > argumentPointsToAbstractValues ) =>
589
+ ( method , argumentValueContentAbstractValues , argumentPointsToAbstractValues ) =>
590
590
{
591
591
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
592
592
@@ -598,14 +598,14 @@ void TestMethod()
598
598
new PropertyMapperCollection (
599
599
new PropertyMapper (
600
600
"AnEnum" ,
601
- ( ValueContentAbstractValue valueContentAbstractValue ) =>
601
+ valueContentAbstractValue =>
602
602
{
603
603
return PropertySetCallbacks . EvaluateLiteralValues ( valueContentAbstractValue , v => v is not null && v . Equals ( 0 ) ) ;
604
604
} ) ) ,
605
605
new HazardousUsageEvaluatorCollection (
606
606
new HazardousUsageEvaluator ( // When TypeToTrack.Method() is invoked, need to evaluate its state.
607
607
"Method" ,
608
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
608
+ ( methodSymbol , abstractValue ) =>
609
609
{
610
610
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
611
611
@@ -663,22 +663,22 @@ void TestMethod()
663
663
new PropertyMapperCollection (
664
664
new PropertyMapper (
665
665
"AString" ,
666
- ( ValueContentAbstractValue valueContentAbstractValue ) =>
666
+ valueContentAbstractValue =>
667
667
{
668
668
return PropertySetCallbacks . EvaluateLiteralValues (
669
669
valueContentAbstractValue ,
670
670
v => ( v as string ) ? . StartsWith ( "T" , StringComparison . Ordinal ) == true ) ;
671
671
} ) ,
672
672
new PropertyMapper (
673
673
"AnEnum" ,
674
- ( ValueContentAbstractValue valueContentAbstractValue ) =>
674
+ valueContentAbstractValue =>
675
675
{
676
676
return PropertySetCallbacks . EvaluateLiteralValues ( valueContentAbstractValue , v => v is not null && v . Equals ( 2 ) ) ;
677
677
} ) ) ,
678
678
new HazardousUsageEvaluatorCollection (
679
679
new HazardousUsageEvaluator (
680
680
"Method" ,
681
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
681
+ ( methodSymbol , abstractValue ) =>
682
682
{
683
683
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
684
684
@@ -823,7 +823,7 @@ void TestMethod()
823
823
new (
824
824
"TestTypeToTrackWithConstructor" ,
825
825
new ConstructorMapper (
826
- ( IMethodSymbol constructorMethodSymbol , IReadOnlyList < PointsToAbstractValue > argumentPointsToAbstractValues ) =>
826
+ ( constructorMethodSymbol , argumentPointsToAbstractValues ) =>
827
827
{
828
828
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
829
829
@@ -845,7 +845,7 @@ void TestMethod()
845
845
new PropertyMapperCollection (
846
846
new PropertyMapper (
847
847
"AnObject" ,
848
- ( PointsToAbstractValue pointsToAbstractValue ) =>
848
+ pointsToAbstractValue =>
849
849
{
850
850
// Better to compare LocationTypeOpt to INamedTypeSymbol, but for this demonstration, just using MetadataName.
851
851
PropertySetAbstractValueKind kind ;
@@ -865,7 +865,7 @@ void TestMethod()
865
865
new HazardousUsageEvaluatorCollection (
866
866
new HazardousUsageEvaluator ( // When TypeToTrack.Method() is invoked, need to evaluate its state.
867
867
"Method" ,
868
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
868
+ ( methodSymbol , abstractValue ) =>
869
869
{
870
870
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
871
871
@@ -946,9 +946,9 @@ void TestMethod()
946
946
new (
947
947
"TestTypeToTrackWithConstructor" ,
948
948
new ConstructorMapper (
949
- ( IMethodSymbol constructorMethodSymbol ,
950
- IReadOnlyList < ValueContentAbstractValue > argumentValueContentAbstractValues ,
951
- IReadOnlyList < PointsToAbstractValue > argumentPointsToAbstractValues ) =>
949
+ ( constructorMethodSymbol ,
950
+ argumentValueContentAbstractValues ,
951
+ argumentPointsToAbstractValues ) =>
952
952
{
953
953
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
954
954
@@ -960,7 +960,7 @@ void TestMethod()
960
960
new PropertyMapperCollection (
961
961
new PropertyMapper (
962
962
"AString" ,
963
- ( ValueContentAbstractValue valueContentAbstractValue ) =>
963
+ valueContentAbstractValue =>
964
964
{
965
965
return PropertySetCallbacks . EvaluateLiteralValues (
966
966
valueContentAbstractValue ,
@@ -969,7 +969,7 @@ void TestMethod()
969
969
new HazardousUsageEvaluatorCollection (
970
970
new HazardousUsageEvaluator ( // When TypeToTrackWithConstructor.Method() is invoked, need to evaluate its state.
971
971
"Method" ,
972
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
972
+ ( methodSymbol , abstractValue ) =>
973
973
{
974
974
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
975
975
@@ -1038,7 +1038,7 @@ TestTypeToTrackWithConstructor GetTestType()
1038
1038
new PropertyMapperCollection (
1039
1039
new PropertyMapper ( // Definitely null => unflagged, definitely non-null => flagged, otherwise => maybe.
1040
1040
"AString" ,
1041
- ( PointsToAbstractValue pointsToAbstractValue ) =>
1041
+ pointsToAbstractValue =>
1042
1042
{
1043
1043
return pointsToAbstractValue . NullState switch
1044
1044
{
@@ -1051,7 +1051,7 @@ TestTypeToTrackWithConstructor GetTestType()
1051
1051
new HazardousUsageEvaluatorCollection (
1052
1052
new HazardousUsageEvaluator (
1053
1053
HazardousUsageEvaluatorKind . Return ,
1054
- ( PropertySetAbstractValue abstractValue ) =>
1054
+ abstractValue =>
1055
1055
{
1056
1056
// With only one property being tracked, this is straightforward.
1057
1057
return abstractValue [ 0 ] switch
@@ -1142,7 +1142,7 @@ object TestMethod()
1142
1142
new PropertyMapperCollection (
1143
1143
new PropertyMapper ( // Definitely null => unflagged, definitely non-null => flagged, otherwise => maybe.
1144
1144
"AString" ,
1145
- ( PointsToAbstractValue pointsToAbstractValue ) =>
1145
+ pointsToAbstractValue =>
1146
1146
{
1147
1147
return pointsToAbstractValue . NullState switch
1148
1148
{
@@ -1155,7 +1155,7 @@ object TestMethod()
1155
1155
propertyIndex : 0 ) , // Both AString and AnObject point to index 0.
1156
1156
new PropertyMapper ( // Definitely null => unflagged, definitely non-null => flagged, otherwise => maybe.
1157
1157
"AnObject" ,
1158
- ( PointsToAbstractValue pointsToAbstractValue ) =>
1158
+ pointsToAbstractValue =>
1159
1159
{
1160
1160
return pointsToAbstractValue . NullState switch
1161
1161
{
@@ -1169,7 +1169,7 @@ object TestMethod()
1169
1169
new HazardousUsageEvaluatorCollection (
1170
1170
new HazardousUsageEvaluator ( // When TypeToTrack.Method() is invoked, need to evaluate its state.
1171
1171
"Method" ,
1172
- ( IMethodSymbol methodSymbol , PropertySetAbstractValue abstractValue ) =>
1172
+ ( methodSymbol , abstractValue ) =>
1173
1173
{
1174
1174
// When doing this for reals, need to examine the method to make sure we're looking at the right method and arguments.
1175
1175
0 commit comments