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