556 references to HDN_UnusedUsingDirective
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
2692
: ErrorCode.
HDN_UnusedUsingDirective
;
Errors\ErrorFacts.cs (1)
1672
or ErrorCode.
HDN_UnusedUsingDirective
Generated\ErrorFacts.Generated.cs (1)
388
case ErrorCode.
HDN_UnusedUsingDirective
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenAsyncIteratorTests.cs (1)
7869
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Runtime.CompilerServices;").WithLocation(2, 1),
CodeGen\CodeGenAsyncMainTests.cs (2)
248
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(2, 1));
285
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(2, 1));
CodeGen\CodeGenAwaitForeachTests.cs (2)
8791
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N3;").WithLocation(5, 1));
8896
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N2;").WithLocation(5, 1),
CodeGen\CodeGenForEachTests.cs (1)
5193
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N2;").WithLocation(4, 1),
CodeGen\CodeGenOperators.cs (2)
2293
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;").WithLocation(3, 1),
2296
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;").WithLocation(4, 1),
CodeGen\CodeGenTupleTest.cs (2)
5416
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using VT2 = (int, int);").WithLocation(2, 1));
5423
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using VT2 = (int, int);").WithLocation(2, 1));
Perf.cs (1)
36
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using nested;"));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (41)
PDB\PDBUsingTests.cs (41)
1422
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = B::N;").WithLocation(5, 1),
1425
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = A::N;").WithLocation(4, 1),
1428
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Z = global::N;").WithLocation(6, 1));
1569
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
1572
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU1 = System;"),
1575
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT1 = System.Char;"),
1581
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU2 = System.IO;"),
1584
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT2 = System.IO.Directory;"),
1587
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.IO;"),
1593
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT3 = System.Text.StringBuilder;"),
1596
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Text;"),
1599
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU3 = System.Text;"),
1875
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
1878
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU1 = System;"),
1881
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT1 = System.Char;"),
1887
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU3 = System.Threading;"),
1890
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT3 = System.Threading.Thread;"),
1893
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading;"),
1899
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU2 = System.IO;"),
1902
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT2 = System.IO.Directory;"),
1905
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.IO;"),
2054
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
2057
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU1 = System;"),
2060
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT1 = System.Char;"),
2066
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Text;"),
2069
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU3 = System.Text;"),
2072
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT3 = System.Text.StringBuilder;"),
2075
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU2 = System.IO;"),
2081
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT2 = System.IO.Directory;"),
2084
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.IO;"),
2087
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AU4 = System.Threading;"),
2093
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using AT4 = System.Threading.Thread;"),
2096
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading;"),
3038
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = A::E;").WithLocation(5, 1),
3041
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using B;").WithLocation(3, 1),
3044
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = C.D;").WithLocation(4, 1),
3047
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Z = F<int>;").WithLocation(6, 1)
3163
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N.SBad;"),
3166
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NIBad = N.IBad;"),
3169
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using ZBad = N.SBad;"));
3233
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = N.B;"));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (25)
Attributes\AttributeTests.cs (1)
8439
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
Attributes\AttributeTests_WellKnownAttributes.cs (2)
7297
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = A;"),
7300
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = A.B;"));
FirstClassSpanTests.cs (1)
166
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N2;").WithLocation(5, 5)
RefReadonlyParameterTests.cs (5)
276
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Runtime.CompilerServices;").WithLocation(1, 1),
4045
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1, 1),
4086
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1, 1),
4359
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1, 1),
4397
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1, 1),
Semantics\ExtensionTests.cs (8)
11725
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N2;").WithLocation(2, 1),
11822
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1));
18219
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1));
30049
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1));
30133
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1));
30183
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1));
38845
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using extension = int;").WithLocation(1, 1),
38893
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @extension = int;").WithLocation(1, 1));
Semantics\PatternMatchingTests2.cs (1)
1275
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using _ = System.Int32;").WithLocation(1, 1)
Semantics\PrimaryConstructorTests.cs (4)
9880
comp.GetEmitDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
11781
var diagnostics = verifier.Diagnostics.Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
);
20764
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1),
20811
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1),
Semantics\RecordTests.cs (3)
2958
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using record = System.Console;").WithLocation(2, 1),
2975
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @record = System.Console;").WithLocation(2, 1)
24527
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (231)
Semantics\BindingTests.cs (10)
3430
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3462
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3495
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3530
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3562
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3594
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3624
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static MyNamespace.AnyClass.AnyEnum.Val;").WithLocation(2, 1),
3645
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static Test<System.String>;").WithLocation(2, 1),
3665
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A<A<int>[]>.B;").WithLocation(2, 1),
3681
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A<int, string>;").WithLocation(2, 1),
Semantics\DelegateTypeTests.cs (11)
1677
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
1727
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
1777
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
1827
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
1877
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
1927
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
2136
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1),
2191
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1),
2201
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1),
2261
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
2689
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N;").WithLocation(1, 1)
Semantics\FunctionPointerTests.cs (9)
67
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using s = delegate*<void>;").WithLocation(2, 1));
79
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using s = delegate*<void>;").WithLocation(2, 1));
96
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe S = delegate*<void>;").WithLocation(2, 1));
103
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe S = delegate*<void>;").WithLocation(2, 1));
110
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe S = delegate*<void>;").WithLocation(2, 1));
123
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using S = System.Collections.Generic.List<delegate*<void>[]>;").WithLocation(2, 1));
129
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using S = System.Collections.Generic.List<delegate*<void>[]>;").WithLocation(2, 1),
148
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe S = System.Collections.Generic.List<delegate*<void>[]>;").WithLocation(2, 1));
154
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe S = System.Collections.Generic.List<delegate*<void>[]>;").WithLocation(2, 1));
Semantics\GlobalUsingDirectiveTests.cs (157)
887
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
890
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
893
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
896
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
958
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
961
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
964
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1062
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
1112
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
1531
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
1551
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1554
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1557
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1591
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
1611
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1614
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
1928
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
1964
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2074
comp2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2084
comp3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2097
comp4.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2127
comp5.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected1);
2130
comp6.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2140
comp7.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2153
comp8.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected1);
2156
comp9.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2169
comp10.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(
2216
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected);
2219
comp2.GetSemanticModel(comp2.SyntaxTrees[2]).GetDeclarationDiagnostics().Where(d => d.Code is not ((int)ErrorCode.
HDN_UnusedUsingDirective
or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected);
2251
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2265
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2268
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2271
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2274
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2277
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2280
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2283
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2301
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2308
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2338
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2341
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2344
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2396
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2413
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2416
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2419
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2422
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2425
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2428
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2431
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2492
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2509
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2512
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2515
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2518
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2521
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2524
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2527
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
2557
CompileAndVerify(comp2).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2561
CompileAndVerify(comp3).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2571
CompileAndVerify(comp4).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2578
CompileAndVerify(comp5).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2588
CompileAndVerify(comp6).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2598
CompileAndVerify(comp7).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2608
CompileAndVerify(comp8).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2611
CompileAndVerify(comp9).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2635
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2642
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2671
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2674
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2677
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2711
CompileAndVerify(comp2).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2715
CompileAndVerify(comp3).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2725
CompileAndVerify(comp4).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2732
CompileAndVerify(comp5).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2742
CompileAndVerify(comp6).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2752
CompileAndVerify(comp7).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2762
CompileAndVerify(comp8).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
2765
CompileAndVerify(comp9).Diagnostics.Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2789
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2796
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2825
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2828
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected);
2831
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
2877
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias1 = C2;").WithLocation(1000, 1),
2880
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias3 = C4;").WithLocation(3000, 1),
2883
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias4 = C2;").WithLocation(4000, 1)
2892
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias1 = C2;").WithLocation(1000, 1)
2899
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias3 = C4;").WithLocation(3000, 1),
2902
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias4 = C2;").WithLocation(4000, 1)
2963
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C2;").WithLocation(1000, 1),
2966
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C4;").WithLocation(3000, 1),
2969
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C5;").WithLocation(4000, 1)
2978
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C2;").WithLocation(1000, 1)
2985
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C4;").WithLocation(3000, 1),
2988
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C5;").WithLocation(4000, 1)
3049
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using C2;").WithLocation(1000, 1),
3052
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using C4;").WithLocation(3000, 1),
3055
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using C5;").WithLocation(4000, 1)
3064
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using C2;").WithLocation(1000, 1)
3071
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using C4;").WithLocation(3000, 1),
3074
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using C5;").WithLocation(4000, 1)
3177
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using N2;").WithLocation(1000, 1),
3180
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N5;").WithLocation(4000, 1),
3183
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N8;").WithLocation(6000, 1),
3210
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using N2;").WithLocation(1000, 1),
3223
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N5;").WithLocation(4000, 1),
3236
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N8;").WithLocation(6000, 1),
3385
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias2 = System;").WithLocation(4, 1)
3393
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias2 = System;").WithLocation(4, 1)
3401
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias2 = System;").WithLocation(2, 1)
3409
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using alias2 = System;").WithLocation(2, 1)
3417
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias2 = System;").WithLocation(2, 1)
3425
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias2 = System;").WithLocation(2, 1)
3433
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias2 = System;").WithLocation(2, 1)
3441
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias2 = System;").WithLocation(2, 1)
4221
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected1);
4224
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected1);
4227
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(
4241
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected2);
4249
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected2);
4257
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected1);
4260
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected1);
4263
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(
4277
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected3);
4285
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected3);
4293
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected3);
4301
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(expected3);
4309
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.
HDN_UnusedUsingDirective
)).Verify(
4375
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4378
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4381
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4384
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4387
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4394
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4401
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4471
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4474
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4477
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4480
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4483
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4490
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4497
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
4568
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using NS;").WithLocation(1000, 1)
4586
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C2;").WithLocation(2000, 1)
4602
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NS;").WithLocation(3000, 1)
4613
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C2;").WithLocation(4000, 1)
4684
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using NS;").WithLocation(1000, 1)
4717
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C2;").WithLocation(2000, 1)
4750
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NS;").WithLocation(3000, 1)
4771
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C2;").WithLocation(4000, 1)
4926
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4929
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4932
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected1);
4945
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
4948
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(expected2);
4951
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.
HDN_UnusedUsingDirective
).Verify(
Semantics\InheritanceBindingTests.cs (1)
1373
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @str = System.String;").WithLocation(2, 1));
Semantics\LookupTests.cs (1)
1621
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = List<int>;").WithLocation(1, 1));
Semantics\NameCollisionTests.cs (2)
2002
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static Static<System.String>;").WithLocation(3, 1));
2034
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static Static<string>;").WithLocation(2, 1));
Semantics\NameOfTests.cs (2)
2536
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;").WithLocation(2, 1),
2554
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;").WithLocation(2, 1),
Semantics\NativeIntegerTests.cs (5)
3842
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A=nint;").WithLocation(1, 1),
3851
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A=nint;").WithLocation(1, 1),
3860
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A=nint;").WithLocation(1, 1),
3926
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using nint;").WithLocation(1, 1),
3932
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using nuint;").WithLocation(2, 1),
Semantics\NullableReferenceTypesTests.cs (2)
14439
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;").WithLocation(4, 1),
14442
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Text;").WithLocation(5, 1),
Semantics\OverloadResolutionTests.cs (1)
7579
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;").WithLocation(2, 1),
Semantics\QueryTests.cs (1)
3594
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
Semantics\RefFieldTests.cs (4)
22342
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using scoped = System.Int32;").WithLocation(1, 1),
22352
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using scoped = System.Int32;").WithLocation(1, 1),
22369
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @scoped = System.Int32;").WithLocation(1, 1)
22376
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @scoped = System.Int32;").WithLocation(1, 1)
Semantics\SemanticErrorTests.cs (1)
2418
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1)
Semantics\TopLevelStatementsTests.cs (2)
3782
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N2;").WithLocation(2, 1),
3850
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N2;").WithLocation(2, 1),
Semantics\UnsafeTests.cs (22)
12730
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int*;").WithLocation(2, 1),
12750
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int;").WithLocation(2, 1),
12766
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int*;").WithLocation(2, 1),
12785
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int;").WithLocation(2, 1),
12804
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int*;").WithLocation(2, 1),
12820
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int;").WithLocation(2, 1),
12836
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = System.String;").WithLocation(2, 1),
12855
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = System.String;").WithLocation(2, 1),
12904
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = X;").WithLocation(5, 5),
12924
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe Y = X;").WithLocation(5, 5));
12942
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int*;").WithLocation(2, 1),
13015
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = int*[];").WithLocation(2, 1));
13028
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int*[];").WithLocation(2, 1),
13161
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = delegate*<int,int>;").WithLocation(2, 1),
13207
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = delegate*<int,int>[];").WithLocation(2, 1),
13210
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = delegate*<int,int>[];").WithLocation(3, 1),
13323
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System.Collections.Generic.List<int*>;").WithLocation(2, 1),
13339
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System.Collections.Generic.List<int*>;").WithLocation(2, 1),
13483
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System.Collections.Generic.List<int*[]>;").WithLocation(2, 1)
13495
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System.Collections.Generic.List<int*[]>;").WithLocation(2, 1),
13597
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = System.Collections.Generic.List<int*[]>;").WithLocation(2, 1));
13603
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe X = System.Collections.Generic.List<int*[]>;").WithLocation(2, 1),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (106)
Compilation\GetUnusedImportDirectivesTests.cs (18)
38
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
102
model.GetDiagnostics().Verify(Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using ClassLibrary2;"));
133
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"),
136
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
139
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
142
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading.Tasks;")
149
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
152
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
155
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading.Tasks;")
205
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;")
285
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"),
288
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;")
295
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"),
298
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;")
333
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"),
336
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using C = System.Console;"));
383
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithWarningAsError(false));
404
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
Compilation\SemanticModelAPITests.cs (2)
1240
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System;"));
1333
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System;"));
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
4529
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Alias = Goo;"));
4566
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Alias = Goo;"));
Compilation\UsedAssembliesTests.cs (20)
219
if (old.Code is (int)ErrorCode.
HDN_UnusedUsingDirective
)
1839
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C1;").WithLocation(1001, 1),
2179
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1001, 1)
2192
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N1.C1;").WithLocation(1001, 1)
2205
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @alias = N1.C1;").WithLocation(1001, 1)
2218
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @alias = N1;").WithLocation(1001, 1)
2244
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(2, 1)
2257
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N1.C1;").WithLocation(2, 1)
2270
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @alias = N1.C1;").WithLocation(2, 1)
2283
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @alias = N1;").WithLocation(2, 1)
4556
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1.N2;").WithLocation(1001, 1)
4561
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1.N2;").WithLocation(1001, 1),
4585
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1001, 1)
4590
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1;").WithLocation(1001, 1),
4776
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N1.N2.E0;").WithLocation(1001, 1)
4781
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static N1.N2.E0;").WithLocation(1001, 1),
5282
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C1;").WithLocation(1001, 1),
5304
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C1;").WithLocation(1001, 1),
5343
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C1;").WithLocation(1001, 1),
5382
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C1;").WithLocation(1001, 1),
DocumentationComments\CrefTests.cs (2)
5281
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
7025
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1));
Symbols\AssemblyAndNamespaceTests.cs (4)
425
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading;"),
428
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading.Tasks;"),
561
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1));
574
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(2, 1));
Symbols\ExtensionMethodTests.cs (3)
3404
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NB;"));
3702
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static Program;").WithLocation(4, 5));
3737
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = N.S;").WithLocation(4, 5));
Symbols\GenericConstraintTests.cs (4)
791
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = C<int>;"));
825
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = C<I<int?>>;"),
828
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using B1 = C<I<int>>.D1<object>;"),
831
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using B2 = C<int>.D2<string>;"));
Symbols\Metadata\PE\TypeForwarders.cs (2)
951
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Namespace;"));
987
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Namespace;"));
Symbols\Source\BaseClassTests.cs (4)
1984
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using D;").WithLocation(2, 1),
1987
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A<int>.B;").WithLocation(1, 1)
2011
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A<int>.B;").WithLocation(1, 1)
2208
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using CrashTest.Crash<CrashTest.Class2>;").WithLocation(2, 1)
Symbols\Source\ExternAliasTests.cs (1)
167
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Bar = System.Console;"),
Symbols\Source\FileModifierTests.cs (4)
3358
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C;").WithLocation(1, 1),
3397
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static Container<C>;").WithLocation(1, 1),
3432
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static C<int>;").WithLocation(1, 1),
3551
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static C;").WithLocation(2, 1));
Symbols\Source\UsingAliasTests.cs (5)
987
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A;").WithLocation(5, 5),
1006
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A;").WithLocation(5, 5),
1025
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A;").WithLocation(5, 5),
1044
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A;").WithLocation(5, 5),
1064
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static A;").WithLocation(5, 5));
Symbols\SymbolErrorTests.cs (33)
2551
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Object;"),
2554
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NS.S;"));
3422
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NoExistNS1;"),
3425
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NoExistNS2;"));
3920
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using NIA = N.IA;").WithLocation(1, 1));
4508
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1),
4565
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using COfArgIterator = C<System.ArgIterator>;").WithLocation(3, 1));
4591
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using COfArgIterator = C<System.ArgIterator>;").WithLocation(3, 1));
15139
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = System;"),
15142
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = System;"),
15145
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using O = System.Object;"),
15148
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using O = System.Object;"));
15191
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(15, 5),
15194
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using ns = namespace2;").WithLocation(14, 5));
15212
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System;"),
15215
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = ABC.X<int>;"));
17058
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
17061
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
17064
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"),
17067
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Goo.Bar;"));
18009
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
20274
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using A = A;").WithLocation(1, 1),
20277
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using B;").WithLocation(4, 5));
21471
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using one = System.Console;").WithLocation(2, 1),
21477
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @two = System.Console;").WithLocation(3, 1),
21480
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using three = System;").WithLocation(4, 1),
21486
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Ten = System.Console;").WithLocation(5, 1),
21489
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using cédille = System.Console;").WithLocation(6, 1)
21499
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using one = System.Console;").WithLocation(2, 1),
21502
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using @two = System.Console;").WithLocation(3, 1),
21505
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using three = System;").WithLocation(4, 1),
21508
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Ten = System.Console;").WithLocation(5, 1),
21511
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using cédille = System.Console;").WithLocation(6, 1)
Symbols\TypeTests.cs (2)
714
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
751
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (67)
Parsing\ParserErrorMessageTests.cs (6)
1924
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1));
2183
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(2, 1));
2819
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(2, 1));
5312
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using N1Alias = N1;").WithLocation(2, 1),
5315
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;").WithLocation(1, 1));
5774
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using global = MyClass;").WithLocation(2, 1));
Parsing\UsingDirectiveParsingTests.cs (55)
353
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static x = ref int;").WithLocation(1, 1),
608
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = A*;").WithLocation(1, 1),
662
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe x = A*;").WithLocation(1, 1),
712
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = delegate*<int, void>;").WithLocation(1, 1),
774
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe x = delegate*<int, void>;").WithLocation(1, 1),
834
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe System;").WithLocation(1, 1),
864
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = int;").WithLocation(1, 1),
904
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = int;").WithLocation(1, 1),
941
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = int;").WithLocation(1, 1),
978
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = ref int;").WithLocation(1, 1),
1022
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = ref readonly int;").WithLocation(1, 1),
1067
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = int*;").WithLocation(1, 1),
1111
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe x = int*;").WithLocation(1, 1),
1159
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = X;").WithLocation(6, 5),
1234
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe Y = X;").WithLocation(6, 5));
1310
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe Y = X;").WithLocation(6, 5));
1382
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = X[];").WithLocation(6, 5),
1469
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe Y = X[];").WithLocation(6, 5));
1548
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = (int, int);").WithLocation(1, 1),
1810
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = int?;").WithLocation(1, 1),
1851
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using x = string?;").WithLocation(1, 1),
1901
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = string?;").WithLocation(2, 1),
1948
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = X?;").WithLocation(4, 5),
2026
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using Y = X?;").WithLocation(5, 5),
2551
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using dynamic;").WithLocation(2, 1),
3150
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int?;").WithLocation(1, 1),
3153
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System;").WithLocation(2, 1),
3214
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int?;").WithLocation(1, 1),
3217
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int;").WithLocation(2, 1),
3278
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int?;").WithLocation(1, 1),
3281
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = System.Int32;").WithLocation(2, 1),
3351
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int?;").WithLocation(1, 1),
3354
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = int;").WithLocation(3, 1));
3952
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = __arglist;").WithLocation(2, 1),
3997
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using X = __makeref;").WithLocation(2, 1),
4039
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static System.Console;").WithLocation(1, 1),
4089
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static System.Console;").WithLocation(1, 1),
4136
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static System.Console;").WithLocation(1, 1),
4183
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static System.Console;").WithLocation(1, 1),
4227
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static X = System.Console;").WithLocation(1, 1),
4288
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static X = System.Console;").WithLocation(1, 1),
4346
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static X = System.Console;").WithLocation(1, 1),
4404
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using unsafe static X = System.Console;").WithLocation(1, 1),
4460
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Console;").WithLocation(1, 1),
4503
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Console;").WithLocation(1, 1),
4543
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Console;").WithLocation(1, 1),
4583
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Console;").WithLocation(1, 1));
4620
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Collections.Generic.List<int*[]>;").WithLocation(1, 1),
4704
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Collections.Generic.List<int*[]>;").WithLocation(1, 1),
4785
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Collections.Generic.List<int*[]>;").WithLocation(1, 1),
4866
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static unsafe System.Collections.Generic.List<int*[]>;").WithLocation(1, 1));
4945
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static System.Collections.Generic.List<int*[]>;").WithLocation(1, 1));
5023
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static System.Collections.Generic.List<int*[]>;").WithLocation(1, 1));
5100
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static System.Collections.Generic.List<int*[]>;").WithLocation(1, 1),
5180
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using static System.Collections.Generic.List<int*[]>;").WithLocation(1, 1),
Syntax\SyntaxTreeTests.cs (6)
370
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using ns1;").WithLocation(1, 1),
442
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using ns1;").WithLocation(1, 16),
512
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static ns1;").WithLocation(1, 1),
586
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using static ns1;").WithLocation(1, 16),
664
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias = ns1;").WithLocation(1, 1),
755
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "global using alias = ns1;").WithLocation(1, 16),
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1840
if (!compileDiagnostics.Any(d => d.Code == (int)ErrorCode.HDN_UnusedExternAlias || d.Code == (int)ErrorCode.
HDN_UnusedUsingDirective
))
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (71)
CodeGen\WinRTCollectionTests.cs (71)
443
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
446
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
449
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
1471
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
1474
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
1477
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
1841
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
1844
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
1847
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
3201
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
3204
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
3207
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
4444
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
4447
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
4450
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
4810
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
4813
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
4816
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
4997
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
5000
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
5003
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
5195
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
5198
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
5201
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"));
5414
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
5417
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
5420
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
5423
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
5551
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
5554
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
5557
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
5560
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
5705
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;").WithLocation(2, 1),
5708
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Threading;").WithLocation(4, 1),
5711
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Runtime.InteropServices;").WithLocation(3, 1));
5821
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
5824
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
5827
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
5830
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
6048
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
6051
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
6054
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
6057
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"),
6060
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"));
6247
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
6250
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
6253
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
6606
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
6609
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
6612
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
6615
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
6767
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
6770
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
6773
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
6776
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"));
7039
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
7042
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
7045
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
7048
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"),
7051
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"));
7166
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
7169
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
7172
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
7175
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"),
7178
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"));
7287
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections.Generic;"),
7290
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Reflection;"),
7293
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq.Expressions;"),
7296
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Linq;"),
7299
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System.Collections;"));
7391
Diagnostic(ErrorCode.
HDN_UnusedUsingDirective
, "using System;"));