mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
Initial run of code formatter
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically: codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp This caused a few problems building, which were fixed up manually. Notable changes: `this.` is removed unless needed to disambiguate. private instance fields are renamed to have a `_` prefix. private static fields are renamed to have a `s_` prefix. I left some projects alone (like PackageManagement) and also left some generated code alone.
This commit is contained in:
1 parent
bc4fe11888
commit
403ae3f53f
953 files changed
+71009
-64819
No files matched your search
@@ -21,6 +21,7 @@ using Dbg = System.Management.Automation.Diagnostics;
|
||||
//
|
||||
// Now define the set of commands for manipulating modules.
|
||||
//
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
/// <summary>
|
||||
@@ -28,7 +29,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Cmdlet("Get", "Module", DefaultParameterSetName = ParameterSet_Loaded,
|
||||
HelpUri = "http://go.microsoft.com/fwlink/?LinkID=141552")]
|
||||
[OutputType(typeof (PSModuleInfo))]
|
||||
[OutputType(typeof(PSModuleInfo))]
|
||||
public sealed class GetModuleCommand : ModuleCmdletBase, IDisposable
|
||||
{
|
||||
#region Cmdlet parameters
|
||||
@@ -265,7 +266,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
private CancellationToken CancellationToken
|
||||
{
|
||||
get { return this._cancellationTokenSource.Token; }
|
||||
get { return _cancellationTokenSource.Token; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -276,7 +277,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
protected override void StopProcessing()
|
||||
{
|
||||
this._cancellationTokenSource.Cancel();
|
||||
_cancellationTokenSource.Cancel();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -304,7 +305,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
this._cancellationTokenSource.Dispose();
|
||||
_cancellationTokenSource.Dispose();
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
@@ -385,7 +386,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
AssertNameDoesNotResolveToAPath(names,
|
||||
Modules.RemoteDiscoveryWorksOnlyForUnQualifiedNames,
|
||||
"RemoteDiscoveryWorksOnlyForUnQualifiedNames");
|
||||
|
||||
|
||||
GetAvailableViaPsrpSession(names, moduleSpecTable, this.PSSession);
|
||||
}
|
||||
else if (ParameterSetName.Equals(ParameterSet_AvailableInCimSession, StringComparison.OrdinalIgnoreCase))
|
||||
@@ -435,7 +436,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
private static bool ModuleMatch(PSModuleInfo moduleInfo, IDictionary<string, ModuleSpecification> moduleSpecTable, string edition)
|
||||
{
|
||||
ModuleSpecification moduleSpecification;
|
||||
return (String.IsNullOrEmpty(edition) || moduleInfo.CompatiblePSEditions.Contains(edition, StringComparer.OrdinalIgnoreCase)) &&
|
||||
return (String.IsNullOrEmpty(edition) || moduleInfo.CompatiblePSEditions.Contains(edition, StringComparer.OrdinalIgnoreCase)) &&
|
||||
(!moduleSpecTable.TryGetValue(moduleInfo.Name, out moduleSpecification) || ModuleIntrinsics.IsModuleMatchingModuleSpec(moduleInfo, moduleSpecification));
|
||||
}
|
||||
|
||||
@@ -515,6 +516,5 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // Microsoft.PowerShell.Commands
|
||||
|
||||
Reference in new issue
Block a user