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)
309
var code =
AddUsingDirectives
("using System;", AddInsideMethod("string s = \"$$"));
331
var code =
AddUsingDirectives
("using System;", AddInsideMethod("string s = \"$$\";"));
355
var code =
AddUsingDirectives
("using System;", AddInsideMethod("char c = '$$"));
376
var source =
AddUsingDirectives
("using System;", code);
391
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", content), @"Attribute");
402
await VerifyItemExistsAsync(
AddUsingDirectives
("using System;", content), @"AttributeUsage");
403
await VerifyItemExistsAsync(
AddUsingDirectives
("using System;", content), @"System");
409
var code =
AddUsingDirectives
("using System;", @"class CL<[A$$]T> {}");
425
var code =
AddUsingDirectives
("using System;", content);
440
var code =
AddUsingDirectives
("using System;", content);
455
var code =
AddUsingDirectives
("using System;", content);
869
var source =
AddUsingDirectives
("using System;", content);
898
var source =
AddUsingDirectives
("using System;", @"[assembly: A.$$");
908
var source =
AddUsingDirectives
("using System;", @"using MyType = $$");
922
var source =
AddUsingDirectives
("using System;", content);
936
var source =
AddUsingDirectives
("using System;", content);
946
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = $$)c"));
956
var source =
AddUsingDirectives
("using System;", @"class CL<$$");
966
var source =
AddUsingDirectives
("using System;", @"class CL<T, $$");
976
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = ($$)c"));
986
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = new $$"));
996
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = new $$ ["));
1006
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = stackalloc $$"));
1016
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = from $$ c"));
1026
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"var t = from c in C join $$ j"));
1036
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"$$ i ="));
1046
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"fixed($$"));
1056
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"foreach($$"));
1066
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"foreach $$"));
1076
var source =
AddUsingDirectives
("using System;", AddInsideMethod(@"try {} catch($$"));
1090
var source =
AddUsingDirectives
("using System;", content);
1104
var source =
AddUsingDirectives
("using System;", content);
1118
var source =
AddUsingDirectives
("using System;", content);
1132
var source =
AddUsingDirectives
("using System;", content);
1146
var source =
AddUsingDirectives
("using System;", content);
1160
var source =
AddUsingDirectives
("using System;", content);
1174
var source =
AddUsingDirectives
("using System;", content);
1188
var source =
AddUsingDirectives
("using System;", content);
1202
var source =
AddUsingDirectives
("using System;", content);
1216
var source =
AddUsingDirectives
("using System;", content);
1230
var source =
AddUsingDirectives
("using System;", content);
1244
var source =
AddUsingDirectives
("using System;", content);
1258
var source =
AddUsingDirectives
("using System;", content);
1272
var source =
AddUsingDirectives
("using System;", content);
1283
var source =
AddUsingDirectives
("using System;", content);
1294
var source =
AddUsingDirectives
("using System;", content);
1305
var source =
AddUsingDirectives
("using System;", content);
1316
var source =
AddUsingDirectives
("using System;", content);
1327
var source =
AddUsingDirectives
("using System;", content);
1338
var source =
AddUsingDirectives
("using System;", content);
1349
var source =
AddUsingDirectives
("using System;", content);
1360
var source =
AddUsingDirectives
("using System;", content);
1371
var source =
AddUsingDirectives
("using System;", content);
1382
var source =
AddUsingDirectives
("using System;", content);
1393
var source =
AddUsingDirectives
("using System;", content);
1404
var source =
AddUsingDirectives
("using System;", content);
1415
var source =
AddUsingDirectives
("using System;", content);
1426
var source =
AddUsingDirectives
("using System;", content);
1437
var source =
AddUsingDirectives
("using System;", content);
1448
var source =
AddUsingDirectives
("using System;", content);
1459
var source =
AddUsingDirectives
("using System;", content);
1470
var source =
AddUsingDirectives
("using System;", content);
1481
var source =
AddUsingDirectives
("using System;", content);
1492
var source =
AddUsingDirectives
("using System;", content);
1503
var source =
AddUsingDirectives
("using System;", content);
1514
var source =
AddUsingDirectives
("using System;", content);
1525
var source =
AddUsingDirectives
("using System;", content);
1536
var source =
AddUsingDirectives
("using System;", content);
1547
var source =
AddUsingDirectives
("using System;", content);
1558
var source =
AddUsingDirectives
("using System;", content);
1569
var source =
AddUsingDirectives
("using System;", content);
1580
var source =
AddUsingDirectives
("using System;", content);
1591
var source =
AddUsingDirectives
("using System;", content);
1602
var source =
AddUsingDirectives
("using System;", content);
1613
var source =
AddUsingDirectives
("using System;", content);
1624
var source =
AddUsingDirectives
("using System;", content);
1635
var source =
AddUsingDirectives
("using System;", content);
1646
var source =
AddUsingDirectives
("using System;", content);
1657
var source =
AddUsingDirectives
("using System;", content);
1668
var source =
AddUsingDirectives
("using System;", content);
1679
var source =
AddUsingDirectives
("using System;", content);
1690
var source =
AddUsingDirectives
("using System;", content);
1701
var source =
AddUsingDirectives
("using System;", content);
1712
var source =
AddUsingDirectives
("using System;", content);
1723
var source =
AddUsingDirectives
("using System;", content);
1734
var source =
AddUsingDirectives
("using System;", content);
1745
var source =
AddUsingDirectives
("using System;", content);
1756
var source =
AddUsingDirectives
("using System;", content);
1767
var source =
AddUsingDirectives
("using System;", content);
1778
var source =
AddUsingDirectives
("using System;", content);
1789
var source =
AddUsingDirectives
("using System;", content);
1800
var source =
AddUsingDirectives
("using System;", content);
1811
var source =
AddUsingDirectives
("using System;", content);
1821
await VerifyItemExistsAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : $$"), @"System");
1827
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : $$"), @"Console");
1847
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : $$"), @"String");
1868
var source =
AddUsingDirectives
("using System;", content);
1878
await VerifyItemExistsAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : A, $$"), @"System");
1884
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : A, $$"), @"Console");
1904
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<T> where T : A, $$"), @"String");
1925
var source =
AddUsingDirectives
("using System;", content);
1936
var source =
AddUsingDirectives
("using System;", content);
1955
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<T> where $$"), @"String");
1969
var source =
AddUsingDirectives
("using System;", content);
1980
var source =
AddUsingDirectives
("using System;", content);
1991
var source =
AddUsingDirectives
("using System;", content);
2002
var 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");
2021
var source =
AddUsingDirectives
("using System;", content);
2032
var source =
AddUsingDirectives
("using System;", content);
2047
var source =
AddUsingDirectives
("using System;", content);
2062
var 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");
2245
await 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");
184
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", content), @"Beep");
189
=> await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<[Console.$$]T> {}"), @"Beep");
200
await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", content), @"Beep");
205
=> await VerifyItemIsAbsentAsync(
AddUsingDirectives
("using System;", @"class CL<Console.$$"), @"Beep");