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
@@ -1,8 +1,8 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
|
||||
[assembly:AssemblyFileVersionAttribute("3.0.0.0")]
|
||||
[assembly:AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
|
||||
[assembly:AssemblyCulture("")]
|
||||
[assembly:NeutralResourcesLanguage("en-US")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("en-US")]
|
||||
@@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
using Dbg=System.Management.Automation;
|
||||
using Dbg = System.Management.Automation;
|
||||
using System.Management.Automation.Security;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
@@ -28,7 +28,6 @@ using System.Reflection;
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Defines the base class from which all Security Descriptor commands
|
||||
/// are derived.
|
||||
@@ -44,12 +43,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return filter;
|
||||
return _filter;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
filter = value;
|
||||
_filter = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +61,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return include;
|
||||
return _include;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
include = value;
|
||||
_include = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,12 +79,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return exclude;
|
||||
return _exclude;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
exclude = value;
|
||||
_exclude = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +120,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// of security descriptor
|
||||
/// </summary>
|
||||
static internal void AddBrokeredProperties(
|
||||
Collection<PSObject> results,
|
||||
bool audit,
|
||||
Collection<PSObject> results,
|
||||
bool audit,
|
||||
bool allCentralAccessPolicies)
|
||||
{
|
||||
foreach (PSObject result in results)
|
||||
@@ -186,7 +185,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static string GetPath(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -194,11 +193,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
// These are guaranteed to not be null, but even checking
|
||||
// them for null causes a presharp warning
|
||||
#pragma warning disable 56506
|
||||
#pragma warning disable 56506
|
||||
|
||||
//Get path
|
||||
return instance.Properties["PSPath"].Value.ToString();
|
||||
#pragma warning enable 56506
|
||||
#pragma warning enable 56506
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,13 +212,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static string GetOwner(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
|
||||
ObjectSecurity sd = instance.BaseObject as ObjectSecurity;
|
||||
if(sd == null)
|
||||
if (sd == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -253,13 +252,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static string GetGroup(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
|
||||
ObjectSecurity sd = instance.BaseObject as ObjectSecurity;
|
||||
if(sd == null)
|
||||
if (sd == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -292,7 +291,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static AuthorizationRuleCollection GetAccess(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -330,7 +329,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static AuthorizationRuleCollection GetAudit(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -415,7 +414,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
pAce += ace.AceSize;
|
||||
}
|
||||
IntPtr pSid = pAce + Marshal.SizeOf(new NativeMethods.SYSTEM_AUDIT_ACE()) -
|
||||
IntPtr pSid = pAce + Marshal.SizeOf(new NativeMethods.SYSTEM_AUDIT_ACE()) -
|
||||
Marshal.SizeOf(new uint());
|
||||
bool ret = NativeMethods.IsValidSid(pSid);
|
||||
if (!ret)
|
||||
@@ -582,13 +581,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </returns>
|
||||
public static string GetSddl(PSObject instance)
|
||||
{
|
||||
if(instance == null)
|
||||
if (instance == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
|
||||
ObjectSecurity sd = instance.BaseObject as ObjectSecurity;
|
||||
if(sd == null)
|
||||
if (sd == null)
|
||||
{
|
||||
throw PSTraceSource.NewArgumentNullException("instance");
|
||||
}
|
||||
@@ -602,24 +601,24 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <summary>
|
||||
/// The filter to be used to when globbing to get the item.
|
||||
/// </summary>
|
||||
private string filter;
|
||||
private string _filter;
|
||||
|
||||
/// <summary>
|
||||
/// The glob string used to determine which items are included.
|
||||
/// </summary>
|
||||
private string[] include = new string[0];
|
||||
private string[] _include = new string[0];
|
||||
|
||||
/// <summary>
|
||||
/// The glob string used to determine which items are excluded.
|
||||
/// </summary>
|
||||
private string[] exclude = new string[0];
|
||||
private string[] _exclude = new string[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the implementation of the 'get-acl' cmdlet.
|
||||
/// This cmdlet gets the security descriptor of an item at the specified path.
|
||||
/// </summary>
|
||||
[Cmdlet(VerbsCommon.Get, "Acl", SupportsTransactions = true, DefaultParameterSetName="ByPath", HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113305")]
|
||||
[Cmdlet(VerbsCommon.Get, "Acl", SupportsTransactions = true, DefaultParameterSetName = "ByPath", HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113305")]
|
||||
public sealed class GetAclCommand : SecurityDescriptorCommandsBase
|
||||
{
|
||||
/// <summary>
|
||||
@@ -629,33 +628,33 @@ namespace Microsoft.PowerShell.Commands
|
||||
public GetAclCommand()
|
||||
{
|
||||
//Default for path is the current location
|
||||
path = new string[] { "." };
|
||||
_path = new string[] { "." };
|
||||
}
|
||||
#region parameters
|
||||
|
||||
private string[] path;
|
||||
private string[] _path;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the path of the item for which to obtain the
|
||||
/// security descriptor. Default is the current location.
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ValueFromPipeline=true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByPath")]
|
||||
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByPath")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
public string[] Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
_path = value;
|
||||
}
|
||||
}
|
||||
|
||||
private PSObject inputObject = null;
|
||||
|
||||
private PSObject _inputObject = null;
|
||||
|
||||
/// <summary>
|
||||
/// InputObject Parameter
|
||||
/// Gets or sets the inputObject for which to obtain the security descriptor
|
||||
@@ -665,12 +664,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return inputObject;
|
||||
return _inputObject;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
inputObject = value;
|
||||
_inputObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -686,16 +685,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
isLiteralPath = true;
|
||||
_path = value;
|
||||
_isLiteralPath = true;
|
||||
}
|
||||
}
|
||||
private bool isLiteralPath = false;
|
||||
private bool _isLiteralPath = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the audit flag of the command. This flag
|
||||
@@ -706,15 +705,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return audit;
|
||||
return _audit;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
audit = value;
|
||||
_audit = value;
|
||||
}
|
||||
}
|
||||
SwitchParameter audit;
|
||||
private SwitchParameter _audit;
|
||||
|
||||
#if CORECLR
|
||||
/// <summary>
|
||||
@@ -744,7 +743,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
allCentralAccessPolicies = value;
|
||||
}
|
||||
}
|
||||
SwitchParameter allCentralAccessPolicies;
|
||||
private SwitchParameter allCentralAccessPolicies;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
@@ -761,14 +760,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
AccessControlSections.Owner |
|
||||
AccessControlSections.Group |
|
||||
AccessControlSections.Access;
|
||||
if (audit)
|
||||
if (_audit)
|
||||
{
|
||||
sections |= AccessControlSections.Audit;
|
||||
}
|
||||
|
||||
if (inputObject != null)
|
||||
if (_inputObject != null)
|
||||
{
|
||||
PSMethodInfo methodInfo = inputObject.Methods["GetSecurityDescriptor"];
|
||||
PSMethodInfo methodInfo = _inputObject.Methods["GetSecurityDescriptor"];
|
||||
|
||||
if (methodInfo != null)
|
||||
{
|
||||
@@ -821,7 +820,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
string currentPath = null;
|
||||
try
|
||||
{
|
||||
if (isLiteralPath)
|
||||
if (_isLiteralPath)
|
||||
{
|
||||
pathsToProcess.Add(SessionState.Path.GetUnresolvedProviderPathFromPSPath(p));
|
||||
}
|
||||
@@ -842,7 +841,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
CmdletProviderContext context = new CmdletProviderContext(this.Context);
|
||||
context.SuppressWildcardExpansion = true;
|
||||
|
||||
if (!InvokeProvider.Item.Exists(rp, false, isLiteralPath))
|
||||
if (!InvokeProvider.Item.Exists(rp, false, _isLiteralPath))
|
||||
{
|
||||
ErrorRecord er =
|
||||
SecurityUtils.CreatePathNotFoundErrorRecord(
|
||||
@@ -860,8 +859,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
if (sd != null)
|
||||
{
|
||||
AddBrokeredProperties(
|
||||
sd,
|
||||
audit,
|
||||
sd,
|
||||
_audit,
|
||||
AllCentralAccessPolicies);
|
||||
WriteObject(sd, true);
|
||||
}
|
||||
@@ -898,11 +897,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Defines the implementation of the 'set-acl' cmdlet.
|
||||
/// This cmdlet sets the security descriptor of an item at the specified path.
|
||||
/// </summary>
|
||||
[Cmdlet(VerbsCommon.Set, "Acl", SupportsShouldProcess = true, SupportsTransactions = true, DefaultParameterSetName="ByPath",
|
||||
[Cmdlet(VerbsCommon.Set, "Acl", SupportsShouldProcess = true, SupportsTransactions = true, DefaultParameterSetName = "ByPath",
|
||||
HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113389")]
|
||||
public sealed class SetAclCommand : SecurityDescriptorCommandsBase
|
||||
{
|
||||
private string[] path;
|
||||
private string[] _path;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the path of the item for which to set the
|
||||
@@ -913,16 +912,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
_path = value;
|
||||
}
|
||||
}
|
||||
|
||||
private PSObject inputObject = null;
|
||||
private PSObject _inputObject = null;
|
||||
|
||||
/// <summary>
|
||||
/// InputObject Parameter
|
||||
@@ -933,15 +932,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return inputObject;
|
||||
return _inputObject;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
inputObject = value;
|
||||
_inputObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the literal path of the item for which to set the
|
||||
/// security descriptor.
|
||||
@@ -953,18 +952,18 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
isLiteralPath = true;
|
||||
_path = value;
|
||||
_isLiteralPath = true;
|
||||
}
|
||||
}
|
||||
private bool isLiteralPath = false;
|
||||
private bool _isLiteralPath = false;
|
||||
|
||||
private object securityDescriptor;
|
||||
private object _securityDescriptor;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the security descriptor object to be
|
||||
@@ -977,12 +976,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return securityDescriptor;
|
||||
return _securityDescriptor;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
securityDescriptor = PSObject.Base(value);
|
||||
_securityDescriptor = PSObject.Base(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1018,7 +1017,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
#endif
|
||||
|
||||
SwitchParameter clearCentralAccessPolicy;
|
||||
private SwitchParameter _clearCentralAccessPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// Clears the central access policy applied on the target item(s).
|
||||
@@ -1029,16 +1028,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return clearCentralAccessPolicy;
|
||||
return _clearCentralAccessPolicy;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
clearCentralAccessPolicy = value;
|
||||
_clearCentralAccessPolicy = value;
|
||||
}
|
||||
}
|
||||
|
||||
SwitchParameter passthru;
|
||||
private SwitchParameter _passthru;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Passthru flag for the operation.
|
||||
@@ -1050,12 +1049,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return passthru;
|
||||
return _passthru;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
passthru = value;
|
||||
_passthru = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1244,7 +1243,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// by calling NativeMethods.CloseHandle.
|
||||
/// </summary>
|
||||
private IntPtr GetTokenWithEnabledPrivilege(
|
||||
string privilege,
|
||||
string privilege,
|
||||
NativeMethods.TOKEN_PRIVILEGE previousState)
|
||||
{
|
||||
IntPtr pToken = IntPtr.Zero;
|
||||
@@ -1323,15 +1322,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Access Control List (ACL).
|
||||
protected override void ProcessRecord()
|
||||
{
|
||||
ObjectSecurity aclObjectSecurity = securityDescriptor as ObjectSecurity;
|
||||
ObjectSecurity aclObjectSecurity = _securityDescriptor as ObjectSecurity;
|
||||
|
||||
if (inputObject != null)
|
||||
if (_inputObject != null)
|
||||
{
|
||||
PSMethodInfo methodInfo = inputObject.Methods["SetSecurityDescriptor"];
|
||||
PSMethodInfo methodInfo = _inputObject.Methods["SetSecurityDescriptor"];
|
||||
|
||||
if (methodInfo != null)
|
||||
{
|
||||
CommonSecurityDescriptor aclCommonSD = securityDescriptor as CommonSecurityDescriptor;
|
||||
CommonSecurityDescriptor aclCommonSD = _securityDescriptor as CommonSecurityDescriptor;
|
||||
string sddl;
|
||||
|
||||
if (aclObjectSecurity != null)
|
||||
@@ -1473,7 +1472,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
CmdletProviderContext context = this.CmdletProviderContext;
|
||||
context.PassThru = Passthru;
|
||||
if (isLiteralPath)
|
||||
if (_isLiteralPath)
|
||||
{
|
||||
ProviderInfo Provider = null;
|
||||
PSDriveInfo Drive = null;
|
||||
|
||||
@@ -6,7 +6,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
using Dbg=System.Management.Automation.Diagnostics;
|
||||
using Dbg = System.Management.Automation.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Management.Automation.Provider;
|
||||
@@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Defines the base class from which all catalog commands are derived.
|
||||
/// </summary>
|
||||
public abstract class CatalogCommandsBase : PSCmdlet
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Path of folder/file to generate or validate the catalog file
|
||||
/// </summary>
|
||||
@@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
//
|
||||
// name of this command
|
||||
//
|
||||
string commandName;
|
||||
private string commandName;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the CatalogCommandsBase class,
|
||||
@@ -71,7 +71,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
commandName = name;
|
||||
}
|
||||
|
||||
private CatalogCommandsBase() : base() {}
|
||||
private CatalogCommandsBase() : base() { }
|
||||
|
||||
/// <summary>
|
||||
/// Processes records from the input pipeline.
|
||||
@@ -90,7 +90,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
Collection<string> paths = new Collection<string>();
|
||||
|
||||
if (Path != null)
|
||||
{
|
||||
{
|
||||
foreach (string p in Path)
|
||||
{
|
||||
foreach (PathInfo tempPath in SessionState.Path.GetResolvedPSPathFromPSPath(p))
|
||||
@@ -100,15 +100,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
|
||||
string drive = null;
|
||||
string drive = null;
|
||||
|
||||
// resolve catalog destination Path
|
||||
if (!SessionState.Path.IsPSAbsolute(catalogFilePath, out drive) && !System.IO.Path.IsPathRooted(catalogFilePath))
|
||||
{
|
||||
catalogFilePath = SessionState.Path.GetUnresolvedProviderPathFromPSPath(catalogFilePath);
|
||||
{
|
||||
catalogFilePath = SessionState.Path.GetUnresolvedProviderPathFromPSPath(catalogFilePath);
|
||||
}
|
||||
|
||||
PerformAction(paths, catalogFilePath);
|
||||
PerformAction(paths, catalogFilePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -136,7 +136,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Initializes a new instance of the New-FileCatalog class.
|
||||
/// </summary>
|
||||
public NewFileCatalogCommand() : base("New-FileCatalog") { }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Catalog version
|
||||
/// </summary>
|
||||
@@ -149,12 +149,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
set
|
||||
{
|
||||
catalogVersion = value;
|
||||
catalogVersion = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Based on the Catalog version we will decide which hashing Algorithm to use
|
||||
private int catalogVersion = 1;
|
||||
private int catalogVersion = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Generate the Catalog for the Path
|
||||
@@ -168,8 +168,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <returns>
|
||||
/// True if able to Create Catalog or else False
|
||||
/// </returns>
|
||||
protected override void PerformAction(Collection<string> path,string catalogFilePath)
|
||||
{
|
||||
protected override void PerformAction(Collection<string> path, string catalogFilePath)
|
||||
{
|
||||
if (path.Count == 0)
|
||||
{
|
||||
// if user has not provided the path use current directory to generate catalog
|
||||
@@ -182,9 +182,9 @@ namespace Microsoft.PowerShell.Commands
|
||||
// parent Directory exists other wise CryptoAPI fails to create a .cat file
|
||||
if (catalogFileInfo.Extension.Equals(".cat", StringComparison.Ordinal))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(catalogFileInfo.Directory.FullName);
|
||||
System.IO.Directory.CreateDirectory(catalogFileInfo.Directory.FullName);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// This only creates Directory if it does not exists, Append a default name
|
||||
System.IO.Directory.CreateDirectory(catalogFilePath);
|
||||
@@ -197,7 +197,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
WriteObject(catalogFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -228,8 +228,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <summary>
|
||||
/// Patterns used to exclude files from DiskPaths and Catalog
|
||||
/// </summary>
|
||||
[Parameter()]
|
||||
public string[] FilesToSkip
|
||||
[Parameter()]
|
||||
public string[] FilesToSkip
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -245,7 +245,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
string[] filesToSkip = null;
|
||||
private string[] filesToSkip = null;
|
||||
internal WildcardPattern[] excludedPatterns = null;
|
||||
|
||||
/// <summary>
|
||||
@@ -277,10 +277,9 @@ namespace Microsoft.PowerShell.Commands
|
||||
else
|
||||
{
|
||||
WriteObject(catalogInfo.Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -4,7 +4,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
|
||||
using System;
|
||||
using Dbg=System.Management.Automation.Diagnostics;
|
||||
using Dbg = System.Management.Automation.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -27,20 +27,20 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Gets or sets the path of the item for which to obtain the
|
||||
/// certificate.
|
||||
/// </summary>
|
||||
[Parameter(Position=0, ValueFromPipeline=true, ValueFromPipelineByPropertyName = true, Mandatory=true, ParameterSetName = "ByPath")]
|
||||
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = "ByPath")]
|
||||
public string[] FilePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
_path = value;
|
||||
}
|
||||
}
|
||||
private string[] path;
|
||||
private string[] _path;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the literal path of the item for which to obtain the
|
||||
@@ -53,21 +53,21 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
isLiteralPath = true;
|
||||
_path = value;
|
||||
_isLiteralPath = true;
|
||||
}
|
||||
}
|
||||
private bool isLiteralPath = false;
|
||||
private bool _isLiteralPath = false;
|
||||
|
||||
//
|
||||
// list of files that were not found
|
||||
//
|
||||
ArrayList filesNotFound = new ArrayList();
|
||||
private ArrayList _filesNotFound = new ArrayList();
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -99,7 +99,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
List<string> paths = new List<string>();
|
||||
|
||||
// Expand wildcard characters
|
||||
if (isLiteralPath)
|
||||
if (_isLiteralPath)
|
||||
{
|
||||
paths.Add(SessionState.Path.GetUnresolvedProviderPathFromPSPath(p));
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
catch (ItemNotFoundException)
|
||||
{
|
||||
filesNotFound.Add(p);
|
||||
_filesNotFound.Add(p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
if (resolvedProviderPath == null)
|
||||
{
|
||||
filesNotFound.Add(p);
|
||||
_filesNotFound.Add(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -178,9 +178,9 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
}
|
||||
|
||||
if (filesNotFound.Count > 0)
|
||||
if (_filesNotFound.Count > 0)
|
||||
{
|
||||
if (filesNotFound.Count == FilePath.Length)
|
||||
if (_filesNotFound.Count == FilePath.Length)
|
||||
{
|
||||
ErrorRecord er =
|
||||
SecurityUtils.CreateFileNotFoundErrorRecord(
|
||||
@@ -195,7 +195,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
// we found some files but not others.
|
||||
// Write error for each missing file
|
||||
//
|
||||
foreach (string f in filesNotFound)
|
||||
foreach (string f in _filesNotFound)
|
||||
{
|
||||
ErrorRecord er =
|
||||
SecurityUtils.CreateFileNotFoundErrorRecord(
|
||||
@@ -234,8 +234,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
return cert;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -50,7 +50,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
PSDataCollection<PSObject> inputObjects = new PSDataCollection<PSObject>();
|
||||
private PSDataCollection<PSObject> _inputObjects = new PSDataCollection<PSObject>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content of the CMS Message by path.
|
||||
@@ -71,7 +71,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private string resolvedPath = null;
|
||||
private string _resolvedPath = null;
|
||||
|
||||
/// <summary>
|
||||
/// Emits the protected message to a file path.
|
||||
@@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private string resolvedOutFile = null;
|
||||
private string _resolvedOutFile = null;
|
||||
|
||||
/// <summary>
|
||||
/// Validate / convert arguments
|
||||
@@ -107,20 +107,20 @@ namespace Microsoft.PowerShell.Commands
|
||||
ThrowTerminatingError(error);
|
||||
}
|
||||
|
||||
resolvedPath = resolvedPaths[0];
|
||||
_resolvedPath = resolvedPaths[0];
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(LiteralPath))
|
||||
{
|
||||
// Validate that the path exists
|
||||
SessionState.InvokeProvider.Item.Get(new string[] { LiteralPath }, false, true);
|
||||
resolvedPath = LiteralPath;
|
||||
_resolvedPath = LiteralPath;
|
||||
}
|
||||
|
||||
// Validate OutFile
|
||||
if (!String.IsNullOrEmpty(OutFile))
|
||||
{
|
||||
resolvedOutFile = GetUnresolvedProviderPathFromPSPath(OutFile);
|
||||
_resolvedOutFile = GetUnresolvedProviderPathFromPSPath(OutFile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
if (String.Equals("ByContent", this.ParameterSetName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
inputObjects.Add(Content);
|
||||
_inputObjects.Add(Content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,16 +144,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
byte[] contentBytes = null;
|
||||
|
||||
if (inputObjects.Count > 0)
|
||||
if (_inputObjects.Count > 0)
|
||||
{
|
||||
StringBuilder outputString = new StringBuilder();
|
||||
|
||||
Collection<PSObject> output = System.Management.Automation.PowerShell.Create().
|
||||
AddCommand("Microsoft.PowerShell.Utility\\Out-String").
|
||||
AddParameter("Stream").
|
||||
Invoke(inputObjects);
|
||||
Invoke(_inputObjects);
|
||||
|
||||
foreach(PSObject outputObject in output)
|
||||
foreach (PSObject outputObject in output)
|
||||
{
|
||||
if (outputString.Length > 0)
|
||||
{
|
||||
@@ -167,7 +167,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
contentBytes = System.IO.File.ReadAllBytes(resolvedPath);
|
||||
contentBytes = System.IO.File.ReadAllBytes(_resolvedPath);
|
||||
}
|
||||
|
||||
ErrorRecord terminatingError = null;
|
||||
@@ -178,13 +178,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
ThrowTerminatingError(terminatingError);
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(resolvedOutFile))
|
||||
if (String.IsNullOrEmpty(_resolvedOutFile))
|
||||
{
|
||||
WriteObject(encodedContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.IO.File.WriteAllText(resolvedOutFile, encodedContent);
|
||||
System.IO.File.WriteAllText(_resolvedOutFile, encodedContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
StringBuilder contentBuffer = new StringBuilder();
|
||||
private StringBuilder _contentBuffer = new StringBuilder();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CMS Message by path.
|
||||
@@ -231,7 +231,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private string resolvedPath = null;
|
||||
private string _resolvedPath = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -257,14 +257,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
ThrowTerminatingError(error);
|
||||
}
|
||||
|
||||
resolvedPath = resolvedPaths[0];
|
||||
_resolvedPath = resolvedPaths[0];
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(LiteralPath))
|
||||
{
|
||||
// Validate that the path exists
|
||||
SessionState.InvokeProvider.Item.Get(new string[] { LiteralPath }, false, true);
|
||||
resolvedPath = LiteralPath;
|
||||
_resolvedPath = LiteralPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,12 +277,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
if (String.Equals("ByContent", this.ParameterSetName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (contentBuffer.Length > 0)
|
||||
if (_contentBuffer.Length > 0)
|
||||
{
|
||||
contentBuffer.Append(Environment.NewLine);
|
||||
_contentBuffer.Append(Environment.NewLine);
|
||||
}
|
||||
|
||||
contentBuffer.Append(Content);
|
||||
_contentBuffer.Append(Content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,11 +296,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
// Read in the content
|
||||
if (String.Equals("ByContent", this.ParameterSetName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
actualContent = contentBuffer.ToString();
|
||||
actualContent = _contentBuffer.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
actualContent = System.IO.File.ReadAllText(resolvedPath);
|
||||
actualContent = System.IO.File.ReadAllText(_resolvedPath);
|
||||
}
|
||||
|
||||
// Extract out the bytes and Base64 decode them
|
||||
@@ -353,7 +353,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private StringBuilder contentBuffer = new StringBuilder();
|
||||
private StringBuilder _contentBuffer = new StringBuilder();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Windows Event Log Message with contents to be decrypted.
|
||||
@@ -385,7 +385,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
get;
|
||||
set;
|
||||
}
|
||||
private string resolvedPath = null;
|
||||
private string _resolvedPath = null;
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether to include the decrypted content in its original context,
|
||||
@@ -432,14 +432,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
ThrowTerminatingError(error);
|
||||
}
|
||||
|
||||
resolvedPath = resolvedPaths[0];
|
||||
_resolvedPath = resolvedPaths[0];
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(LiteralPath))
|
||||
{
|
||||
// Validate that the path exists
|
||||
SessionState.InvokeProvider.Item.Get(new string[] { LiteralPath }, false, true);
|
||||
resolvedPath = LiteralPath;
|
||||
_resolvedPath = LiteralPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,12 +454,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
// If we're process by content, collect it.
|
||||
if (String.Equals("ByContent", this.ParameterSetName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (contentBuffer.Length > 0)
|
||||
if (_contentBuffer.Length > 0)
|
||||
{
|
||||
contentBuffer.Append(Environment.NewLine);
|
||||
_contentBuffer.Append(Environment.NewLine);
|
||||
}
|
||||
|
||||
contentBuffer.Append(Content);
|
||||
_contentBuffer.Append(Content);
|
||||
}
|
||||
|
||||
// If we're processing event log records, decrypt those inline.
|
||||
@@ -497,11 +497,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
// Read in the content
|
||||
if (String.Equals("ByContent", this.ParameterSetName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
actualContent = contentBuffer.ToString();
|
||||
actualContent = _contentBuffer.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
actualContent = System.IO.File.ReadAllText(resolvedPath);
|
||||
actualContent = System.IO.File.ReadAllText(_resolvedPath);
|
||||
}
|
||||
|
||||
string decrypted = Decrypt(actualContent);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// operations involving security.
|
||||
/// </summary>
|
||||
[Cmdlet(VerbsCommon.Get, "Credential", DefaultParameterSetName = GetCredentialCommand.credentialSet, HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113311")]
|
||||
[OutputType(typeof(PSCredential), ParameterSetName = new string[] { GetCredentialCommand.credentialSet, GetCredentialCommand.messageSet})]
|
||||
[OutputType(typeof(PSCredential), ParameterSetName = new string[] { GetCredentialCommand.credentialSet, GetCredentialCommand.messageSet })]
|
||||
public sealed class GetCredentialCommand : PSCmdlet
|
||||
{
|
||||
/// <summary>
|
||||
@@ -40,15 +40,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return cred;
|
||||
return _cred;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
cred = value;
|
||||
_cred = value;
|
||||
}
|
||||
}
|
||||
private PSCredential cred;
|
||||
private PSCredential _cred;
|
||||
|
||||
/// <summary>
|
||||
/// Gets and sets the user supplied message providing description about which script/function is
|
||||
@@ -57,10 +57,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Mandatory = true, ParameterSetName = messageSet)]
|
||||
public string Message
|
||||
{
|
||||
get { return message; }
|
||||
set { message = value; }
|
||||
get { return _message; }
|
||||
set { _message = value; }
|
||||
}
|
||||
private string message = null;
|
||||
private string _message = null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets and sets the user supplied username to be used while creating the PSCredential.
|
||||
@@ -68,10 +68,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Position = 0, Mandatory = false, ParameterSetName = messageSet)]
|
||||
public string UserName
|
||||
{
|
||||
get { return userName; }
|
||||
set { userName = value; }
|
||||
get { return _userName; }
|
||||
set { _userName = value; }
|
||||
}
|
||||
private string userName = null;
|
||||
private string _userName = null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the GetCredentialCommand
|
||||
@@ -79,7 +79,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
public GetCredentialCommand() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -94,7 +93,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
try
|
||||
{
|
||||
Credential = this.Host.UI.PromptForCredential(caption, message, userName, string.Empty);
|
||||
Credential = this.Host.UI.PromptForCredential(caption, message, _userName, string.Empty);
|
||||
}
|
||||
catch (ArgumentException exception)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
--********************************************************************/
|
||||
|
||||
#region Using directives
|
||||
|
||||
using System;
|
||||
// System.Management.Automation is the namespace which contains the types and
|
||||
// methods pertaining to the Microsoft Command Shell
|
||||
@@ -34,11 +35,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)]
|
||||
public ExecutionPolicyScope Scope
|
||||
{
|
||||
get { return executionPolicyScope; }
|
||||
set { executionPolicyScope = value; scopeSpecified = true; }
|
||||
get { return _executionPolicyScope; }
|
||||
set { _executionPolicyScope = value; _scopeSpecified = true; }
|
||||
}
|
||||
private ExecutionPolicyScope executionPolicyScope = ExecutionPolicyScope.LocalMachine;
|
||||
private bool scopeSpecified = false;
|
||||
private ExecutionPolicyScope _executionPolicyScope = ExecutionPolicyScope.LocalMachine;
|
||||
private bool _scopeSpecified = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the List parameter, which lists all scopes and their execution
|
||||
@@ -47,17 +48,17 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Mandatory = false)]
|
||||
public SwitchParameter List
|
||||
{
|
||||
get { return list; }
|
||||
set { list = value; }
|
||||
get { return _list; }
|
||||
set { _list = value; }
|
||||
}
|
||||
private bool list;
|
||||
private bool _list;
|
||||
|
||||
/// <summary>
|
||||
/// Outputs the execution policy.
|
||||
/// </summary>
|
||||
protected override void BeginProcessing()
|
||||
{
|
||||
if (list && scopeSpecified)
|
||||
if (_list && _scopeSpecified)
|
||||
{
|
||||
string message = ExecutionPolicyCommands.ListAndScopeSpecified;
|
||||
|
||||
@@ -75,7 +76,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
string shellId = base.Context.ShellID;
|
||||
|
||||
if (list)
|
||||
if (_list)
|
||||
{
|
||||
foreach (ExecutionPolicyScope scope in SecuritySupport.ExecutionPolicyScopePreferences)
|
||||
{
|
||||
@@ -91,11 +92,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
WriteObject(outputObject);
|
||||
}
|
||||
|
||||
}
|
||||
else if (scopeSpecified)
|
||||
else if (_scopeSpecified)
|
||||
{
|
||||
WriteObject(SecuritySupport.GetExecutionPolicy(shellId, executionPolicyScope));
|
||||
WriteObject(SecuritySupport.GetExecutionPolicy(shellId, _executionPolicyScope));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -122,10 +122,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true)]
|
||||
public ExecutionPolicy ExecutionPolicy
|
||||
{
|
||||
get { return executionPolicy; }
|
||||
set { executionPolicy = value; }
|
||||
get { return _executionPolicy; }
|
||||
set { _executionPolicy = value; }
|
||||
}
|
||||
private ExecutionPolicy executionPolicy;
|
||||
private ExecutionPolicy _executionPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the scope of the execution policy.
|
||||
@@ -133,10 +133,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)]
|
||||
public ExecutionPolicyScope Scope
|
||||
{
|
||||
get { return executionPolicyScope; }
|
||||
set { executionPolicyScope = value; }
|
||||
get { return _executionPolicyScope; }
|
||||
set { _executionPolicyScope = value; }
|
||||
}
|
||||
private ExecutionPolicyScope executionPolicyScope = ExecutionPolicyScope.LocalMachine;
|
||||
private ExecutionPolicyScope _executionPolicyScope = ExecutionPolicyScope.LocalMachine;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether to force the execution policy change.
|
||||
@@ -147,14 +147,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return force;
|
||||
return _force;
|
||||
}
|
||||
set
|
||||
{
|
||||
force = value;
|
||||
_force = value;
|
||||
}
|
||||
}
|
||||
private SwitchParameter force;
|
||||
private SwitchParameter _force;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the execution policy (validation).
|
||||
@@ -162,8 +162,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
protected override void BeginProcessing()
|
||||
{
|
||||
// Verify they've specified a valid scope
|
||||
if ((executionPolicyScope == ExecutionPolicyScope.UserPolicy) ||
|
||||
(executionPolicyScope == ExecutionPolicyScope.MachinePolicy))
|
||||
if ((_executionPolicyScope == ExecutionPolicyScope.UserPolicy) ||
|
||||
(_executionPolicyScope == ExecutionPolicyScope.MachinePolicy))
|
||||
{
|
||||
string message = ExecutionPolicyCommands.CantSetGroupPolicy;
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
try
|
||||
{
|
||||
SecuritySupport.SetExecutionPolicy(executionPolicyScope, ExecutionPolicy, shellId);
|
||||
SecuritySupport.SetExecutionPolicy(_executionPolicyScope, ExecutionPolicy, shellId);
|
||||
}
|
||||
catch (UnauthorizedAccessException exception)
|
||||
{
|
||||
@@ -240,16 +240,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
#else
|
||||
private bool ShouldProcessPolicyChange(string localPreference)
|
||||
{
|
||||
if(ShouldProcess(localPreference))
|
||||
if (ShouldProcess(localPreference))
|
||||
{
|
||||
// See if we're being invoked directly at the
|
||||
// command line. In that case, give a warning.
|
||||
if(! Force)
|
||||
if (!Force)
|
||||
{
|
||||
// We don't give this warning if we're in a script, or
|
||||
// if we don't have a window handle
|
||||
// (i.e.: PowerShell -command Set-ExecutionPolicy Unrestricted)
|
||||
if(IsProcessInteractive())
|
||||
if (IsProcessInteractive())
|
||||
{
|
||||
string query = ExecutionPolicyCommands.SetExecutionPolicyQuery;
|
||||
string caption = ExecutionPolicyCommands.SetExecutionPolicyCaption;
|
||||
@@ -288,7 +288,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
private bool IsProcessInteractive()
|
||||
{
|
||||
// CommandOrigin != Runspace means it is in a script
|
||||
if(MyInvocation.CommandOrigin != CommandOrigin.Runspace)
|
||||
if (MyInvocation.CommandOrigin != CommandOrigin.Runspace)
|
||||
return false;
|
||||
|
||||
// If we don't own the window handle, we've been invoked
|
||||
@@ -305,10 +305,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
TimeSpan timeSinceStart = DateTime.Now - currentProcess.StartTime;
|
||||
TimeSpan idleTime = timeSinceStart - currentProcess.TotalProcessorTime;
|
||||
|
||||
if(idleTime.TotalSeconds > 1)
|
||||
if (idleTime.TotalSeconds > 1)
|
||||
return true;
|
||||
}
|
||||
catch(System.ComponentModel.Win32Exception)
|
||||
catch (System.ComponentModel.Win32Exception)
|
||||
{
|
||||
// Don't have access to the properties
|
||||
return false;
|
||||
@@ -332,5 +332,4 @@ namespace Microsoft.PowerShell.Commands
|
||||
ThrowTerminatingError(errorRecord);
|
||||
}
|
||||
}//End Class
|
||||
|
||||
}//End namespace
|
||||
@@ -9,7 +9,7 @@ using System.Security;
|
||||
using System.Security.Cryptography;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using Dbg=System.Management.Automation;
|
||||
using Dbg = System.Management.Automation;
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
public abstract class SecureStringCommandBase : PSCmdlet
|
||||
{
|
||||
private SecureString ss;
|
||||
private SecureString _ss;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the secure string to be used by the get- and set-
|
||||
@@ -27,14 +27,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
protected SecureString SecureStringData
|
||||
{
|
||||
get { return ss; }
|
||||
set { ss = value; }
|
||||
get { return _ss; }
|
||||
set { _ss = value; }
|
||||
}
|
||||
|
||||
//
|
||||
// name of this command
|
||||
//
|
||||
string commandName;
|
||||
private string _commandName;
|
||||
|
||||
/// <summary>
|
||||
/// Intitializes a new instance of the SecureStringCommandBase
|
||||
@@ -46,10 +46,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </param>
|
||||
protected SecureStringCommandBase(string name) : base()
|
||||
{
|
||||
commandName = name;
|
||||
_commandName = name;
|
||||
}
|
||||
|
||||
private SecureStringCommandBase() : base() {}
|
||||
private SecureStringCommandBase() : base() { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -64,24 +64,24 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
protected ConvertFromToSecureStringCommandBase(string name) : base(name) { }
|
||||
|
||||
private SecureString secureKey = null;
|
||||
private byte[] key;
|
||||
private SecureString _secureKey = null;
|
||||
private byte[] _key;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SecureString version of the encryption
|
||||
/// key used by the SecureString cmdlets.
|
||||
/// </summary>
|
||||
[Parameter(Position=1, ParameterSetName="Secure")]
|
||||
[Parameter(Position = 1, ParameterSetName = "Secure")]
|
||||
public SecureString SecureKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return secureKey;
|
||||
return _secureKey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
secureKey = value;
|
||||
_secureKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,12 +94,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return key;
|
||||
return _key;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
key = value;
|
||||
_key = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the ExportSecureStringCommand class
|
||||
/// </summary>
|
||||
public ConvertFromSecureStringCommand() : base("ConvertFrom-SecureString") {}
|
||||
public ConvertFromSecureStringCommand() : base("ConvertFrom-SecureString") { }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the secure string to be exported.
|
||||
@@ -132,7 +132,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
return SecureStringData;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
SecureStringData = value;
|
||||
@@ -170,7 +170,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
exportedString = SecureStringHelper.Protect(SecureString);
|
||||
}
|
||||
|
||||
if(encryptionResult != null)
|
||||
if (encryptionResult != null)
|
||||
{
|
||||
// The formatted string is Algorithm Version,
|
||||
// Initialization Vector, Encrypted Data
|
||||
@@ -217,66 +217,66 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the ImportSecureStringCommand class.
|
||||
/// </summary>
|
||||
public ConvertToSecureStringCommand() : base("ConvertTo-SecureString") {}
|
||||
public ConvertToSecureStringCommand() : base("ConvertTo-SecureString") { }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the unsecured string to be imported.
|
||||
/// </summary>
|
||||
///
|
||||
[Parameter(Position=0, ValueFromPipeline = true, Mandatory=true)]
|
||||
[Parameter(Position = 0, ValueFromPipeline = true, Mandatory = true)]
|
||||
public String String
|
||||
{
|
||||
get
|
||||
{
|
||||
return s;
|
||||
return _s;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
s = value;
|
||||
_s = value;
|
||||
}
|
||||
}
|
||||
private string s;
|
||||
private string _s;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the flag that marks the unsecured string as a plain
|
||||
/// text string.
|
||||
/// </summary>
|
||||
///
|
||||
[Parameter(Position=1, ParameterSetName="PlainText")]
|
||||
[Parameter(Position = 1, ParameterSetName = "PlainText")]
|
||||
public SwitchParameter AsPlainText
|
||||
{
|
||||
get
|
||||
{
|
||||
return asPlainText;
|
||||
return _asPlainText;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
asPlainText = value;
|
||||
_asPlainText = value;
|
||||
}
|
||||
}
|
||||
private bool asPlainText;
|
||||
private bool _asPlainText;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the flag that will force the import of a plaintext
|
||||
/// unsecured string.
|
||||
/// </summary>
|
||||
///
|
||||
[Parameter(Position=2, ParameterSetName="PlainText")]
|
||||
[Parameter(Position = 2, ParameterSetName = "PlainText")]
|
||||
public SwitchParameter Force
|
||||
{
|
||||
get
|
||||
{
|
||||
return force;
|
||||
return _force;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
force = value;
|
||||
_force = value;
|
||||
}
|
||||
}
|
||||
private bool force;
|
||||
private bool _force;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -288,7 +288,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
SecureString importedString = null;
|
||||
|
||||
Utils.CheckArgForNullOrEmpty(s, "String");
|
||||
Utils.CheckArgForNullOrEmpty(_s, "String");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -296,7 +296,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
byte[] iv = null;
|
||||
|
||||
// If this is a V2 package
|
||||
if(String.IndexOf(SecureStringHelper.SecureStringExportHeader,
|
||||
if (String.IndexOf(SecureStringHelper.SecureStringExportHeader,
|
||||
StringComparison.OrdinalIgnoreCase) == 0)
|
||||
{
|
||||
try
|
||||
@@ -313,13 +313,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
string dataPackage = System.Text.Encoding.Unicode.GetString(inputBytes);
|
||||
string[] dataElements = dataPackage.Split(Utils.Separators.Pipe);
|
||||
|
||||
if(dataElements.Length == 3)
|
||||
if (dataElements.Length == 3)
|
||||
{
|
||||
encryptedContent = dataElements[2];
|
||||
iv = Convert.FromBase64String(dataElements[1]);
|
||||
}
|
||||
}
|
||||
catch(FormatException)
|
||||
catch (FormatException)
|
||||
{
|
||||
// Will be raised if we can't convert the
|
||||
// input from a Base64 string. This means
|
||||
@@ -338,17 +338,17 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
importedString = SecureStringHelper.Decrypt(encryptedContent, Key, iv);
|
||||
}
|
||||
else if(! AsPlainText)
|
||||
else if (!AsPlainText)
|
||||
{
|
||||
importedString = SecureStringHelper.Unprotect(String);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(! Force)
|
||||
if (!Force)
|
||||
{
|
||||
String error =
|
||||
SecureStringCommands.ForceRequired;
|
||||
Exception e = new ArgumentException (error);
|
||||
Exception e = new ArgumentException(error);
|
||||
WriteError(new ErrorRecord(e, "ImportSecureString_ForceRequired", ErrorCategory.InvalidArgument, null));
|
||||
}
|
||||
else
|
||||
@@ -358,7 +358,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
// -AsPlainText and -Force flags, they consciously have made the decision to be OK
|
||||
// with that.
|
||||
importedString = new SecureString();
|
||||
foreach(char currentChar in String) { importedString.AppendChar(currentChar); }
|
||||
foreach (char currentChar in String) { importedString.AppendChar(currentChar); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Internal;
|
||||
using Dbg=System.Management.Automation.Diagnostics;
|
||||
using Dbg = System.Management.Automation.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
@@ -17,7 +17,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using DWORD = System.UInt32;
|
||||
using DWORD = System.UInt32;
|
||||
|
||||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
@@ -36,15 +36,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
_path = value;
|
||||
}
|
||||
}
|
||||
private string[] path;
|
||||
private string[] _path;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the literal path to the file for which to get or set the
|
||||
@@ -57,16 +57,16 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
return _path;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
isLiteralPath = true;
|
||||
_path = value;
|
||||
_isLiteralPath = true;
|
||||
}
|
||||
}
|
||||
bool isLiteralPath = false;
|
||||
private bool _isLiteralPath = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the digital signature to be written to
|
||||
@@ -74,10 +74,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
protected Signature Signature
|
||||
{
|
||||
get { return signature; }
|
||||
set { signature = value; }
|
||||
get { return _signature; }
|
||||
set { _signature = value; }
|
||||
}
|
||||
private Signature signature;
|
||||
private Signature _signature;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the file type of the byte array containing the content with
|
||||
@@ -118,7 +118,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
//
|
||||
// name of this command
|
||||
//
|
||||
string commandName;
|
||||
private string _commandName;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the SignatureCommandsBase class,
|
||||
@@ -130,13 +130,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </param>
|
||||
protected SignatureCommandsBase(string name) : base()
|
||||
{
|
||||
commandName = name;
|
||||
_commandName = name;
|
||||
}
|
||||
|
||||
//
|
||||
// hide default ctor
|
||||
//
|
||||
private SignatureCommandsBase() : base() {}
|
||||
private SignatureCommandsBase() : base() { }
|
||||
|
||||
/// <summary>
|
||||
/// Processes records from the input pipeline.
|
||||
@@ -160,7 +160,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
Collection<string> paths = new Collection<string>();
|
||||
|
||||
// Expand wildcard characters
|
||||
if (isLiteralPath)
|
||||
if (_isLiteralPath)
|
||||
{
|
||||
paths.Add(SessionState.Path.GetUnresolvedProviderPathFromPSPath(p));
|
||||
}
|
||||
@@ -208,7 +208,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
WriteObject(Signature);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
WriteError(SecurityUtils.CreateFileNotFoundErrorRecord(
|
||||
SignatureCommands.CannotRetrieveFromContainer,
|
||||
"SignatureCommandsBaseCannotRetrieveFromContainer"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -320,15 +320,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return certificate;
|
||||
return _certificate;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
certificate = value;
|
||||
_certificate = value;
|
||||
}
|
||||
}
|
||||
private X509Certificate2 certificate;
|
||||
private X509Certificate2 _certificate;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the additional certificates to
|
||||
@@ -347,15 +347,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return includeChain;
|
||||
return _includeChain;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
includeChain = value;
|
||||
_includeChain = value;
|
||||
}
|
||||
}
|
||||
private string includeChain = "notroot";
|
||||
private string _includeChain = "notroot";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Url of the time stamping server.
|
||||
@@ -367,7 +367,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return timestampServer;
|
||||
return _timestampServer;
|
||||
}
|
||||
|
||||
set
|
||||
@@ -376,10 +376,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
value = String.Empty;
|
||||
}
|
||||
timestampServer = value;
|
||||
_timestampServer = value;
|
||||
}
|
||||
}
|
||||
private string timestampServer = "";
|
||||
private string _timestampServer = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the hash algorithm used for signing.
|
||||
@@ -391,15 +391,15 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return hashAlgorithm;
|
||||
return _hashAlgorithm;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
hashAlgorithm = value;
|
||||
_hashAlgorithm = value;
|
||||
}
|
||||
}
|
||||
private string hashAlgorithm = null;
|
||||
private string _hashAlgorithm = null;
|
||||
|
||||
/// <summary>
|
||||
/// Property that sets force parameter.
|
||||
@@ -409,14 +409,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
get
|
||||
{
|
||||
return force;
|
||||
return _force;
|
||||
}
|
||||
set
|
||||
{
|
||||
force = value;
|
||||
_force = value;
|
||||
}
|
||||
}
|
||||
private bool force;
|
||||
private bool _force;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the digital signature on the specified file.
|
||||
@@ -559,7 +559,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
filePath,
|
||||
Certificate,
|
||||
TimestampServer,
|
||||
hashAlgorithm);
|
||||
_hashAlgorithm);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -595,7 +595,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// association between SigningOption.* values and the
|
||||
/// corresponding string names.
|
||||
/// </summary>
|
||||
private static readonly SigningOptionInfo[] sigOptionInfo =
|
||||
private static readonly SigningOptionInfo[] s_sigOptionInfo =
|
||||
{
|
||||
new SigningOptionInfo(SigningOption.AddOnlyCertificate, "signer"),
|
||||
new SigningOptionInfo(SigningOption.AddFullCertificateChainExceptRoot, "notroot"),
|
||||
@@ -612,7 +612,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
///
|
||||
private static SigningOption GetSigningOption(string optionName)
|
||||
{
|
||||
foreach (SigningOptionInfo si in sigOptionInfo)
|
||||
foreach (SigningOptionInfo si in s_sigOptionInfo)
|
||||
{
|
||||
if (String.Equals(optionName, si.optionName,
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
@@ -17,8 +17,8 @@ using System.Security.Cryptography.X509Certificates;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using DWORD = System.UInt32;
|
||||
using BOOL = System.UInt32;
|
||||
using DWORD = System.UInt32;
|
||||
using BOOL = System.UInt32;
|
||||
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
|
||||
|
||||
namespace Microsoft.PowerShell
|
||||
|
||||
@@ -4,7 +4,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
|
||||
using System;
|
||||
using Dbg=System.Management.Automation;
|
||||
using Dbg = System.Management.Automation;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Initializes a new instance of the CertificateProviderItemNotFoundException
|
||||
/// class with the default message.
|
||||
/// </summary>
|
||||
public CertificateProviderItemNotFoundException () : base()
|
||||
public CertificateProviderItemNotFoundException() : base()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The inner exception to be included in the exception.
|
||||
/// </param>
|
||||
internal CertificateProviderItemNotFoundException(Exception innerException)
|
||||
: base (innerException.Message, innerException)
|
||||
: base(innerException.Message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The inner exception to be included in the exception.
|
||||
/// </param>
|
||||
internal CertificateNotFoundException(Exception innerException)
|
||||
: base (innerException.Message, innerException)
|
||||
: base(innerException.Message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The inner exception to be included in the exception.
|
||||
/// </param>
|
||||
internal CertificateStoreNotFoundException(Exception innerException)
|
||||
: base (innerException.Message, innerException)
|
||||
: base(innerException.Message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The inner exception to be included in the exception.
|
||||
/// </param>
|
||||
internal CertificateStoreLocationNotFoundException(Exception innerException)
|
||||
: base (innerException.Message, innerException)
|
||||
: base(innerException.Message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user