Skip to content

Commit

Permalink
Applied cleanup for IDE0036 to the solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiYanni committed Oct 10, 2023
1 parent 73268c7 commit 9ecb84a
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Microsoft.DotNet.Cli.Sln.Internal.FileManipulation
{
static internal class FileUtil
internal static class FileUtil
{
internal static TextFormatInfo GetTextFormatInfo(string file)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static Process GetParentProcess(this Process process)
/// </summary>
/// <param name="process">The process component.</param>
/// <returns>The process ID of the parent process, or -1 if the parent process could not be found.</returns>
public unsafe static int GetParentProcessId(this Process process)
public static unsafe int GetParentProcessId(this Process process)
{
SafeProcessHandle handle = process.SafeHandle;
NativeMethods.Windows.PROCESS_BASIC_INFORMATION info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal DetailsCommand(

internal virtual CliOption<string[]> AddSourceOption { get; } = SharedOptionsFactory.CreateAddSourceOption();

protected async override Task<NewCommandStatus> ExecuteAsync(
protected override async Task<NewCommandStatus> ExecuteAsync(
DetailsCommandArgs args,
IEngineEnvironmentSettings environmentSettings,
TemplatePackageManager templatePackageManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ await Task.WhenAll(manifests.Select(manifest => UpdateAdvertisingManifestAsync(m
WriteUpdatableWorkloadsFile();
}

public async static Task BackgroundUpdateAdvertisingManifestsAsync(string userProfileDir)
public static async Task BackgroundUpdateAdvertisingManifestsAsync(string userProfileDir)
{
try
{
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/Microsoft.NET.Build.Containers/Layer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static UnixFileMode DetermineFileMode(FileSystemInfo file)

internal virtual Stream OpenBackingFile() => File.OpenRead(BackingFile);

private readonly static char[] PathSeparators = new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
private static readonly char[] PathSeparators = new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };

/// <summary>
/// A stream capable of computing the hash digest of raw uncompressed data while also compressing it.
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Tool/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public NamedPipeClient(NamedPipeClientStream stream, string identifier)

public override string Identifier { get; }

public async override Task WaitForDisconnectAsync(CancellationToken cancellationToken)
public override async Task WaitForDisconnectAsync(CancellationToken cancellationToken)
{
if (!(Stream is PipeStream pipeStream))
{
Expand Down
4 changes: 2 additions & 2 deletions src/RazorSdk/Tool/ConnectionHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public NamedPipeConnectionHost(string pipeName)

public string PipeName { get; }

public async override Task<Connection> WaitForConnectionAsync(CancellationToken cancellationToken)
public override async Task<Connection> WaitForConnectionAsync(CancellationToken cancellationToken)
{
// Create the pipe and begin waiting for a connection. This doesn't block, but could fail
// in certain circumstances, such as the OS refusing to create the pipe for some reason
Expand Down Expand Up @@ -91,7 +91,7 @@ public NamedPipeConnection(NamedPipeServerStream stream, string identifier)
Identifier = identifier;
}

public async override Task WaitForDisconnectAsync(CancellationToken cancellationToken)
public override async Task WaitForDisconnectAsync(CancellationToken cancellationToken)
{
if (!(Stream is PipeStream pipeStream))
{
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Tool/ShutdownCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected override bool ValidateArguments()
return true;
}

protected async override Task<int> ExecuteCoreAsync()
protected override async Task<int> ExecuteCoreAsync()
{
if (!IsServerRunning())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public WorkloadManifestCompositionException(string message) : base(message) { }
public WorkloadManifestCompositionException(string message, Exception inner) : base(message, inner) { }
}

abstract public class WorkloadManifestException : Exception
public abstract class WorkloadManifestException : Exception
{
protected WorkloadManifestException() { }
protected WorkloadManifestException(string messageFormat, params object?[] args) : base(string.Format(messageFormat, args)) { }
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.NET.Build.Tasks/ProjectContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public IEnumerable<string> GetTopLevelDependencies()
return GetTopLevelDependencies(LockFile, LockFileTarget);
}

static public IEnumerable<string> GetTopLevelDependencies(LockFile lockFile, LockFileTarget lockFileTarget)
public static IEnumerable<string> GetTopLevelDependencies(LockFile lockFile, LockFileTarget lockFileTarget)
{
Dictionary<string, LockFileTargetLibrary> libraryLookup =
lockFileTarget.Libraries.ToDictionary(l => l.Name, StringComparer.OrdinalIgnoreCase);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.NET.Build.Containers.IntegrationTests;

public sealed class ProjectInitializer
{
private readonly static string _combinedTargetsLocation;
private static readonly string _combinedTargetsLocation;

static ProjectInitializer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public DockerAvailableFactAttribute(bool skipPodman = false)

// tiny optimization - since there are many instances of this attribute we should only get
// the daemon status once
file static class DockerCliStatus
static file class DockerCliStatus
{
public static readonly bool IsAvailable;
public static readonly string? Command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public FilesCopiedToPublishDirTests(ITestOutputHelper log) : base(log)
{
}

private readonly static List<string> FrameworkAssemblies = new()
private static readonly List<string> FrameworkAssemblies = new()
{
"api-ms-win-core-console-l1-1-0.dll",
"System.Runtime.dll",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public PublishItemsOutputGroupOutputsTests(ITestOutputHelper log) : base(log)
{
}

private readonly static List<string> FrameworkAssemblies = new()
private static readonly List<string> FrameworkAssemblies = new()
{
"api-ms-win-core-console-l1-1-0.dll",
"System.Runtime.dll",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public PublishItemsOutputGroupTests(ITestOutputHelper log) : base(log)
{
}

private readonly static List<string> FrameworkAssemblies = new()
private static readonly List<string> FrameworkAssemblies = new()
{
"api-ms-win-core-console-l1-1-0.dll",
"System.Runtime.dll",
Expand Down
Loading

0 comments on commit 9ecb84a

Please sign in to comment.