78 references to UsingStatement
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (78)
Parsing\AnonymousFunctionParsingTests.cs (8)
901UsingStatement(test); 969UsingStatement(test); 1032UsingStatement(test); 1102UsingStatement(test); 1174UsingStatement(test); 1807UsingStatement(test); 2126UsingStatement(test); 2212UsingStatement(test);
Parsing\CollectionExpressionParsingTests.cs (8)
5638UsingStatement("var x = (A<B>)[1];"); 18108UsingStatement("var v = x is Y ? [1, 2, 3] : [1];"); 18192UsingStatement("var v = x is Y ? [] : [1];"); 18253UsingStatement("var v = x is Y ? [];"); 18308UsingStatement("var v = x is Y ? [,];"); 18368UsingStatement("var v = x is Y ? [][];"); 18432UsingStatement("var v = x is Y ? [] == Complex() : [1];"); 18509UsingStatement("var v = x is Y ? [Goo]() => B : [Goo]() => C;");
Parsing\DeclarationExpressionTests.cs (26)
22UsingStatement("M(out int? x);"); 64UsingStatement("if (e is int?) {}"); 98UsingStatement("if (e is int ? true : false) {}"); 141UsingStatement("if (e is int? x) {}"); 183UsingStatement("if (e is int ? x : y) {}"); 227UsingStatement("if (e is int x ? true : false) {}"); 277UsingStatement("ref object x = o1 is string ? ref o2 : ref o3;"); 340UsingStatement("ref object x = ref o1 is string ? ref o2 : ref o3;"); 407UsingStatement("foreach (int _ in e) {}"); 435UsingStatement("foreach (var _ in e) {}"); 463UsingStatement("foreach ((var x, var y) in e) {}"); 520UsingStatement("foreach ((int x, int y) in e) {}"); 577UsingStatement("foreach ((int x, int y) v in e) {}"); 624UsingStatement("foreach ((1, 2) in e) {}"); 667UsingStatement("foreach (var (x, y) in e) {}"); 711UsingStatement("foreach ((int x, var (y, z)) in e) {}"); 779UsingStatement("foreach ((var (x, y), z) in e) {}"); 870UsingStatement("foreach (_ in e) {}"); 936UsingStatement("(1, 2) = e;"); 975UsingStatement("M(out (1, 2));"); 1022UsingStatement("M(out (x, y));"); 1069UsingStatement("M(out (1, 2).Field);"); 1125UsingStatement("M(out (int x, int y));"); 1187UsingStatement("M(out (var x, var y));"); 1248UsingStatement("(x: 1, y: 2) = e;"); 1303UsingStatement("var(1, 2) = e;");
Parsing\DeconstructionTests.cs (6)
2930UsingStatement(@"var (x, y) = e;"); 2970UsingStatement(@"var::var (x, y) = e;"); 3024UsingStatement(@"var.var (x, y) = e;"); 3078UsingStatement(@"var<var> (x, y) = e;"); 3198UsingStatement(@"var* (x, y) = e;"); 3304UsingStatement(@"var?.var (x, y) = e;");
Parsing\ExpressionParsingTests.cs (1)
4840UsingStatement(source);
Parsing\LambdaAttributeParsingTests.cs (5)
3369UsingStatement(source); 3396UsingStatement(source); 3435UsingStatement(source); 3472UsingStatement(source); 3519UsingStatement(source);
Parsing\LambdaParameterParsingTests.cs (1)
5082UsingStatement(@"F(async () => await Task.FromResult(4));");
Parsing\LambdaReturnTypeParsingTests.cs (2)
3058UsingStatement(source); 3098UsingStatement(source);
Parsing\NullableParsingTests.cs (6)
896UsingStatement("switch (e) { case T?[] t: break; }"); 955UsingStatement("switch (e) { case T[]?[] t: break; }"); 1091UsingStatement("(object[]?, A[]?) t;"); 1161UsingStatement("using (A[]? a = b) { }"); 1783UsingStatement("_ = x is Type?;"); 1819UsingStatement("_ = x is Type? t;");
Parsing\StatementParsingTests.cs (9)
3974UsingStatement("switch (a: 0, b: 4) {}"); 4064UsingStatement("_ = new (int, int)? {};"); 4182UsingStatement("int []* p;"); 4220UsingStatement("int?* p;"); 4250UsingStatement("_ = new int? {};"); 5492UsingStatement(""" 5604UsingStatement(""" 5670UsingStatement(""" 5740UsingStatement("""
Parsing\SwitchExpressionParsingTests.cs (1)
2574UsingStatement(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);");