84 references to UsingDeclaration
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (84)
Parsing\DeclarationScopeParsingTests.cs (6)
24UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 71UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 244UsingDeclaration(source, TestOptions.Regular11); 683UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 800UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1352UsingDeclaration(source, TestOptions.Regular11);
Parsing\LambdaReturnTypeParsingTests.cs (2)
5080UsingDeclaration(source, TestOptions.Regular9); 5293UsingDeclaration(source, parseOptions);
Parsing\LocalFunctionParsingTests.cs (6)
1736UsingDeclaration(text, options: TestOptions.Regular7_3); 1739UsingDeclaration(text, options: TestOptions.Regular8); 1742UsingDeclaration(text, options: TestOptions.Regular9); 1851UsingDeclaration(text, options: TestOptions.Regular7_3); 1854UsingDeclaration(text, options: TestOptions.Regular8); 1857UsingDeclaration(text, options: TestOptions.Regular9);
Parsing\MemberDeclarationParsingTests.cs (36)
155UsingDeclaration("class C { }", options: options); 173UsingDeclaration("void M() { }", options: options); 202UsingDeclaration("static int F1 = a, F2 = b;", options: options); 250UsingDeclaration("public ThisClassName(int x) : base(x) { }", options: options); 301UsingDeclaration("public ~ThisClassName() { }", options: options); 328UsingDeclaration("public implicit operator long(int x) => x;", options: options); 371UsingDeclaration("public int operator +(int x, int y) => x + y;", options: options); 430UsingDeclaration("C operator >>>(C x, C y) => x;", options: options); 1054UsingDeclaration("string Property { get; init; }", options: options); 1136UsingDeclaration("string Property { init; set; }", options: options); 1170UsingDeclaration("string Property { set; init; }", options: options); 1202UsingDeclaration("required string Prop { get; }", options: parseOptions); 1229UsingDeclaration("required Prop { get; }", options: parseOptions); 1277UsingDeclaration("required required { get; }", options: parseOptions); 1344UsingDeclaration("required Type required { get; }", options: RequiredMembersOptions); 1371UsingDeclaration("required string Field;", options: parseOptions); 1395UsingDeclaration("required Field;", options: parseOptions); 1440UsingDeclaration("required required;", options: parseOptions); 1483UsingDeclaration("required string M() {}", options: parseOptions); 1510UsingDeclaration("required M() {}", options: parseOptions); 1535UsingDeclaration("required M() {}", options: RequiredMembersOptions); 1559UsingDeclaration("static required C operator+(C c1, C c2) {}", options: parseOptions); 1606UsingDeclaration("static required implicit operator C(S s) {}", options: parseOptions); 2351UsingDeclaration(text, options: options.WithLanguageVersion(version)); 3016UsingDeclaration("public int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 3067UsingDeclaration("public int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 4271UsingDeclaration(text, options: options.WithLanguageVersion(version)); 4904UsingDeclaration("int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 4954UsingDeclaration("int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 6296UsingDeclaration(text, options: options.WithLanguageVersion(version)); 6814UsingDeclaration("implicit I.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 6864UsingDeclaration("explicit I<T>.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 9116UsingDeclaration("int N1::I.M1() => 0;", options: options); 9717UsingDeclaration("C I.operator checked " + op + "(C x) => x;", options: TestOptions.RegularPreview); 9848UsingDeclaration("C I.operator checked " + op + "(C x, C y) => x;", options: TestOptions.RegularPreview); 9949UsingDeclaration(op + " I.operator checked D(C x) => x;", options: TestOptions.RegularPreview);
Parsing\RefFieldParsingTests.cs (7)
24UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 61UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 172UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 230UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 405UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 467UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion)); 653UsingDeclaration(source, TestOptions.Regular.WithLanguageVersion(languageVersion));
Parsing\RefReadonlyTests.cs (27)
501UsingDeclaration(source, TestOptions.Regular11); 504UsingDeclaration(source, TestOptions.Regular12); 544UsingDeclaration(source, TestOptions.Regular11); 547UsingDeclaration(source, TestOptions.Regular12); 588UsingDeclaration(source, TestOptions.Regular11); 591UsingDeclaration(source, TestOptions.Regular12); 631UsingDeclaration(source, TestOptions.Regular11); 634UsingDeclaration(source, TestOptions.Regular12); 675UsingDeclaration(source, TestOptions.Regular11); 678UsingDeclaration(source, TestOptions.Regular12); 719UsingDeclaration(source, TestOptions.Regular11); 722UsingDeclaration(source, TestOptions.Regular12); 764UsingDeclaration(source, TestOptions.Regular11); 767UsingDeclaration(source, TestOptions.Regular12); 808UsingDeclaration(source, TestOptions.Regular11); 811UsingDeclaration(source, TestOptions.Regular12); 852UsingDeclaration(source, TestOptions.Regular11); 855UsingDeclaration(source, TestOptions.Regular12); 896UsingDeclaration(source, TestOptions.Regular11); 899UsingDeclaration(source, TestOptions.Regular12); 1187UsingDeclaration(source, TestOptions.Regular11); 1190UsingDeclaration(source, TestOptions.Regular12); 1230UsingDeclaration(source, TestOptions.Regular11); 1233UsingDeclaration(source, TestOptions.Regular12); 1273UsingDeclaration(source, TestOptions.Regular11); 1276UsingDeclaration(source, TestOptions.Regular12); 1279UsingDeclaration(source, TestOptions.Regular9);