88 references to UsingStatement
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (88)
Parsing\AnonymousFunctionParsingTests.cs (14)
901UsingStatement(test); 969UsingStatement(test); 1032UsingStatement(test); 1102UsingStatement(test); 1174UsingStatement(test); 1338UsingStatement(test, 1415UsingStatement(test, 1614UsingStatement(test, 1718UsingStatement(test, 1807UsingStatement(test); 1906UsingStatement(test, 2036UsingStatement(test, 2138UsingStatement(test); 2224UsingStatement(test);
Parsing\DeclarationExpressionTests.cs (27)
21UsingStatement("M(out int? x);"); 63UsingStatement("if (e is int?) {}"); 97UsingStatement("if (e is int ? true : false) {}"); 140UsingStatement("if (e is int? x) {}", 190UsingStatement("if (e is int x ? true : false) {}"); 240UsingStatement("ref object x = o1 is string ? ref o2 : ref o3;"); 303UsingStatement("ref object x = ref o1 is string ? ref o2 : ref o3;"); 370UsingStatement("foreach (int _ in e) {}"); 398UsingStatement("foreach (var _ in e) {}"); 426UsingStatement("foreach ((var x, var y) in e) {}"); 483UsingStatement("foreach ((int x, int y) in e) {}"); 540UsingStatement("foreach ((int x, int y) v in e) {}"); 587UsingStatement("foreach ((1, 2) in e) {}"); 630UsingStatement("foreach (var (x, y) in e) {}"); 674UsingStatement("foreach ((int x, var (y, z)) in e) {}"); 742UsingStatement("foreach ((var (x, y), z) in e) {}"); 802UsingStatement("foreach (x in e) {}", 833UsingStatement("foreach (_ in e) {}"); 860UsingStatement("foreach (a.b in e) {}", 899UsingStatement("(1, 2) = e;"); 938UsingStatement("M(out (1, 2));"); 985UsingStatement("M(out (x, y));"); 1032UsingStatement("M(out (1, 2).Field);"); 1088UsingStatement("M(out (int x, int y));"); 1150UsingStatement("M(out (var x, var y));"); 1211UsingStatement("(x: 1, y: 2) = e;"); 1266UsingStatement("var(1, 2) = e;");
Parsing\DeconstructionTests.cs (8)
2930UsingStatement(@"var (x, y) = e;"); 2970UsingStatement(@"var::var (x, y) = e;"); 3024UsingStatement(@"var.var (x, y) = e;"); 3078UsingStatement(@"var<var> (x, y) = e;"); 3133UsingStatement(@"var[] (x, y) = e;", 3198UsingStatement(@"var* (x, y) = e;"); 3245UsingStatement(@"var? (x, y) = e;", 3304UsingStatement(@"var?.var (x, y) = e;");
Parsing\ExpressionParsingTests.cs (2)
4840UsingStatement(source); 6358UsingStatement("for (int i = 0; ref; i++) { }",
Parsing\LambdaAttributeParsingTests.cs (5)
3357UsingStatement(source); 3384UsingStatement(source); 3423UsingStatement(source); 3460UsingStatement(source); 3507UsingStatement(source);
Parsing\LambdaParameterParsingTests.cs (1)
4999UsingStatement(@"F(async () => await Task.FromResult(4));");
Parsing\LambdaReturnTypeParsingTests.cs (2)
2985UsingStatement(source); 3025UsingStatement(source);
Parsing\LocalFunctionParsingTests.cs (1)
877UsingStatement(statement,
Parsing\NullableParsingTests.cs (5)
684UsingStatement("switch (e) { case T? t: break; }", 894UsingStatement("switch (e) { case T?[] t: break; }"); 953UsingStatement("switch (e) { case T[]?[] t: break; }"); 1089UsingStatement("(object[]?, A[]?) t;"); 1159UsingStatement("using (A[]? a = b) { }");
Parsing\RefReadonlyTests.cs (1)
472UsingStatement("new ref[];",
Parsing\StatementParsingTests.cs (14)
30UsingStatement("private", 3560UsingStatement(@"{ label: public", 3593UsingStatement("else {}", 3647UsingStatement("{ else {} else {} }", 3751UsingStatement("{ if (a) { } else { } else { } }", 3834UsingStatement("if (a) else {}", 3897UsingStatement("switch 1+2 {}", 3928UsingStatement("switch (a: 0) {}", 3973UsingStatement("switch (a: 0, b: 4) {}"); 4022UsingStatement("switch (1) + (2) {}", 4063UsingStatement("_ = new (int, int)? {};"); 4115UsingStatement("_ = new (int, int) ? (x) : (y);", 4181UsingStatement("int []* p;", 4222UsingStatement("_ = new int? {};");
Parsing\SwitchExpressionParsingTests.cs (3)
287UsingStatement(""" 857UsingStatement(code); 944UsingStatement(code,
Parsing\ValueTupleTests.cs (5)
731UsingStatement("return (i, isValid ? Errors.IsValid : Errors.HasErrors);"); 792UsingStatement("return (isValid ? Errors.IsValid : Errors.HasErrors, i);"); 853UsingStatement("return (i, a < b, c > d);"); 906UsingStatement("return (i, a < b, c > d.x);"); 970UsingStatement("return (i, a < b, c > d && x);");