140 references to AddUsingDirectives
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (140)
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (1)
96=> await VerifyBuilderAsync(AddUsingDirectives("using System;", AddInsideMethod(@"Func<int, int, int> f = $$")));
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (134)
309var code = AddUsingDirectives("using System;", AddInsideMethod("string s = \"$$")); 331var code = AddUsingDirectives("using System;", AddInsideMethod("string s = \"$$\";")); 355var code = AddUsingDirectives("using System;", AddInsideMethod("char c = '$$")); 376var source = AddUsingDirectives("using System;", code); 391await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", content), @"Attribute"); 402await VerifyItemExistsAsync(AddUsingDirectives("using System;", content), @"AttributeUsage"); 403await VerifyItemExistsAsync(AddUsingDirectives("using System;", content), @"System"); 409var code = AddUsingDirectives("using System;", @"class CL<[A$$]T> {}"); 425var code = AddUsingDirectives("using System;", content); 440var code = AddUsingDirectives("using System;", content); 455var code = AddUsingDirectives("using System;", content); 869var source = AddUsingDirectives("using System;", content); 898var source = AddUsingDirectives("using System;", @"[assembly: A.$$"); 908var source = AddUsingDirectives("using System;", @"using MyType = $$"); 922var source = AddUsingDirectives("using System;", content); 936var source = AddUsingDirectives("using System;", content); 946var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = $$)c")); 956var source = AddUsingDirectives("using System;", @"class CL<$$"); 966var source = AddUsingDirectives("using System;", @"class CL<T, $$"); 976var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = ($$)c")); 986var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = new $$")); 996var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = new $$ [")); 1006var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = stackalloc $$")); 1016var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = from $$ c")); 1026var source = AddUsingDirectives("using System;", AddInsideMethod(@"var t = from c in C join $$ j")); 1036var source = AddUsingDirectives("using System;", AddInsideMethod(@"$$ i =")); 1046var source = AddUsingDirectives("using System;", AddInsideMethod(@"fixed($$")); 1056var source = AddUsingDirectives("using System;", AddInsideMethod(@"foreach($$")); 1066var source = AddUsingDirectives("using System;", AddInsideMethod(@"foreach $$")); 1076var source = AddUsingDirectives("using System;", AddInsideMethod(@"try {} catch($$")); 1090var source = AddUsingDirectives("using System;", content); 1104var source = AddUsingDirectives("using System;", content); 1118var source = AddUsingDirectives("using System;", content); 1132var source = AddUsingDirectives("using System;", content); 1146var source = AddUsingDirectives("using System;", content); 1160var source = AddUsingDirectives("using System;", content); 1174var source = AddUsingDirectives("using System;", content); 1188var source = AddUsingDirectives("using System;", content); 1202var source = AddUsingDirectives("using System;", content); 1216var source = AddUsingDirectives("using System;", content); 1230var source = AddUsingDirectives("using System;", content); 1244var source = AddUsingDirectives("using System;", content); 1258var source = AddUsingDirectives("using System;", content); 1272var source = AddUsingDirectives("using System;", content); 1283var source = AddUsingDirectives("using System;", content); 1294var source = AddUsingDirectives("using System;", content); 1305var source = AddUsingDirectives("using System;", content); 1316var source = AddUsingDirectives("using System;", content); 1327var source = AddUsingDirectives("using System;", content); 1338var source = AddUsingDirectives("using System;", content); 1349var source = AddUsingDirectives("using System;", content); 1360var source = AddUsingDirectives("using System;", content); 1371var source = AddUsingDirectives("using System;", content); 1382var source = AddUsingDirectives("using System;", content); 1393var source = AddUsingDirectives("using System;", content); 1404var source = AddUsingDirectives("using System;", content); 1415var source = AddUsingDirectives("using System;", content); 1426var source = AddUsingDirectives("using System;", content); 1437var source = AddUsingDirectives("using System;", content); 1448var source = AddUsingDirectives("using System;", content); 1459var source = AddUsingDirectives("using System;", content); 1470var source = AddUsingDirectives("using System;", content); 1481var source = AddUsingDirectives("using System;", content); 1492var source = AddUsingDirectives("using System;", content); 1503var source = AddUsingDirectives("using System;", content); 1514var source = AddUsingDirectives("using System;", content); 1525var source = AddUsingDirectives("using System;", content); 1536var source = AddUsingDirectives("using System;", content); 1547var source = AddUsingDirectives("using System;", content); 1558var source = AddUsingDirectives("using System;", content); 1569var source = AddUsingDirectives("using System;", content); 1580var source = AddUsingDirectives("using System;", content); 1591var source = AddUsingDirectives("using System;", content); 1602var source = AddUsingDirectives("using System;", content); 1613var source = AddUsingDirectives("using System;", content); 1624var source = AddUsingDirectives("using System;", content); 1635var source = AddUsingDirectives("using System;", content); 1646var source = AddUsingDirectives("using System;", content); 1657var source = AddUsingDirectives("using System;", content); 1668var source = AddUsingDirectives("using System;", content); 1679var source = AddUsingDirectives("using System;", content); 1690var source = AddUsingDirectives("using System;", content); 1701var source = AddUsingDirectives("using System;", content); 1712var source = AddUsingDirectives("using System;", content); 1723var source = AddUsingDirectives("using System;", content); 1734var source = AddUsingDirectives("using System;", content); 1745var source = AddUsingDirectives("using System;", content); 1756var source = AddUsingDirectives("using System;", content); 1767var source = AddUsingDirectives("using System;", content); 1778var source = AddUsingDirectives("using System;", content); 1789var source = AddUsingDirectives("using System;", content); 1800var source = AddUsingDirectives("using System;", content); 1811var source = AddUsingDirectives("using System;", content); 1821await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"class CL<T> where T : $$"), @"System"); 1827await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<T> where T : $$"), @"Console"); 1847await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<T> where T : $$"), @"String"); 1868var source = AddUsingDirectives("using System;", content); 1878await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"class CL<T> where T : A, $$"), @"System"); 1884await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<T> where T : A, $$"), @"Console"); 1904await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<T> where T : A, $$"), @"String"); 1925var source = AddUsingDirectives("using System;", content); 1936var source = AddUsingDirectives("using System;", content); 1955await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<T> where $$"), @"String"); 1969var source = AddUsingDirectives("using System;", content); 1980var source = AddUsingDirectives("using System;", content); 1991var source = AddUsingDirectives("using System;", content); 2002var source = AddUsingDirectives("using System;", content); 2011=> await VerifyItemExistsAsync(AddUsingDirectives("using S = System;", AddInsideMethod(@"S.$$")), @"String"); 2015=> await VerifyItemExistsAsync(AddUsingDirectives("using S = System.String;", AddInsideMethod(@"S.$$")), @"Empty"); 2021var source = AddUsingDirectives("using System;", content); 2032var source = AddUsingDirectives("using System;", content); 2047var source = AddUsingDirectives("using System;", content); 2062var source = AddUsingDirectives("using System;", content); 2194=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"class c { void M() { new $$"), "Exception"); 2198=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class c { void M() { goo.$$"), "Equals"); 2202=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class c { void M(int x) { typeof($$"), "x"); 2206=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class c { void M(int x) { default($$"), "x"); 2210=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"public class C { void M(int x) { unsafe { sizeof($$"), "x"); 2214=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"public class Generic<T> { void M(int x) { Generic<$$"), "x"); 2218=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"public class C { void M() { null.$$"), "Equals"); 2222=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { true.$$"), "Equals"); 2226=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { false.$$"), "Equals"); 2230=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { 'c'.$$"), "Equals"); 2234=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { """".$$"), "Equals"); 2238=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { @"""".$$"), "Equals"); 2245await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { 2.$$"), "Equals"); 2250=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"public class C { void M() { (null).$$"), "Equals"); 2254=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { (true).$$"), "Equals"); 2258=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { (false).$$"), "Equals"); 2262=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { ('c').$$"), "Equals"); 2266=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { ("""").$$"), "Equals"); 2270=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { (@"""").$$"), "Equals"); 2274=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { (2).$$"), "Equals"); 2278=> await VerifyItemExistsAsync(AddUsingDirectives("using System;", @"public class C { void M() { (1 + 1).$$"), "Equals");
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (5)
170=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", AddInsideMethod("string s = \"Console.$$")), @"Beep"); 184await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", content), @"Beep"); 189=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<[Console.$$]T> {}"), @"Beep"); 200await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", content), @"Beep"); 205=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;", @"class CL<Console.$$"), @"Beep");