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