mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +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
@@ -15,6 +15,7 @@ using Dbg = System.Management.Automation.Diagnostics;
|
||||
//
|
||||
// Now define the set of commands for manipulating modules.
|
||||
//
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
#region Remove-Module
|
||||
@@ -34,7 +35,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
set { _name = value; }
|
||||
get { return _name; }
|
||||
}
|
||||
private string[] _name = Utils.EmptyArray<string>();
|
||||
private string[] _name = Utils.EmptyArray<string>();
|
||||
|
||||
/// <summary>
|
||||
/// This parameter specifies the current pipeline object
|
||||
@@ -79,20 +80,20 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
foreach (var m in Context.Modules.GetModules(_name, false))
|
||||
{
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo>{m});
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo> { m });
|
||||
}
|
||||
|
||||
if (FullyQualifiedName != null)
|
||||
{
|
||||
foreach (var m in Context.Modules.GetModules(FullyQualifiedName, false))
|
||||
{
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo> {m});
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo> { m });
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var m in _moduleInfo)
|
||||
{
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo>{m});
|
||||
modulesToRemove.Add(m, new List<PSModuleInfo> { m });
|
||||
}
|
||||
|
||||
// Add any of the child modules of a manifests to the list of modules to remove...
|
||||
@@ -297,11 +298,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a map from a module to the list of modules that require it
|
||||
/// </summary>
|
||||
Dictionary<PSModuleInfo, List<PSModuleInfo>> GetRequiredDependencies()
|
||||
private Dictionary<PSModuleInfo, List<PSModuleInfo>> GetRequiredDependencies()
|
||||
{
|
||||
Dictionary<PSModuleInfo, List<PSModuleInfo>> requiredDependencies = new Dictionary<PSModuleInfo, List<PSModuleInfo>>();
|
||||
|
||||
@@ -364,5 +365,4 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
#endregion Remove-Module
|
||||
|
||||
} // Microsoft.PowerShell.Commands
|
||||
Reference in new issue
Block a user