59 references to GetSyntax
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenAsyncIteratorTests.cs (2)
8747
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "s");
8813
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "s");
CodeGen\CodeGenExprLambdaTests.cs (2)
1849
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "a");
1886
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "a");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Semantics\CollectionExpressionTests.cs (28)
31482
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M("hi", [null])""");
31486
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, [null])");
31530
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M("hi", [null])""");
31534
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, [null])");
31538
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, null)");
31587
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [null])");
31591
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref maybeNull, [null])");
31686
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M([(string?)null])");
31690
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(["hi"])""");
31694
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(["hi", null])""");
32298
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element])");
32334
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element])");
32366
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32394
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32436
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([(string?)element1, element2])");
32481
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32547
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [null])");
32551
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [maybeNull])");
32555
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [notNull, ""])""");
32559
var invocation3 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [maybeNull, ""])""");
32563
var invocation4 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref maybeNull, [notNull, maybeNull, ""])""");
32643
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [[null]])");
32647
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [[maybeNull]])");
32651
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [[notNull, ""]])""");
32655
var invocation3 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [[maybeNull, ""]])""");
32659
var invocation4 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref maybeNull, [[notNull, maybeNull, ""]])""");
33038
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M([Copy(maybeNull, out var maybeNull2), maybeNull2])");
33042
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M([Copy(maybeNull, out var maybeNull2), maybeNull2.ToString()])");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (16)
Semantics\ConstantTests.cs (2)
4081
var xDeclarator =
GetSyntax
<VariableDeclaratorSyntax>(tree, """x = x switch { _ => "" }""");
4102
var xDeclarator =
GetSyntax
<VariableDeclaratorSyntax>(tree, """x = x switch { _ => "" }""");
Semantics\DelegateTypeTests.cs (13)
2356
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C().M");
2779
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "c.M");
2830
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new object().M");
2858
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C<int, long>().M");
2889
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C().M");
2917
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C().M<int>");
2948
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C().M<object?>");
2981
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new C().M<object?>");
3012
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new object().M");
3043
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new object().M<object>");
3078
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "new object().F");
3562
var f1 =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "p.F1");
3569
var f2 =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "p.F2");
Semantics\LocalFunctionTests.cs (1)
10428
var nameof =
GetSyntax
<InvocationExpressionSyntax>(tree, "nameof(p)");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\ConversionTests.cs (11)
453
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
484
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
519
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
555
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
591
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
625
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
660
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
685
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
716
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
742
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");
765
var memberAccess =
GetSyntax
<MemberAccessExpressionSyntax>(tree, "C.Test");