46 references to GetSyntax
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenAsyncIteratorTests.cs (2)
8741
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "s");
8807
var s =
GetSyntax
<IdentifierNameSyntax>(tree, "s");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Semantics\CollectionExpressionTests.cs (28)
31565
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M("hi", [null])""");
31569
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, [null])");
31613
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M("hi", [null])""");
31617
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, [null])");
31621
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M((string?)null, null)");
31670
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [null])");
31674
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref maybeNull, [null])");
31769
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M([(string?)null])");
31773
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(["hi"])""");
31777
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(["hi", null])""");
32381
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element])");
32417
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element])");
32449
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32477
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32519
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([(string?)element1, element2])");
32564
var invocation =
GetSyntax
<InvocationExpressionSyntax>(tree, "IdList([element1, element2])");
32630
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [null])");
32634
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [maybeNull])");
32638
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [notNull, ""])""");
32642
var invocation3 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [maybeNull, ""])""");
32646
var invocation4 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref maybeNull, [notNull, maybeNull, ""])""");
32726
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [[null]])");
32730
var invocation1 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M(ref notNull, [[maybeNull]])");
32734
var invocation2 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [[notNull, ""]])""");
32738
var invocation3 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref notNull, [[maybeNull, ""]])""");
32742
var invocation4 =
GetSyntax
<InvocationExpressionSyntax>(tree, """M(ref maybeNull, [[notNull, maybeNull, ""]])""");
33121
var invocation0 =
GetSyntax
<InvocationExpressionSyntax>(tree, "M([Copy(maybeNull, out var maybeNull2), maybeNull2])");
33125
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)");