Skip to content

Commit c85baf8

Browse files
chore : Remove unwanted using statement (#39176)
1 parent 2a2f285 commit c85baf8

File tree

4,869 files changed

+48
-12842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,869 files changed

+48
-12842
lines changed

.devcontainer/devcontainer.json

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/dotnet
33
{
4-
"name": "C# (.NET)",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"args": {
8-
// The VARIANT here must align with a dotnet container image that
9-
// is publicly available on https://mcr.microsoft.com/v2/vscode/devcontainers/dotnet/tags/list.
10-
// We'll default to `latest` as the default. Generally, the .NET version that is baked
11-
// into the image by default doesn't matter since we end up installing our own
12-
// local version and using that by default in the container environment.
13-
"VARIANT": "latest",
14-
// Options
15-
"INSTALL_NODE": "true",
16-
"NODE_VERSION": "lts/*"
17-
}
18-
},
19-
// Add the IDs of extensions you want installed when the container is created.
20-
"extensions": [
21-
"ms-dotnettools.csharp",
22-
"EditorConfig.EditorConfig",
23-
"k--kato.docomment"
24-
],
25-
"settings": {
26-
// Loading projects on demand is better for larger codebases
27-
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
28-
"omnisharp.enableRoslynAnalyzers": true,
29-
"omnisharp.enableEditorConfigSupport": true,
30-
},
31-
// Use 'postCreateCommand' to run commands after the container is created.
32-
"onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh",
33-
// Add the locally installed dotnet to the path to ensure that it is activated
34-
// This is needed so that things like the C# extension can resolve the correct SDK version
35-
"remoteEnv": {
36-
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
37-
"DOTNET_MULTILEVEL_LOOKUP": "0",
38-
"TARGET": "net7.0"
39-
},
40-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
41-
"remoteUser": "vscode"
4+
"name": "C# (.NET)",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// The VARIANT here must align with a dotnet container image that
9+
// is publicly available on https://mcr.microsoft.com/v2/vscode/devcontainers/dotnet/tags/list.
10+
// We'll default to `latest` as the default. Generally, the .NET version that is baked
11+
// into the image by default doesn't matter since we end up installing our own
12+
// local version and using that by default in the container environment.
13+
"VARIANT": "latest",
14+
// Options
15+
"INSTALL_NODE": "true",
16+
"NODE_VERSION": "lts/*"
17+
}
18+
},
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [
21+
"ms-dotnettools.csharp",
22+
"EditorConfig.EditorConfig",
23+
"k--kato.docomment"
24+
],
25+
"settings": {
26+
// Loading projects on demand is better for larger codebases
27+
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
28+
"omnisharp.enableRoslynAnalyzers": true,
29+
"omnisharp.enableEditorConfigSupport": true,
30+
"omnisharp.enableImportCompletion": true,
31+
},
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh",
34+
// Add the locally installed dotnet to the path to ensure that it is activated
35+
// This is needed so that things like the C# extension can resolve the correct SDK version
36+
"remoteEnv": {
37+
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
38+
"DOTNET_MULTILEVEL_LOOKUP": "0",
39+
"TARGET": "net7.0"
40+
},
41+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
42+
"remoteUser": "vscode"
4243
}

.editorconfig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ end_of_line = lf
7373
charset = utf-8-bom
7474

7575
[*.{cs,vb}]
76+
77+
# CS8019: Remove unnecessary usings
78+
# dotnet_diagnostic.CS8019.severity = warning
79+
# dotnet_diagnostic.IDE0005.severity = warning
80+
7681
# CA1018: Mark attributes with AttributeUsageAttribute
7782
dotnet_diagnostic.CA1018.severity = warning
7883

@@ -266,4 +271,4 @@ dotnet_diagnostic.CA2016.severity = suggestion
266271
# IDE0055: Fix formatting
267272
dotnet_diagnostic.IDE0055.severity = silent
268273
# IDE0161: Convert to file-scoped namespace
269-
dotnet_diagnostic.IDE0161.severity = silent
274+
dotnet_diagnostic.IDE0161.severity = silent

src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticProject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Collections.Generic;
5-
using System.IO;
65
using System.Linq;
76
using System.Reflection;
87
using Microsoft.CodeAnalysis;

src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/TestSource.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.IO;
76

87
namespace Microsoft.AspNetCore.Analyzer.Testing;
98

src/Antiforgery/src/AntiforgeryOptions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using Microsoft.AspNetCore.Http;
65

76
namespace Microsoft.AspNetCore.Antiforgery;

src/Antiforgery/src/AntiforgeryServiceCollectionExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using Microsoft.AspNetCore.Antiforgery;
65
using Microsoft.Extensions.DependencyInjection.Extensions;
76
using Microsoft.Extensions.ObjectPool;

src/Antiforgery/src/AntiforgeryTokenSet.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
64
namespace Microsoft.AspNetCore.Antiforgery;
75

86
/// <summary>

src/Antiforgery/src/AntiforgeryValidationException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
64
namespace Microsoft.AspNetCore.Antiforgery;
75

86
/// <summary>

src/Antiforgery/src/IAntiforgery.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Threading.Tasks;
54
using Microsoft.AspNetCore.Http;
65

76
namespace Microsoft.AspNetCore.Antiforgery;

src/Antiforgery/src/Internal/AntiforgeryLoggerExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using Microsoft.Extensions.Logging;
65

76
namespace Microsoft.AspNetCore.Antiforgery;

src/Antiforgery/src/Internal/AntiforgeryOptionsSetup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using System.Security.Cryptography;
65
using System.Text;
76
using Microsoft.AspNetCore.DataProtection;

src/Antiforgery/src/Internal/AntiforgerySerializationContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.IO;
5-
using System.Security.Cryptography;
64
using System.Text;
75

86
namespace Microsoft.AspNetCore.Antiforgery;

src/Antiforgery/src/Internal/BinaryBlob.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using System.Diagnostics;
65
using System.Globalization;
76
using System.Runtime.CompilerServices;

src/Antiforgery/src/Internal/DefaultAntiforgery.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using System.Diagnostics;
65
using System.Diagnostics.CodeAnalysis;
7-
using System.Threading.Tasks;
86
using Microsoft.AspNetCore.Http;
97
using Microsoft.Extensions.Logging;
108
using Microsoft.Extensions.Options;

src/Antiforgery/src/Internal/DefaultAntiforgeryTokenGenerator.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
64
using System.Diagnostics.CodeAnalysis;
75
using System.Security.Claims;
86
using System.Security.Principal;

src/Antiforgery/src/Internal/DefaultAntiforgeryTokenSerializer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.IO;
64
using Microsoft.AspNetCore.DataProtection;
75
using Microsoft.AspNetCore.WebUtilities;
86
using Microsoft.Extensions.ObjectPool;

src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using System.Diagnostics;
6-
using System.IO;
7-
using System.Threading.Tasks;
85
using Microsoft.AspNetCore.Http;
96
using Microsoft.Extensions.Options;
107
using Microsoft.Extensions.Primitives;

src/Antiforgery/src/Internal/DefaultClaimUidExtractor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
64
using System.Diagnostics;
75
using System.Security.Claims;
86
using System.Security.Cryptography;

src/Antiforgery/src/Internal/IAntiforgeryFeature.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Diagnostics.CodeAnalysis;
5-
64
namespace Microsoft.AspNetCore.Antiforgery;
75

86
internal interface IAntiforgeryFeature

src/Antiforgery/src/Internal/IAntiforgeryTokenStore.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Threading.Tasks;
54
using Microsoft.AspNetCore.Http;
65

76
namespace Microsoft.AspNetCore.Antiforgery;

src/Antiforgery/test/AntiforgeryOptionsSetupTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Microsoft.AspNetCore.Http;
66
using Microsoft.Extensions.DependencyInjection;
77
using Microsoft.Extensions.Options;
8-
using Xunit;
98

109
namespace Microsoft.AspNetCore.Antiforgery.Internal;
1110

src/Antiforgery/test/AntiforgeryTokenTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using Xunit;
5-
64
namespace Microsoft.AspNetCore.Antiforgery.Internal;
75

86
public class AntiforgeryTokenTest

src/Antiforgery/test/BinaryBlobTest.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using Xunit;
6-
74
namespace Microsoft.AspNetCore.Antiforgery.Internal;
85

96
public class BinaryBlobTest

src/Antiforgery/test/DefaultAntiforgeryTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Linq;
64
using System.Security.Claims;
7-
using System.Threading.Tasks;
85
using Microsoft.AspNetCore.Http;
96
using Microsoft.AspNetCore.Http.Features;
107
using Microsoft.Extensions.DependencyInjection;
118
using Microsoft.Extensions.Logging;
12-
using Microsoft.Extensions.Logging.Testing;
139
using Microsoft.Extensions.Options;
14-
using Microsoft.Net.Http.Headers;
1510
using Moq;
16-
using Xunit;
11+
using Microsoft.Extensions.Logging.Testing;
1712

1813
namespace Microsoft.AspNetCore.Antiforgery.Internal;
1914

src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
#nullable disable
5-
using System;
65
using System.Security.Claims;
76
using System.Security.Cryptography;
87
using Microsoft.AspNetCore.Http;
98
using Microsoft.AspNetCore.Testing;
109
using Moq;
11-
using Xunit;
1210

1311
namespace Microsoft.AspNetCore.Antiforgery.Internal;
1412

src/Antiforgery/test/DefaultAntiforgeryTokenSerializerTest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
74
using Microsoft.AspNetCore.DataProtection;
85
using Microsoft.Extensions.ObjectPool;
96
using Moq;
10-
using Xunit;
117

128
namespace Microsoft.AspNetCore.Antiforgery.Internal;
139

src/Antiforgery/test/DefaultAntiforgeryTokenStoreTest.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.IO;
7-
using System.Threading;
8-
using System.Threading.Tasks;
94
using Microsoft.AspNetCore.Http;
105
using Microsoft.Extensions.Primitives;
11-
using Microsoft.Net.Http.Headers;
126
using Moq;
13-
using Xunit;
147

158
namespace Microsoft.AspNetCore.Antiforgery.Internal;
169

src/Antiforgery/test/DefaultClaimUidExtractorTest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
74
using System.Security.Claims;
85
using Microsoft.Extensions.ObjectPool;
96
using Moq;
10-
using Xunit;
117

128
namespace Microsoft.AspNetCore.Antiforgery.Internal;
139

src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Controllers/AccountController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
54
using Microsoft.AspNetCore.Authorization;
65
using Microsoft.AspNetCore.Mvc;
76
using Microsoft.Extensions.Options;

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAccountControllerFeatureProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
64
using System.Reflection;
75
using Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureAD.Controllers.Internal;
86
using Microsoft.AspNetCore.Mvc.ApplicationParts;

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAuthenticationBuilderExtensions.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
74
using Microsoft.AspNetCore.Authentication.AzureAD.UI;
85
using Microsoft.AspNetCore.Authentication.Cookies;
96
using Microsoft.AspNetCore.Authentication.JwtBearer;
107
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
11-
using Microsoft.AspNetCore.Mvc.ApplicationParts;
128
using Microsoft.Extensions.DependencyInjection;
139
using Microsoft.Extensions.DependencyInjection.Extensions;
1410
using Microsoft.Extensions.Options;

0 commit comments

Comments
 (0)