mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-12-03 23:03:57 +08:00
Merge pull request #2105 from jsoref/spelling-comments
Spelling comments
This commit is contained in:
commit
cc9f2570d6
@ -6281,7 +6281,7 @@ $result
|
||||
private const string MatchFormat = "{0}:{1}";
|
||||
|
||||
/// <summary>
|
||||
/// The HasSuceeded which shows the operation was success or not
|
||||
/// The HasSucceeded which shows the operation was success or not
|
||||
/// </summary>
|
||||
public bool HasSucceeded { get; set; }
|
||||
|
||||
|
@ -179,7 +179,7 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets {
|
||||
}
|
||||
}
|
||||
|
||||
return Constants.DefaultTimeout; // in a non-invokcation, always default to one hour
|
||||
return Constants.DefaultTimeout; // in a non-invocation, always default to one hour
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return Constants.DefaultResponsiveness; // in a non-invokcation, always default to one hour
|
||||
return Constants.DefaultResponsiveness; // in a non-invocation, always default to one hour
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Microsoft.WSMan.Management
|
||||
private PSObject objPluginNames = null;
|
||||
|
||||
/// <summary>
|
||||
/// Determinies if Set-Item user input type validateion is required or not.
|
||||
/// Determines if Set-Item user input type validation is required or not.
|
||||
/// It is True by default, Clear-Item will set it to false so that it can
|
||||
/// pass Empty String as value for Set-Item.
|
||||
/// </summary>
|
||||
@ -42,7 +42,7 @@ namespace Microsoft.WSMan.Management
|
||||
WSManHelper helper = new WSManHelper();
|
||||
|
||||
/// <summary>
|
||||
/// Object contains the cache of the enumarate results for the cmdlet to execute.
|
||||
/// Object contains the cache of the enumerate results for the cmdlet to execute.
|
||||
/// </summary>
|
||||
Dictionary<string, XmlDocument> enumarateMapping = new Dictionary<string, XmlDocument>();
|
||||
|
||||
@ -196,7 +196,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the requird drive
|
||||
/// Adds the required drive
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override Collection<PSDriveInfo> InitializeDefaultDrives()
|
||||
@ -208,7 +208,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the requird drive
|
||||
/// Removes the required drive
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override PSDriveInfo RemoveDrive(PSDriveInfo drive)
|
||||
@ -223,9 +223,9 @@ namespace Microsoft.WSMan.Management
|
||||
#region ItemCmdletProvider
|
||||
|
||||
/// <summary>
|
||||
/// Get a Child Name. This methos is called from MakePath method.
|
||||
/// Get a Child Name. This method is called from MakePath method.
|
||||
/// This Method helps in getting the correct case of particular element in the provider path.
|
||||
/// XML is case senstive but Powershell is not.
|
||||
/// XML is case sensitive but Powershell is not.
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
@ -391,7 +391,7 @@ namespace Microsoft.WSMan.Management
|
||||
/*
|
||||
WsMan Config Can be divided in to Four Fixed Regions to Check Whether it has Child Items.
|
||||
|
||||
* 1. Branch in to Listerners (winrm/config/listener)
|
||||
* 1. Branch in to Listeners (winrm/config/listener)
|
||||
* 2. Branch in to CertMapping (winrm/config/service/certmapping)
|
||||
* 3. Branch in to Plugin (winrm/config/plugin) - Plugin is subdivided in Resources,Security & InitParams
|
||||
* 4. Rest all the branches like Client, Shell(WinRS) ,Service
|
||||
@ -1314,7 +1314,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This commad is used to clear the value of a item.
|
||||
/// This command is used to clear the value of a item.
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
protected override void ClearItem(string path)
|
||||
@ -1366,7 +1366,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method gives the names of child items. this is used for Tab compeletion.
|
||||
/// This method gives the names of child items. this is used for Tab completion.
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="returnContainers"></param>
|
||||
@ -1427,7 +1427,7 @@ namespace Microsoft.WSMan.Management
|
||||
/*
|
||||
WsMan Config Can be divided in to Four Fixed Regions to Check Whether Item is Container
|
||||
|
||||
* 1. Branch in to Listerners (winrm/config/listener)
|
||||
* 1. Branch in to Listeners (winrm/config/listener)
|
||||
* 2. Branch in to CertMapping (winrm/config/service/certmapping)
|
||||
* 3. Branch in to Plugin (winrm/config/plugin) - Plugin is subdivided in Resources,Security & InitParams
|
||||
* 4. Rest all the branches like Client, Shell(WinRS) ,Service
|
||||
@ -3016,7 +3016,7 @@ namespace Microsoft.WSMan.Management
|
||||
if (!prop.Value.ToString().Equals(WSManStringLiterals.ContainerChildValue))
|
||||
{
|
||||
// This path is used by WriteItemObject to construct PSPath.
|
||||
// PSPath is a provider quailified path and we dont need to specify
|
||||
// PSPath is a provider qualified path and we dont need to specify
|
||||
// provider root in this path..So I am trying to eliminate provider root
|
||||
// in this case.
|
||||
string pathToUse = WSManStringLiterals.rootpath.Equals(path, StringComparison.OrdinalIgnoreCase) ?
|
||||
@ -3027,7 +3027,7 @@ namespace Microsoft.WSMan.Management
|
||||
else
|
||||
{
|
||||
// This path is used by WriteItemObject to construct PSPath.
|
||||
// PSPath is a provider quailified path and we dont need to specify
|
||||
// PSPath is a provider qualified path and we dont need to specify
|
||||
// provider root in this path..So I am trying to eliminate provider root
|
||||
// in this case.
|
||||
string pathToUse = WSManStringLiterals.rootpath.Equals(path, StringComparison.OrdinalIgnoreCase) ?
|
||||
@ -3292,13 +3292,13 @@ namespace Microsoft.WSMan.Management
|
||||
/// Given wsman config path, gets the value of the leaf present.
|
||||
/// If path is not valid or not present throws an exception.
|
||||
///
|
||||
/// Currently this supports only retreiving Rescource_XXXX dir contents.
|
||||
/// Currently this supports only retrieving Resource_XXXX dir contents.
|
||||
/// if you need support at other levels implement them.
|
||||
/// Example resource dir: WSMan:\localhost\Plugin\someplugin\Resources\Resource_XXXXXXX
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns>
|
||||
/// A PSObject representing the contents of the path if successfull,
|
||||
/// A PSObject representing the contents of the path if successful,
|
||||
/// Otherwise null.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentException">
|
||||
@ -3381,7 +3381,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
else
|
||||
{
|
||||
// Currently this supports only retreiving Rescource_XXXX dir contents.
|
||||
// Currently this supports only retrieving Resource_XXXX dir contents.
|
||||
// if you need support at other levels implement them.
|
||||
// Example resource dir: WSMan:\localhost\Plugin\someplugin\Resources\Resource_67830040
|
||||
string filter = uri + "?Name=" + currentpluginname;
|
||||
@ -3695,7 +3695,7 @@ namespace Microsoft.WSMan.Management
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a Listerner or ClientCertificate object. Used by Remove-Item cmdlets.
|
||||
/// Removes a Listener or ClientCertificate object. Used by Remove-Item cmdlets.
|
||||
/// </summary>
|
||||
/// <param name="sessionobj"></param>
|
||||
/// <param name="WsManUri"></param>
|
||||
@ -4409,7 +4409,7 @@ namespace Microsoft.WSMan.Management
|
||||
{
|
||||
PluginNames.Properties.Add(new PSNoteProperty(e.Attributes[i].Value, WSManStringLiterals.ContainerChildValue));
|
||||
|
||||
// If the path contains \plugin and splitLength is greater than 3 then splitLenght[2] will be plugin Name.
|
||||
// If the path contains \plugin and splitLength is greater than 3 then splitLength[2] will be plugin Name.
|
||||
if (splitPath.Length >= 3 && splitPath[2].Equals(e.Attributes[i].Value, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
CurrentPluginName = e.Attributes[i].Value;
|
||||
@ -4575,7 +4575,7 @@ namespace Microsoft.WSMan.Management
|
||||
&& attribute.Key.ToString().Equals("Port", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// we add the Port number when generating the name in order
|
||||
// be distinguish compatiblity listeners which might have the same
|
||||
// be distinguish compatibility listeners which might have the same
|
||||
// real key (address and port) as a real listener
|
||||
sbHashKey.Append(attribute.Key.ToString());
|
||||
sbHashKey.Append(WSManStringLiterals.Equalto);
|
||||
@ -5460,7 +5460,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
@ -5599,7 +5599,7 @@ namespace Microsoft.WSMan.Management
|
||||
private PSCredential runAsCredentials;
|
||||
|
||||
/// <summary>
|
||||
/// Parameter for Plugin Host Process configuration (Shared or Saperate).
|
||||
/// Parameter for Plugin Host Process configuration (Shared or Separate).
|
||||
/// </summary>
|
||||
[Parameter()]
|
||||
public SwitchParameter UseSharedProcess
|
||||
@ -5810,7 +5810,7 @@ namespace Microsoft.WSMan.Management
|
||||
#region Listener Dynamic Parameters
|
||||
|
||||
/// <summary>
|
||||
/// Listener Dyanamic parameters
|
||||
/// Listener Dynamic parameters
|
||||
/// Path - WsMan:\Localhost\Listener>
|
||||
/// </summary>
|
||||
public class WSManProvidersListenerParameters
|
||||
@ -6091,15 +6091,15 @@ namespace Microsoft.WSMan.Management
|
||||
/// </summary>
|
||||
internal const string containerService = "Service";
|
||||
/// <summary>
|
||||
/// Auth Container - Under Client,Serive
|
||||
/// Auth Container - Under Client,Service
|
||||
/// </summary>
|
||||
internal const string containerAuth = "Auth";
|
||||
/// <summary>
|
||||
/// DefaultPorts Container - Under Client,Serive
|
||||
/// DefaultPorts Container - Under Client,Service
|
||||
/// </summary>
|
||||
internal const string containerDefaultPorts = "DefaultPorts";
|
||||
/// <summary>
|
||||
/// TrustedHosts Container - Under Client,Serive
|
||||
/// TrustedHosts Container - Under Client,Service
|
||||
/// </summary>
|
||||
internal const string containerTrustedHosts = "TrustedHosts";
|
||||
/// <summary>
|
||||
@ -6177,7 +6177,7 @@ namespace Microsoft.WSMan.Management
|
||||
internal const string ConfigRunAsUserName = "RunAsUser";
|
||||
|
||||
/// <summary>
|
||||
/// Name of the configuration which represents if HostProcess is shared or saperate.
|
||||
/// Name of the configuration which represents if HostProcess is shared or separate.
|
||||
/// </summary>
|
||||
internal const string ConfigUseSharedProcess = "UseSharedProcess";
|
||||
|
||||
@ -6371,7 +6371,7 @@ $_ | Start-WSManServiceD15A7957836142a18627D7E1D342DD82 -force $args[0] -caption
|
||||
|
||||
|
||||
|
||||
#endregion "WsMan Outpu tObjects"
|
||||
#endregion "WsMan Output Objects"
|
||||
|
||||
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// an application to delegate the user's credentials from the client to the
|
||||
/// server, hence allowing the user to perform management operations that access
|
||||
/// a second hop.
|
||||
/// This cmdlt performs the following:
|
||||
/// This cmdlet performs the following:
|
||||
///
|
||||
/// On the client:
|
||||
/// 1. Enables WSMan local configuration on client to enable CredSSP
|
||||
@ -547,7 +547,7 @@ namespace Microsoft.WSMan.Management
|
||||
return dyanmicParameters;
|
||||
}
|
||||
|
||||
// Construct attributes for the DelegateComputer paramter
|
||||
// Construct attributes for the DelegateComputer parameter
|
||||
Collection<Attribute> delegateComputerAttributeCollection = new Collection<Attribute>();
|
||||
ParameterAttribute paramAttribute = new ParameterAttribute();
|
||||
paramAttribute.Mandatory = true;
|
||||
@ -848,7 +848,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// enables an application to delegate the user's credentials from the client to
|
||||
/// the server, hence allowing the user to perform management operations that
|
||||
/// access a second hop.
|
||||
/// This cmdlt performs the following:
|
||||
/// This cmdlet performs the following:
|
||||
/// 1. Gets the configuration for WSMan policy on client to enable/disable
|
||||
/// CredSSP
|
||||
/// 2. Gets the configuration information for the CredSSP policy
|
||||
|
@ -41,7 +41,7 @@ namespace Microsoft.WSMan.Management
|
||||
private XmlDocument rootDocument;
|
||||
|
||||
/// <summary>
|
||||
/// Holds the referance to the current document element.
|
||||
/// Holds the reference to the current document element.
|
||||
/// </summary>
|
||||
private XmlElement documentElement;
|
||||
|
||||
@ -89,7 +89,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// Refresh the CurrentConfiguration. This method calls GET operation for the given
|
||||
/// URI on the server and update the current configuraition. It also intialize some
|
||||
/// URI on the server and update the current configuration. It also initialize some
|
||||
/// of required class members.
|
||||
/// </summary>
|
||||
/// <param name="responseOfGet">Plugin configuration.</param>
|
||||
@ -115,7 +115,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// Issues a PUT request with the ResourceUri provided.
|
||||
/// </summary>
|
||||
/// <param name="resourceUri">Resource URI to use.</param>
|
||||
/// <returns>Fales, if operation is not succesful.</returns>
|
||||
/// <returns>False, if operation is not succesful.</returns>
|
||||
public void PutConfiguraitonOnServer(string resourceUri)
|
||||
{
|
||||
if (String.IsNullOrEmpty(resourceUri))
|
||||
|
@ -153,7 +153,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// </summary>
|
||||
Digest = 0x2,
|
||||
/// <summary>
|
||||
/// Use negotiate authentication for a remote operation (may use kerboros or ntlm)
|
||||
/// Use negotiate authentication for a remote operation (may use kerberos or ntlm)
|
||||
/// </summary>
|
||||
Negotiate = 0x4,
|
||||
/// <summary>
|
||||
|
@ -178,7 +178,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
|
@ -180,7 +180,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UnEncrypted".
|
||||
/// Specifies that no encryption will be used when doing remote operations over
|
||||
/// http. Unencrypted traffix is not allowed by default and must be enabled in
|
||||
/// http. Unencrypted traffic is not allowed by default and must be enabled in
|
||||
/// the local configuration
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
|
@ -98,7 +98,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
|
@ -214,7 +214,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
|
@ -341,7 +341,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
@ -371,7 +371,7 @@ namespace Microsoft.WSMan.Management
|
||||
string[] Split = filter.Trim().Split(new Char[] { '=', ';' });
|
||||
if ((Split.Length)%2 != 0)
|
||||
{
|
||||
//missmatched property name/value pair
|
||||
//mismatched property name/value pair
|
||||
return null;
|
||||
}
|
||||
filter = "<wsman:SelectorSet xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>";
|
||||
@ -787,7 +787,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
@ -1097,7 +1097,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
@ -1360,7 +1360,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// The following is the definition of the input parameter "UseSSL".
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connnection to
|
||||
/// Uses the Secure Sockets Layer (SSL) protocol to establish a connection to
|
||||
/// the remote computer. If SSL is not available on the port specified by the
|
||||
/// Port parameter, the command fails.
|
||||
/// </summary>
|
||||
|
@ -203,7 +203,7 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// add a session to dictioanry
|
||||
/// add a session to dictionary
|
||||
/// </summary>
|
||||
/// <param name="key">connection string</param>
|
||||
/// <param name="value">session object</param>
|
||||
@ -408,7 +408,7 @@ namespace Microsoft.WSMan.Management
|
||||
string parameters = null, nilns = null;
|
||||
string xmlns = GetXmlNs(resourceUri.ResourceUri);
|
||||
|
||||
//if valueset is given, i.e hastable
|
||||
//if valueset is given, i.e hashtable
|
||||
if (valueset != null)
|
||||
{
|
||||
foreach (DictionaryEntry entry in valueset)
|
||||
@ -619,7 +619,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// Used to resolve authentication from the parameters chosen by the user.
|
||||
/// User has the following options:
|
||||
/// 1. AuthMechanism + Credential
|
||||
/// 2. CertiticateThumbPrint
|
||||
/// 2. CertificateThumbPrint
|
||||
///
|
||||
/// All the above are mutually exclusive.
|
||||
/// </summary>
|
||||
@ -982,7 +982,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// Verifies all the registry keys are set as expected. In case of failure .. try ecery second for 60 seconds before returning false.
|
||||
/// </summary>
|
||||
/// <param name="AllowFreshCredentialsValueShouldBePresent">True if trying to Enable CredSSP.</param>
|
||||
/// <param name="DelegateComputer">Names of the degate computer.</param>
|
||||
/// <param name="DelegateComputer">Names of the delegate computer.</param>
|
||||
/// <param name="applicationname">Name of the application.</param>
|
||||
/// <returns>True if valid.</returns>
|
||||
internal bool ValidateCreadSSPRegistryRetry(bool AllowFreshCredentialsValueShouldBePresent, string[] DelegateComputer, string applicationname)
|
||||
|
@ -29,7 +29,7 @@
|
||||
name : moved to commandDetails
|
||||
verb : moved to commandDetails
|
||||
noun : moved to commandDetails
|
||||
? Synposis : mapped to commandDetails.CommandDescription
|
||||
? Synopsis : mapped to commandDetails.CommandDescription
|
||||
-->
|
||||
<!-- [gxie] items added:
|
||||
keywords
|
||||
@ -102,7 +102,7 @@
|
||||
<sequence>
|
||||
<element name="synonym" type="maml:textType" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
<!-- [gxie] ? what is usage of contentIdentficationsSharingAndConditionGroup-->
|
||||
<!-- [gxie] ? what is usage of contentIdentificationSharingAndConditionGroup-->
|
||||
<attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
@ -108,7 +108,7 @@ namespace System.Management.Automation
|
||||
get
|
||||
{
|
||||
// Need to lookup the referenced command every time
|
||||
// to ensure we get the lastest session state information
|
||||
// to ensure we get the latest session state information
|
||||
|
||||
CommandInfo referencedCommand = null;
|
||||
|
||||
@ -186,7 +186,7 @@ namespace System.Management.Automation
|
||||
if (result == null)
|
||||
{
|
||||
// Since we couldn't resolve the command that the alias
|
||||
// points to, remember the defintion so that we can
|
||||
// points to, remember the definition so that we can
|
||||
// provide better error reporting.
|
||||
|
||||
UnresolvedCommandName = commandNameToResolve;
|
||||
|
@ -582,7 +582,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiailizes a new instance of the AliasAttribute class
|
||||
/// Initializes a new instance of the AliasAttribute class
|
||||
/// </summary>
|
||||
/// <param name="aliasNames">The name for this alias</param>
|
||||
/// <exception cref="ArgumentException">for invalid arguments</exception>
|
||||
@ -604,7 +604,7 @@ namespace System.Management.Automation
|
||||
public sealed class ParameterAttribute : ParsingBaseAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// ParameterSetName refering to all ParameterSets
|
||||
/// ParameterSetName referring to all ParameterSets
|
||||
/// </summary>
|
||||
public const string AllParameterSets = "__AllParameterSets";
|
||||
|
||||
@ -690,7 +690,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and sets the base name of the resource for a help message. When this field is speicifed,
|
||||
/// Gets and sets the base name of the resource for a help message. When this field is specified,
|
||||
/// HelpMessageResourceId must also be specified.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">for a null or empty value when setting</exception>
|
||||
@ -711,7 +711,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and sets the Id of the resource for a help message. When this field is speicifed,
|
||||
/// Gets and sets the Id of the resource for a help message. When this field is specified,
|
||||
/// HelpMessageBaseName must also be specified.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">for a null or empty value when setting</exception>
|
||||
@ -989,7 +989,7 @@ namespace System.Management.Automation
|
||||
/// <param name="maxRange">Maximum value of the range allowed. </param>
|
||||
/// <exception cref="ArgumentNullException">for invalid arguments</exception>
|
||||
/// <exception cref="ValidationMetadataException">
|
||||
/// if maxRange has a differnet type than minRange
|
||||
/// if maxRange has a different type than minRange
|
||||
/// if maxRange is smaller than minRange
|
||||
/// if maxRange, minRange are not IComparable
|
||||
/// </exception>
|
||||
@ -1241,7 +1241,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
/// <exception cref="ValidationMetadataException">
|
||||
/// if the element is none of ICollection, IEnumerable, IList, IEnumerator
|
||||
/// if the element's lenght is not between MinLength and MAxLEngth
|
||||
/// if the element's length is not between MinLength and MAxLEngth
|
||||
/// </exception>
|
||||
protected override void Validate(object arguments, EngineIntrinsics engineIntrinsics)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to DoGetProperty</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
ComProperty prop = (ComProperty)property.adapterData;
|
||||
|
@ -258,7 +258,7 @@ namespace System.Management.Automation
|
||||
/// <returns>ITypeInfo reference to the Dispatch interface </returns>
|
||||
internal static COM.ITypeInfo GetDispatchTypeInfoFromCoClassTypeInfo(COM.ITypeInfo typeinfo)
|
||||
{
|
||||
//Get the number of interfaces implmented by this CoClass.
|
||||
//Get the number of interfaces implemented by this CoClass.
|
||||
COM.TYPEATTR typeattr = GetTypeAttr(typeinfo);
|
||||
int count = typeattr.cImplTypes;
|
||||
int href;
|
||||
|
@ -30,7 +30,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="typeinfo">ITypeInfo interface of the object</param>
|
||||
/// <param name="funcdesc">FuncDesc which defines the method</param>
|
||||
/// <param name="isPropertyPut">True if this is a property put; these properties take their return type from their first paramenter</param>
|
||||
/// <param name="isPropertyPut">True if this is a property put; these properties take their return type from their first parameter</param>
|
||||
/// <returns>signature of the method</returns>
|
||||
internal static string GetMethodSignatureFromFuncDesc(COM.ITypeInfo typeinfo, COM.FUNCDESC funcdesc, bool isPropertyPut)
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ namespace System.Management.Automation
|
||||
|
||||
foreach (MergedCompiledCommandParameter parameter in UnboundParameters)
|
||||
{
|
||||
// If a prarameter doesn't take pipeline input at all, we can skip it
|
||||
// If a parameter doesn't take pipeline input at all, we can skip it
|
||||
if (!parameter.Parameter.IsPipelineParameterInSomeParameterSet)
|
||||
{
|
||||
continue;
|
||||
@ -363,7 +363,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply the binding for the defualt parameter defined by the user
|
||||
/// Apply the binding for the default parameter defined by the user
|
||||
/// </summary>
|
||||
/// <param name="bindingStage">
|
||||
/// Dictate which binding stage this default binding happens
|
||||
@ -413,7 +413,7 @@ namespace System.Management.Automation
|
||||
/// <param name="validParameterSetFlag">validParameterSetFlag</param>
|
||||
/// <param name="defaultParameterValues">default value pairs</param>
|
||||
/// <returns>
|
||||
/// true if there is at least one default parameter bound scucessfully
|
||||
/// true if there is at least one default parameter bound successfully
|
||||
/// false if there is no default parameter bound successfully
|
||||
/// </returns>
|
||||
private bool BindDefaultParameters(uint validParameterSetFlag, Dictionary<MergedCompiledCommandParameter, object> defaultParameterValues)
|
||||
@ -554,7 +554,7 @@ namespace System.Management.Automation
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if this param's set confilcts with other possible params.
|
||||
// check if this param's set conflicts with other possible params.
|
||||
if (param.Parameter.ParameterSetFlags != 0)
|
||||
{
|
||||
possibleParameterFlag &= param.Parameter.ParameterSetFlags;
|
||||
@ -876,7 +876,7 @@ namespace System.Management.Automation
|
||||
/// Verify if all arguments from the command line are bound.
|
||||
/// </summary>
|
||||
/// <param name="originalBindingException">
|
||||
/// Previous binding exceptions that possiblly causes the failure
|
||||
/// Previous binding exceptions that possibly causes the failure
|
||||
/// </param>
|
||||
private void VerifyArgumentsProcessed(ParameterBindingException originalBindingException)
|
||||
{
|
||||
@ -2037,7 +2037,7 @@ namespace System.Management.Automation
|
||||
//
|
||||
// We ignore those parameter sets that contain unbound mandatory parameters, but leave
|
||||
// all other parameter sets remain valid. The other parameter sets contains the default
|
||||
// parameter set and have one characeristic: NONE of them contain unbound mandatory parameters
|
||||
// parameter set and have one characteristic: NONE of them contain unbound mandatory parameters
|
||||
//
|
||||
// Comparing to the old algorithm, we keep more possible parameter sets here, but
|
||||
// we need to prioritize the default parameter set for pipeline binding, so as NOT to
|
||||
@ -2932,7 +2932,7 @@ namespace System.Management.Automation
|
||||
} // AtLeastOneValidParameterSetTakesPipelineInput
|
||||
|
||||
/// <summary>
|
||||
/// Checks for unbound mandatory paramters. If any are found, an exception is thrown.
|
||||
/// Checks for unbound mandatory parameters. If any are found, an exception is thrown.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="missingMandatoryParameters">
|
||||
@ -2953,7 +2953,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks for unbound mandatory paramters. If any are found and promptForMandatory is true,
|
||||
/// Checks for unbound mandatory parameters. If any are found and promptForMandatory is true,
|
||||
/// the user will be prompted for the missing mandatory parameters.
|
||||
/// </summary>
|
||||
///
|
||||
@ -3358,7 +3358,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
// Reset the default values
|
||||
// This prevents the last pipeline object from being bound during EndProcessing
|
||||
// if it failed some post binding varification step.
|
||||
// if it failed some post binding verification step.
|
||||
this.RestoreDefaultParameterValues(ParametersBoundThroughPipelineInput);
|
||||
|
||||
// Let the parameter binding errors propagate out
|
||||
@ -3374,7 +3374,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
// Reset the default values
|
||||
// This prevents the last pipeline object from being bound during EndProcessing
|
||||
// if it failed some post binding varification step.
|
||||
// if it failed some post binding verification step.
|
||||
this.RestoreDefaultParameterValues(ParametersBoundThroughPipelineInput);
|
||||
|
||||
throw;
|
||||
@ -3384,7 +3384,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
// Reset the default values
|
||||
// This prevents the last pipeline object from being bound during EndProcessing
|
||||
// if it failed some post binding varification step.
|
||||
// if it failed some post binding verification step.
|
||||
this.RestoreDefaultParameterValues(ParametersBoundThroughPipelineInput);
|
||||
}
|
||||
return result;
|
||||
@ -4229,7 +4229,7 @@ namespace System.Management.Automation
|
||||
private class DelayedScriptBlockArgument
|
||||
{
|
||||
// Remember the parameter binder so we know when to invoke the script block
|
||||
// and when to use the evaluted argument.
|
||||
// and when to use the evaluated argument.
|
||||
internal CmdletParameterBinderController _parameterBinder;
|
||||
internal CommandParameterInternal _argument;
|
||||
internal Collection<PSObject> _evaluatedArgument;
|
||||
@ -4756,7 +4756,7 @@ namespace System.Management.Automation
|
||||
/// When the name is not enclosed by quotes, the index returned should be the index of the separator;
|
||||
///
|
||||
/// For parameterName:
|
||||
/// When the name is enclosed by quotes, the index returned should be the index of the seocnd quote plus 1 (the length of the key if the key is in a valid format);
|
||||
/// When the name is enclosed by quotes, the index returned should be the index of the second quote plus 1 (the length of the key if the key is in a valid format);
|
||||
/// When the name is not enclosed by quotes, the index returned should be the length of the key.
|
||||
///
|
||||
/// </returns>
|
||||
|
@ -14,7 +14,7 @@ using Dbg = System.Management.Automation.Diagnostics;
|
||||
namespace Microsoft.PowerShell
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains auxilliary ToString CodeMethod implementations for some types
|
||||
/// Contains auxiliary ToString CodeMethod implementations for some types
|
||||
/// </summary>
|
||||
public static partial class ToStringCodeMethods
|
||||
{
|
||||
|
@ -237,12 +237,12 @@ namespace System.Management.Automation.Internal
|
||||
|
||||
/// <summary>
|
||||
/// IDisposable implementation
|
||||
/// When the command is complete, release the associated memmbers
|
||||
/// When the command is complete, release the associated members
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Using InternalDispose instead of Dispose pattern because this
|
||||
/// interface was shipped in PowerShell V1 and 3rd cmdlets indirectly
|
||||
/// derive from this inerface. If we depend on Dispose() and 3rd
|
||||
/// derive from this interface. If we depend on Dispose() and 3rd
|
||||
/// party cmdlets do not call base.Dispose (which is the case), we
|
||||
/// will still end up having this leak.
|
||||
/// </remarks>
|
||||
@ -393,7 +393,7 @@ namespace System.Management.Automation
|
||||
} // Events
|
||||
|
||||
/// <summary>
|
||||
/// Repostiory for jobs
|
||||
/// Repository for jobs
|
||||
/// </summary>
|
||||
public JobRepository JobRepository
|
||||
{
|
||||
|
@ -1271,7 +1271,7 @@ namespace System.Management.Automation
|
||||
|
||||
cleanupModuleAnalysisAppDomain = context.TakeResponsibilityForModuleAnalysisAppDomain();
|
||||
|
||||
// Get the available module files, prefering modules from $PSHOME so that user modules don't
|
||||
// Get the available module files, preferring modules from $PSHOME so that user modules don't
|
||||
// override system modules during auto-loading
|
||||
if (etwEnabled) CommandDiscoveryEventSource.Log.SearchingForModuleFilesStart();
|
||||
var defaultAvailableModuleFiles = ModuleUtils.GetDefaultAvailableModuleFiles(true, true, context);
|
||||
|
@ -51,9 +51,9 @@ namespace System.Management.Automation
|
||||
#region public_methods
|
||||
|
||||
/// <summary>
|
||||
/// Creates a command object corresponing to specified name. The command processor will use global scope.
|
||||
/// Creates a command object corresponding to specified name. The command processor will use global scope.
|
||||
/// </summary>
|
||||
/// <param name="commandName">Creates a command object corresponing to specified name.</param>
|
||||
/// <param name="commandName">Creates a command object corresponding to specified name.</param>
|
||||
/// <param name="commandOrigin"> Location where the command was dispatched from. </param>
|
||||
/// <returns>Created command processor object.</returns>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
@ -65,9 +65,9 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a command object corresponing to specified name.
|
||||
/// Creates a command object corresponding to specified name.
|
||||
/// </summary>
|
||||
/// <param name="commandName">Creates a command object corresponing to specified name.</param>
|
||||
/// <param name="commandName">Creates a command object corresponding to specified name.</param>
|
||||
/// <param name="commandOrigin"> Location where the command was dispatched from. </param>
|
||||
/// <param name="useLocalScope">
|
||||
/// True if command processor should use local scope to execute the command,
|
||||
@ -84,9 +84,9 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a command object corresponing to specified name.
|
||||
/// Creates a command object corresponding to specified name.
|
||||
/// </summary>
|
||||
/// <param name="commandName">Creates a command object corresponing to specified name.</param>
|
||||
/// <param name="commandName">Creates a command object corresponding to specified name.</param>
|
||||
/// <param name="executionContext">Execution Context.</param>
|
||||
/// <param name="commandOrigin"> Location where the command was dispatched from. </param>
|
||||
/// <returns>Created command processor object.</returns>
|
||||
|
@ -557,7 +557,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
catch (ParameterBindingException)
|
||||
{
|
||||
// Ignore the binding exception if no arugment is specified
|
||||
// Ignore the binding exception if no argument is specified
|
||||
if (processor.arguments.Count > 0)
|
||||
{
|
||||
throw;
|
||||
|
@ -35,7 +35,7 @@ namespace System.Management.Automation
|
||||
RemoteServer = 0x1,
|
||||
|
||||
/// <summary>
|
||||
/// Session with <see cref="WorkflowServer"/> capabibilities can be made available on
|
||||
/// Session with <see cref="WorkflowServer"/> capabilities can be made available on
|
||||
/// a server that wants to provide workflow hosting capabilities in the
|
||||
/// specified end points. All jobs commands as well as commands for
|
||||
/// implicit remoting and interactive remoting will be made available
|
||||
@ -57,7 +57,7 @@ namespace System.Management.Automation
|
||||
#region Public Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a CommandMetada object for the given CLS complaint type
|
||||
/// Constructs a CommandMetadata object for the given CLS complaint type
|
||||
/// <paramref name="commandType"/>.
|
||||
/// </summary>
|
||||
/// <param name="commandType">
|
||||
@ -294,7 +294,7 @@ namespace System.Management.Automation
|
||||
#region ctor
|
||||
|
||||
/// <summary>
|
||||
/// Gets the metdata for the specified cmdlet from the cache or creates
|
||||
/// Gets the metadata for the specified cmdlet from the cache or creates
|
||||
/// a new instance if its not in the cache.
|
||||
/// </summary>
|
||||
///
|
||||
@ -586,7 +586,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
else if (this.CommandType != null)
|
||||
{
|
||||
// Construct compiled parameter metada from this
|
||||
// Construct compiled parameter metadata from this
|
||||
InternalParameterMetadata parameterMetadata = InternalParameterMetadata.Get(this.CommandType, null, false);
|
||||
MergedCommandParameterMetadata mergedCommandParameterMetadata =
|
||||
MergeParameterMetadata(null, parameterMetadata, _shouldGenerateCommonParameters);
|
||||
|
@ -34,7 +34,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <param name="context">
|
||||
/// The exection context for the current engine instance.
|
||||
/// The execution context for the current engine instance.
|
||||
/// </param>
|
||||
internal CommandPathSearch(
|
||||
IEnumerable<string> patterns,
|
||||
@ -568,7 +568,7 @@ namespace System.Management.Automation
|
||||
private bool _justReset;
|
||||
|
||||
/// <summary>
|
||||
/// If not null, called with the enumerated files for futher processing
|
||||
/// If not null, called with the enumerated files for further processing
|
||||
/// </summary>
|
||||
private Func<string[], IEnumerable<string>> _postProcessEnumeratedFiles;
|
||||
|
||||
|
@ -78,7 +78,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Script command processor created from a script file is special
|
||||
/// in following two perspect,
|
||||
/// in following two perspectives,
|
||||
///
|
||||
/// 1. New scope created needs to be a 'script' scope in the
|
||||
/// sense that it needs to handle $script: variables.
|
||||
@ -172,7 +172,7 @@ namespace System.Management.Automation
|
||||
// This goes both ways:
|
||||
// - Can't dot something from a more permissive mode, since that would probably expose
|
||||
// functions that were never designed to handle untrusted data.
|
||||
// - Can't dot something from a less permissive mode, since that might introduce tained
|
||||
// - Can't dot something from a less permissive mode, since that might introduce tainted
|
||||
// data into the current scope.
|
||||
if ((scriptBlock.LanguageMode.HasValue) &&
|
||||
(scriptBlock.LanguageMode != languageMode) &&
|
||||
@ -228,7 +228,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a command procesor for "get-help [helpTarget]"
|
||||
/// Creates a command processor for "get-help [helpTarget]"
|
||||
/// </summary>
|
||||
/// <param name="context">context for the command processor</param>
|
||||
/// <param name="helpTarget">help target</param>
|
||||
@ -895,7 +895,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// this method shoud not throw exceptions; warn about any violations on checked builds and re-throw
|
||||
// this method should not throw exceptions; warn about any violations on checked builds and re-throw
|
||||
Diagnostics.Assert(false, "This method should not throw exceptions!");
|
||||
throw;
|
||||
}
|
||||
|
@ -1483,7 +1483,7 @@ namespace System.Management.Automation
|
||||
private CommandPathSearch _pathSearcher;
|
||||
|
||||
/// <summary>
|
||||
/// Thge execution context instance for the current engine...
|
||||
/// The execution context instance for the current engine...
|
||||
/// </summary>
|
||||
private ExecutionContext _context;
|
||||
|
||||
|
@ -71,7 +71,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
}
|
||||
|
||||
// If this is a PSCredential type and they haven't added any argument transformation attributues,
|
||||
// If this is a PSCredential type and they haven't added any argument transformation attributes,
|
||||
// add one for credential transformation
|
||||
if ((this.Type == typeof(PSCredential)) && argTransformationAttributes == null)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace System.Management.Automation
|
||||
/// This is the place to look every time you create a new Adapter. Consider if you
|
||||
/// should implement each of the virtual methods here.
|
||||
/// The base class deals with errors and performs additional operations before and after
|
||||
/// calling the drived virtual methods.
|
||||
/// calling the derived virtual methods.
|
||||
/// </summary>
|
||||
internal abstract class Adapter
|
||||
{
|
||||
@ -119,7 +119,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to GetMember</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected abstract void PropertySet(PSProperty property, object setValue, bool convertIfPossible);
|
||||
|
||||
/// <summary>
|
||||
@ -1214,7 +1214,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the best method out of overlaoded methods.
|
||||
/// Return the best method out of overloaded methods.
|
||||
/// The best has the smallest type distance between the method's parameters and the given arguments.
|
||||
/// </summary>
|
||||
/// <param name="methods">different overloads for a method</param>
|
||||
@ -1670,7 +1670,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auxilliary method in MethodInvoke to set newArguments[index] with the propper value
|
||||
/// Auxiliary method in MethodInvoke to set newArguments[index] with the propper value
|
||||
/// </summary>
|
||||
/// <param name="methodName">used for the MethodException that might be thrown</param>
|
||||
/// <param name="arguments">the complete array of arguments</param>
|
||||
@ -2317,7 +2317,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
internal class DotNetAdapter : Adapter
|
||||
{
|
||||
#region auxilliary methods and classes
|
||||
#region auxiliary methods and classes
|
||||
|
||||
private const BindingFlags instanceBindingFlags = (BindingFlags.FlattenHierarchy | BindingFlags.Public |
|
||||
BindingFlags.IgnoreCase | BindingFlags.Instance);
|
||||
@ -2422,7 +2422,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
PropertyInfo property = properties[i];
|
||||
// Properties can have different return types. If they do
|
||||
// we pretent it is System.Object
|
||||
// we pretend it is System.Object
|
||||
if (property.PropertyType != this.propertyType)
|
||||
{
|
||||
this.propertyType = typeof(object);
|
||||
@ -3541,7 +3541,7 @@ namespace System.Management.Automation
|
||||
return entry.isStatic;
|
||||
}
|
||||
|
||||
#endregion auxilliary methods and classes
|
||||
#endregion auxiliary methods and classes
|
||||
|
||||
#region virtual
|
||||
|
||||
@ -3688,7 +3688,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to GetMember</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
PropertyCacheEntry adapterData = (PropertyCacheEntry)property.adapterData;
|
||||
@ -3770,7 +3770,7 @@ namespace System.Management.Automation
|
||||
|
||||
#region method
|
||||
|
||||
#region auxilliary to method calling
|
||||
#region auxiliary to method calling
|
||||
|
||||
/// <summary>
|
||||
/// Calls constructor using the arguments and catching the appropriate exception
|
||||
@ -3912,7 +3912,7 @@ namespace System.Management.Automation
|
||||
/// <param name="target">object to call the method on</param>
|
||||
/// <param name="methodInformation">method information corresponding to methods</param>
|
||||
/// <param name="invocationConstraints">invocation constraints</param>
|
||||
/// <param name="arguments">arguiments of the call </param>
|
||||
/// <param name="arguments">arguments of the call </param>
|
||||
/// <returns>the return of the method</returns>
|
||||
/// <exception cref="MethodInvocationException">if the method throws an exception</exception>
|
||||
/// <exception cref="MethodException">if we could not find a method for the given arguments</exception>
|
||||
@ -4088,7 +4088,7 @@ namespace System.Management.Automation
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
#endregion auxilliary to method calling
|
||||
#endregion auxiliary to method calling
|
||||
|
||||
/// <summary>
|
||||
/// Called after a non null return from GetMember to try to call
|
||||
@ -4277,7 +4277,7 @@ namespace System.Management.Automation
|
||||
return property as T;
|
||||
}
|
||||
|
||||
// In order to not break v1..base dotnet adpater should not return methods
|
||||
// In order to not break v1..base dotnet adapter should not return methods
|
||||
// when accessed with T as PSMethod.. accessing method with PSMemberInfo
|
||||
// is ok as property always gets precedence over methods and duplicates
|
||||
// are ignored.
|
||||
@ -4372,7 +4372,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to GetMember</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
Diagnostics.Assert(false, "redirection adapter is not called for properties");
|
||||
@ -4908,7 +4908,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to DoGetProperty</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
string valueString = setValue as string;
|
||||
@ -4996,7 +4996,7 @@ namespace System.Management.Automation
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Auxilliary in GetProperty to perform case sensitive and case insensitve searches
|
||||
/// Auxiliary in GetProperty to perform case sensitive and case insensitive searches
|
||||
/// in the child nodes
|
||||
/// </summary>
|
||||
/// <param name="obj">XmlNode to extract property from</param>
|
||||
|
@ -81,7 +81,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Declare a delegate which returns the encryption key and initialization vector for symmetric encryption algorithem.
|
||||
/// Declare a delegate which returns the encryption key and initialization vector for symmetric encryption algorithm.
|
||||
/// </summary>
|
||||
/// <param name="context">The streaming context, which contains the searilization context.</param>
|
||||
/// <param name="key">Symmetric encryption key.</param>
|
||||
|
@ -196,7 +196,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Persist Switch parameter.
|
||||
/// If this switch parmter is set then the created PSDrive
|
||||
/// If this switch parameter is set then the created PSDrive
|
||||
/// would be persisted across PowerShell sessions.
|
||||
/// </summary>
|
||||
internal bool Persist { get; } = false;
|
||||
@ -208,7 +208,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UNC path of the drive. This property would be populated only
|
||||
/// if the cereated PSDrive is targeting a network drive or else this property
|
||||
/// if the created PSDrive is targeting a network drive or else this property
|
||||
/// would be null.
|
||||
/// </summary>
|
||||
public string DisplayRoot { get; internal set; } = null;
|
||||
@ -412,7 +412,7 @@ namespace System.Management.Automation
|
||||
/// If null, the current user credential is used.
|
||||
/// </param>
|
||||
/// <param name="displayRoot">
|
||||
/// The network path of the drive. This field would be populted only if PSDriveInfo
|
||||
/// The network path of the drive. This field would be populated only if PSDriveInfo
|
||||
/// is targeting the network drive or else this filed is null for local drives.
|
||||
/// </param>
|
||||
///
|
||||
|
@ -146,7 +146,7 @@ namespace System.Management.Automation
|
||||
public String Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the capabilies that are implemented by the provider.
|
||||
/// Gets the capabilities that are implemented by the provider.
|
||||
/// </summary>
|
||||
public Provider.ProviderCapabilities Capabilities
|
||||
{
|
||||
@ -172,7 +172,7 @@ namespace System.Management.Automation
|
||||
catch (Exception e) // Catch-all OK, 3rd party callout
|
||||
{
|
||||
CommandProcessorBase.CheckForSevereException(e);
|
||||
// Assume no capabilites for now
|
||||
// Assume no capabilities for now
|
||||
}
|
||||
}
|
||||
return _capabilities;
|
||||
@ -623,7 +623,7 @@ namespace System.Management.Automation
|
||||
// Possible solutions are to not cache the provider instance, or to maintain
|
||||
// a CmdletProviderContext stack in ProviderBase. Each method invocation pushes
|
||||
// the current context and the last action of the method pops back to the
|
||||
// previos context.
|
||||
// previous context.
|
||||
#if USE_TLS
|
||||
// Next see if we already have an instance in thread local storage
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Default implementation of WriteError - if the error record contains
|
||||
/// an exceptin then that exception will be thrown. If not, then an
|
||||
/// an exception then that exception will be thrown. If not, then an
|
||||
/// InvalidOperationException will be constructed and thrown.
|
||||
/// </summary>
|
||||
/// <param name="errorRecord">Error record instance to process</param>
|
||||
|
@ -72,7 +72,7 @@ namespace System.Management.Automation
|
||||
public string FriendlyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets of the file which implements the resource. For the reosurces which are defined using
|
||||
/// Gets or sets of the file which implements the resource. For the resources which are defined using
|
||||
/// MOF file, this will be path to a module which resides in the same folder where schema.mof file is present.
|
||||
/// For composite resources, this will be the module which implements the resource
|
||||
/// </summary>
|
||||
|
@ -51,8 +51,8 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct the tree from an object collection when arguments are comma seperated.
|
||||
/// If valid, all elements are OR seperated.
|
||||
/// Construct the tree from an object collection when arguments are comma separated.
|
||||
/// If valid, all elements are OR separated.
|
||||
/// </summary>
|
||||
/// <param name="expression">
|
||||
/// The array of specified flag attribute subexpression strings.
|
||||
|
@ -1093,7 +1093,7 @@ namespace System.Management.Automation
|
||||
private string _serializedFullyQualifiedErrorId = null;
|
||||
|
||||
/// <summary>
|
||||
/// Message overidee for CategoryInfo.GetMessage method
|
||||
/// Message overridee for CategoryInfo.GetMessage method
|
||||
/// </summary>
|
||||
internal string _serializedErrorCategoryMessageOverride = null;
|
||||
|
||||
@ -1634,7 +1634,7 @@ namespace System.Management.Automation
|
||||
private ReadOnlyCollection<int> _pipelineIterationInfo = Utils.EmptyReadOnlyCollection<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether to serizalize the InvocationInfo during remote calls
|
||||
/// Whether to serialize the InvocationInfo during remote calls
|
||||
/// </summary>
|
||||
internal bool SerializeExtendedInfo
|
||||
{
|
||||
|
@ -991,7 +991,7 @@ namespace System.Management.Automation
|
||||
// invocation to the current runspace, we took dependency on eventing infrastructure and
|
||||
// this required ensuring the event and associated action be processed in the current thread
|
||||
// synchronously. The below while loop was added for that (win8: 530495). However, fix for
|
||||
// 530495 resulted in hang for icm | % { icm } case and dynamic event/subscriptions senarios.
|
||||
// 530495 resulted in hang for icm | % { icm } case and dynamic event/subscriptions scenarios.
|
||||
// To overcome that, changed "processSynchronously" parameter to "processInCurrentThread" and added
|
||||
// a new parameter "waitForCompletionWhenInCurrentThread" to trigger blocking for ScriptBlock
|
||||
// case.
|
||||
|
@ -237,7 +237,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// The AppDomain currently being used for module analysis. It should only be created if needed,
|
||||
/// but various callers need to take responsbility for unloading the domain via
|
||||
/// but various callers need to take responsibility for unloading the domain via
|
||||
/// the TakeResponsibilityForModuleAnalysisAppDomain.
|
||||
/// </summary>
|
||||
internal AppDomain AppDomainForModuleAnalysis { get; set; }
|
||||
@ -334,7 +334,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/set constraints for this execution environemnt
|
||||
/// Get/set constraints for this execution environment
|
||||
/// </summary>
|
||||
internal PSLanguageMode LanguageMode
|
||||
{
|
||||
@ -792,7 +792,7 @@ namespace System.Management.Automation
|
||||
if (arraylist.Count > 0)
|
||||
{
|
||||
// There may be exceptions stored directly in which case
|
||||
// the direc comparison will catch them...
|
||||
// the direct comparison will catch them...
|
||||
if (arraylist[0] == obj)
|
||||
return;
|
||||
// otherwise check the exception members of the error records...
|
||||
@ -802,7 +802,7 @@ namespace System.Management.Automation
|
||||
return;
|
||||
}
|
||||
|
||||
// 1045384-2004/12/14-JonN impementing $MaximumErrorCount
|
||||
// 1045384-2004/12/14-JonN implementing $MaximumErrorCount
|
||||
object maxcountobj = EngineSessionState.CurrentScope.ErrorCapacity.FastValue;
|
||||
if (null != maxcountobj)
|
||||
{
|
||||
@ -1238,7 +1238,7 @@ namespace System.Management.Automation
|
||||
private TypeInfoDataBaseManager _formatDBManager;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the TransactionManager instance that controlls transactions in the current
|
||||
/// Gets the TransactionManager instance that controls transactions in the current
|
||||
/// instance.
|
||||
/// </summary>
|
||||
internal PSTransactionManager TransactionManager
|
||||
@ -1382,7 +1382,7 @@ namespace System.Management.Automation
|
||||
catch (FileLoadException fileLoadException)
|
||||
{
|
||||
error = fileLoadException;
|
||||
// this is a legitamate error on CoreCLR for a newly emited with Add-Type assemblies
|
||||
// this is a legitimate error on CoreCLR for a newly emited with Add-Type assemblies
|
||||
// they cannot be loaded by name, but we are only interested in importing them by path
|
||||
}
|
||||
catch (BadImageFormatException badImage)
|
||||
@ -1663,7 +1663,7 @@ namespace System.Management.Automation
|
||||
// we only want to set the event handler once for the entire app domain...
|
||||
lock (lockObject)
|
||||
{
|
||||
// Need to check again inside the lock due to possibliity of a race condition...
|
||||
// Need to check again inside the lock due to possibility of a race condition...
|
||||
if (!_assemblyEventHandlerSet)
|
||||
{
|
||||
AppDomain currentAppDomain = AppDomain.CurrentDomain;
|
||||
|
@ -60,7 +60,7 @@ namespace System.Management.Automation
|
||||
|
||||
Diagnostics.Assert(IO.Path.IsPathRooted(path), "Caller makes sure that 'path' is already resolved.");
|
||||
|
||||
// Path might contian short-name syntax such as 'DOCUME~1'. Use Path.GetFullPath to expand the short name
|
||||
// Path might contain short-name syntax such as 'DOCUME~1'. Use Path.GetFullPath to expand the short name
|
||||
_path = IO.Path.GetFullPath(path);
|
||||
CommonInitialization();
|
||||
}
|
||||
@ -90,7 +90,7 @@ namespace System.Management.Automation
|
||||
|
||||
Diagnostics.Assert(IO.Path.IsPathRooted(path), "Caller makes sure that 'path' is already resolved.");
|
||||
|
||||
// Path might contian short-name syntax such as 'DOCUME~1'. Use Path.GetFullPath to expand the short name
|
||||
// Path might contain short-name syntax such as 'DOCUME~1'. Use Path.GetFullPath to expand the short name
|
||||
_path = IO.Path.GetFullPath(path);
|
||||
CommonInitialization();
|
||||
}
|
||||
@ -110,7 +110,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
private void CommonInitialization()
|
||||
{
|
||||
// Assume external scripts are untrusted by defult (for Get-Command, etc)
|
||||
// Assume external scripts are untrusted by default (for Get-Command, etc)
|
||||
// until we've actually parsed their script block.
|
||||
if (SystemPolicy.GetSystemLockdownPolicy() != SystemEnforcementMode.None)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to DoGetProperty</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
DataRow dataRow = (DataRow)property.baseObject;
|
||||
@ -220,7 +220,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to DoGetProperty</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
DataRowView dataRowView = (DataRowView)property.baseObject;
|
||||
@ -314,7 +314,7 @@ namespace System.Management.Automation
|
||||
// Adapter engine resolve's members in the following steps:
|
||||
// 1. Extended members -> 2. Adapted members -> 3. Dotnet members
|
||||
// We cannot say from DirectoryEntryAdapter if a method with name "memberName"
|
||||
// is available. So check if a DotNet proeperty with the same name is available
|
||||
// is available. So check if a DotNet property with the same name is available
|
||||
// If yes, return null from the adapted view and let adapter engine
|
||||
// take care of DotNet member resolution. If not, assume memberName method
|
||||
// is available on native adsi object.
|
||||
@ -400,7 +400,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to GetMember</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
PropertyValueCollection values = property.adapterData as PropertyValueCollection;
|
||||
@ -539,7 +539,7 @@ namespace System.Management.Automation
|
||||
// First try to invoke method on the native adsi object. If the method
|
||||
// call fails, try to invoke dotnet method with same name, if one available.
|
||||
// This will ensure dotnet methods are exposed for DE objects.
|
||||
// The problem is in GetMemeber<T>(), DE adapter cannot check if a requested
|
||||
// The problem is in GetMember<T>(), DE adapter cannot check if a requested
|
||||
// method is available as it doesn't have access to native adsi object's
|
||||
// method metadata. So GetMember<T> returns PSMethod assuming a method
|
||||
// is available. This behavior will never give a chance to dotnet adapter
|
||||
|
@ -16,7 +16,7 @@ namespace System.Management.Automation
|
||||
#region ctor
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the FunctonInfo class with the specified name and ScriptBlock
|
||||
/// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">
|
||||
@ -40,7 +40,7 @@ namespace System.Management.Automation
|
||||
} // FunctionInfo ctor
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the FunctonInfo class with the specified name and ScriptBlock
|
||||
/// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">
|
||||
@ -79,7 +79,7 @@ namespace System.Management.Automation
|
||||
} // FunctionInfo ctor
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the FunctonInfo class with the specified name and ScriptBlock
|
||||
/// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">
|
||||
@ -107,7 +107,7 @@ namespace System.Management.Automation
|
||||
} // FunctionInfo ctor
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the FunctonInfo class with the specified name and ScriptBlock
|
||||
/// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">
|
||||
|
@ -531,7 +531,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
_timer.Stop();
|
||||
|
||||
// We want telemtry on commands people look for but don't exist - this should give us an idea
|
||||
// We want telementry on commands people look for but don't exist - this should give us an idea
|
||||
// what sort of commands people expect but either don't exist, or maybe should be installed by default.
|
||||
// The StartsWith is to avoid logging telemetry when suggestion mode checks the
|
||||
// current directory for scripts/exes in the current directory and '.' is not in the path.
|
||||
|
@ -100,7 +100,7 @@ namespace System.Management.Automation
|
||||
public DateTime TimeGenerated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The tags assocaited with this informational record (if any)
|
||||
/// The tags associated with this informational record (if any)
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
|
@ -144,7 +144,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Command class so that all the commands can derive off this one.
|
||||
/// Adds the flexibility of adding addditional derived class,
|
||||
/// Adds the flexibility of adding additional derived class,
|
||||
/// such as ProxyCommand for Exchange.
|
||||
/// Derived classes - Alias, Application, Cmdlet, Function, Script.
|
||||
/// </summary>
|
||||
@ -404,7 +404,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Create a named entry for the assembly to load, specifying
|
||||
/// just the nanme
|
||||
/// just the name
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the assembly to load</param>
|
||||
public SessionStateAssemblyEntry(string name)
|
||||
@ -555,7 +555,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a session state command entry instance with the specified visiblity.
|
||||
/// Create a session state command entry instance with the specified visibility.
|
||||
/// </summary>
|
||||
/// <param name="path">The path to the script</param>
|
||||
/// <param name="visibility">Visibility of the script.</param>
|
||||
@ -591,7 +591,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <summary>
|
||||
/// Define an alias entry to add to the initial session state
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the aliase</param>
|
||||
/// <param name="name">Name of the alias</param>
|
||||
/// <param name="definition">The name of the command it resolves to</param>
|
||||
public SessionStateAliasEntry(string name, string definition)
|
||||
: base(name, SessionStateEntryVisibility.Public)
|
||||
@ -603,9 +603,9 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <summary>
|
||||
/// Define an alias entry to add to the initial session state
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the aliase</param>
|
||||
/// <param name="name">Name of the alias</param>
|
||||
/// <param name="definition">The name of the command it resolves to</param>
|
||||
/// <param name="description">A descripion of the purpose of the alias.</param>
|
||||
/// <param name="description">A description of the purpose of the alias.</param>
|
||||
public SessionStateAliasEntry(string name, string definition, string description)
|
||||
: base(name, SessionStateEntryVisibility.Public)
|
||||
{
|
||||
@ -617,10 +617,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <summary>
|
||||
/// Define an alias entry to add to the initial session state
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the aliase</param>
|
||||
/// <param name="name">Name of the alias</param>
|
||||
/// <param name="definition">The name of the command it resolves to</param>
|
||||
/// <param name="description">A descripion of the purpose of the alias.</param>
|
||||
/// <param name="options">Options defining the scope visiblity, readonly and constant</param>
|
||||
/// <param name="description">A description of the purpose of the alias.</param>
|
||||
/// <param name="options">Options defining the scope visibility, readonly and constant</param>
|
||||
public SessionStateAliasEntry(string name, string definition, string description, ScopedItemOptions options)
|
||||
: base(name, SessionStateEntryVisibility.Public)
|
||||
{
|
||||
@ -633,10 +633,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <summary>
|
||||
/// Define an alias entry to add to the initial session state
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the aliase</param>
|
||||
/// <param name="name">Name of the alias</param>
|
||||
/// <param name="definition">The name of the command it resolves to</param>
|
||||
/// <param name="description">A descripion of the purpose of the alias.</param>
|
||||
/// <param name="options">Options defining the scope visiblity, readonly and constant</param>
|
||||
/// <param name="description">A description of the purpose of the alias.</param>
|
||||
/// <param name="options">Options defining the scope visibility, readonly and constant</param>
|
||||
/// <param name="visibility"></param>
|
||||
internal SessionStateAliasEntry(string name, string definition, string description,
|
||||
ScopedItemOptions options, SessionStateEntryVisibility visibility)
|
||||
@ -669,7 +669,7 @@ namespace System.Management.Automation.Runspaces
|
||||
public string Description { get; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Options controling scope visiblity and setability for this entry.
|
||||
/// Options controling scope visibility and setability for this entry.
|
||||
/// </summary>
|
||||
public ScopedItemOptions Options { get; } = ScopedItemOptions.None;
|
||||
}
|
||||
@ -696,7 +696,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// "*", then any path is permitted.
|
||||
/// </summary>
|
||||
/// <param name="path">The full path to the application</param>
|
||||
/// <param name="visibility">Sets the external visibilty of the path.</param>
|
||||
/// <param name="visibility">Sets the external visibility of the path.</param>
|
||||
internal SessionStateApplicationEntry(string path, SessionStateEntryVisibility visibility)
|
||||
: base(path, visibility)
|
||||
{
|
||||
@ -823,7 +823,7 @@ namespace System.Management.Automation.Runspaces
|
||||
internal ScriptBlock ScriptBlock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Options controling scope visiblity and setability for this entry.
|
||||
/// Options controling scope visibility and setability for this entry.
|
||||
/// </summary>
|
||||
public ScopedItemOptions Options { get; } = ScopedItemOptions.None;
|
||||
|
||||
@ -918,7 +918,7 @@ namespace System.Management.Automation.Runspaces
|
||||
internal WorkflowInfo WorkflowInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Options controling scope visiblity and setability for this entry.
|
||||
/// Options controling scope visibility and setability for this entry.
|
||||
/// </summary>
|
||||
public ScopedItemOptions Options { get; } = ScopedItemOptions.None;
|
||||
|
||||
@ -1521,7 +1521,7 @@ namespace System.Management.Automation.Runspaces
|
||||
allowedCommands.Add("Measure-Object"); // used to have nice progress bars when import/export-pssession is running
|
||||
// required by interactive remoting
|
||||
allowedCommands.Add("Out-Default"); // appended to every command line
|
||||
allowedCommands.Add("Exit-PSSession"); // used by the user to exit the sesion
|
||||
allowedCommands.Add("Exit-PSSession"); // used by the user to exit the session
|
||||
|
||||
// We don't remove these entries so that they can be called by commands in the runspace.
|
||||
// Setting them to 'Private' ensures that the user can't call them.
|
||||
@ -2255,7 +2255,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the authorization manager to be used for this session state instance.
|
||||
/// If no authorization manager is specified, then the default authroization manager
|
||||
/// If no authorization manager is specified, then the default authorization manager
|
||||
/// for PowerShell will be used which checks the ExecutionPolicy before running a command.
|
||||
/// </summary>
|
||||
public virtual AuthorizationManager AuthorizationManager { get; set; } = new Microsoft.PowerShell.PSAuthorizationManager(Utils.DefaultPowerShellShellID);
|
||||
@ -2289,7 +2289,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// Add a list of modules to import when the runspace is created.
|
||||
/// </summary>
|
||||
/// <param name="modules">
|
||||
/// The modules, whose specificiations are specified by <paramref name="modules"/>,
|
||||
/// The modules, whose specifications are specified by <paramref name="modules"/>,
|
||||
/// to add.
|
||||
/// </param>
|
||||
public void ImportPSModule(IEnumerable<ModuleSpecification> modules)
|
||||
@ -2394,7 +2394,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// If set to true, disables any updates to format table. This includes disabling
|
||||
/// format table updates throught Update-FormatData, Import-Module etc.
|
||||
/// format table updates through Update-FormatData, Import-Module etc.
|
||||
/// All the disabling happens silently ie., the user will not get any exception.
|
||||
/// By default, this is set to False.
|
||||
/// </summary>
|
||||
@ -2528,7 +2528,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
// If the initial session state made some commands private by way of
|
||||
// VisibleCmdlets / etc., then change the default command visibility for
|
||||
// the sesssion state so that newly imported modules aren't exposed accidentally.
|
||||
// the session state so that newly imported modules aren't exposed accidentally.
|
||||
if (DefaultCommandVisibility == SessionStateEntryVisibility.Private)
|
||||
{
|
||||
ss.DefaultCommandVisibility = SessionStateEntryVisibility.Private;
|
||||
@ -3148,7 +3148,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
private string MakeUserNamePath()
|
||||
{
|
||||
// Use the user name passsed to initial session state if avaiable, or
|
||||
// Use the user name passed to initial session state if available, or
|
||||
// otherwise use the current user name.
|
||||
var userName = (!string.IsNullOrEmpty(this.UserDriveUserName)) ?
|
||||
this.UserDriveUserName :
|
||||
@ -5142,7 +5142,7 @@ end
|
||||
"Stop-Service", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
|
||||
new SessionStateAliasEntry("sv",
|
||||
"Set-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
|
||||
// Porting note: #if !UNIX is used to disable alises for cmdlets which conflict with Linux / OS X
|
||||
// Porting note: #if !UNIX is used to disable aliases for cmdlets which conflict with Linux / OS X
|
||||
#if !UNIX
|
||||
// ac is a native command on OS X
|
||||
new SessionStateAliasEntry("ac",
|
||||
@ -5163,7 +5163,7 @@ end
|
||||
"Tee-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
|
||||
new SessionStateAliasEntry("write",
|
||||
"Write-Output", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
|
||||
// These were traqnsferred from the "transferred from the profile" section
|
||||
// These were transferred from the "transferred from the profile" section
|
||||
new SessionStateAliasEntry("cat",
|
||||
"Get-Content", "", ScopedItemOptions.AllScope),
|
||||
new SessionStateAliasEntry("cp",
|
||||
|
@ -173,7 +173,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
// Win8: 176403: ScriptCmdlets sets the global WhatIf and Confirm preferences
|
||||
// This effects the new W8 foreach-object cmdlet with -whatif and -confirm
|
||||
// implemented. -whatif and -confirm needed only for PropertyAndMethodSet
|
||||
// parmaeter set. So erring out in cases where these are used with ScriptBlockSet.
|
||||
// parameter set. So erring out in cases where these are used with ScriptBlockSet.
|
||||
// Not using MshCommandRuntime, as those variables will be affected by ScriptCmdlet
|
||||
// infrastructure (wherein ScriptCmdlet modifies the global preferences).
|
||||
Dictionary<string, object> psBoundParameters = this.MyInvocation.BoundParameters;
|
||||
@ -210,7 +210,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
_end = _scripts.Count;
|
||||
_start = _scripts.Count > 1 ? 1 : 0;
|
||||
|
||||
// and set the end script if it wasn't explicilty set with a named parameter.
|
||||
// and set the end script if it wasn't explicitly set with a named parameter.
|
||||
if (!_setEndScript)
|
||||
{
|
||||
if (_scripts.Count > 2)
|
||||
@ -338,7 +338,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
if (members.Count > 1)
|
||||
{
|
||||
// write error record: property method ambigious
|
||||
// write error record: property method ambiguous
|
||||
StringBuilder possibleMatches = new StringBuilder();
|
||||
foreach (PSMemberInfo item in members)
|
||||
{
|
||||
@ -505,7 +505,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
Dbg.Assert(methods != null, "The return value of Members.Match should never be null.");
|
||||
if (methods.Count > 1)
|
||||
{
|
||||
// write error record: method ambigious
|
||||
// write error record: method ambiguous
|
||||
StringBuilder possibleMatches = new StringBuilder();
|
||||
foreach (PSMemberInfo item in methods)
|
||||
{
|
||||
@ -1495,7 +1495,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
"ValueNotSpecifiedForWhereObject", null));
|
||||
}
|
||||
|
||||
// The binary operation needs to be specified if the user specifies both the -Propery and -Value
|
||||
// The binary operation needs to be specified if the user specifies both the -Property and -Value
|
||||
if (!_valueNotSpecified && (_binaryOperator == TokenKind.Ieq && _forceBooleanEvaluation))
|
||||
{
|
||||
// The -Property and -Value are specified explicitly by the user but the binary operation is not
|
||||
|
@ -21,7 +21,7 @@ namespace System.Management.Automation
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Contructor for InvocationInfo object when the associated command object is present.
|
||||
/// Constructor for InvocationInfo object when the associated command object is present.
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
internal InvocationInfo(InternalCommand command)
|
||||
|
@ -283,7 +283,7 @@ namespace System.Management.Automation
|
||||
// Parameter validation is done in the session state object
|
||||
|
||||
return _sessionState.GetItemDynamicParameters(path, context);
|
||||
} // GetItemDynamicParamters
|
||||
} // GetItemDynamicParameters
|
||||
|
||||
#endregion GetItem
|
||||
|
||||
@ -2505,7 +2505,7 @@ namespace System.Management.Automation
|
||||
CopyTargetContainer,
|
||||
|
||||
/// <summary>
|
||||
/// The children of the source contianer are copied.
|
||||
/// The children of the source container are copied.
|
||||
/// </summary>
|
||||
CopyChildrenOfTargetContainer
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">value supposedly *not* of the types supported by this converted to be converted to the <paramref name="destinationType"/> parameter</param>
|
||||
/// <param name="destinationType">one of the types supported by this converter to which the <paramref name="sourceValue"/> parameter should be converted to</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormatable's ToString</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormattable's ToString</param>
|
||||
/// <param name="ignoreCase">true if case should be ignored</param>
|
||||
/// <returns>the <paramref name="sourceValue"/> parameter converted to the <paramref name="destinationType"/> parameter using formatProvider and ignoreCase</returns>
|
||||
/// <exception cref="InvalidCastException">if no conversion was possible</exception>
|
||||
@ -105,7 +105,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">value supposedly *not* of the types supported by this converted to be converted to the <paramref name="destinationType"/> parameter</param>
|
||||
/// <param name="destinationType">one of the types supported by this converter to which the <paramref name="sourceValue"/> parameter should be converted to</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormatable's ToString</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormattable's ToString</param>
|
||||
/// <param name="ignoreCase">true if case should be ignored</param>
|
||||
/// <returns>the <paramref name="sourceValue"/> parameter converted to the <paramref name="destinationType"/> parameter using formatProvider and ignoreCase</returns>
|
||||
/// <exception cref="InvalidCastException">if no conversion was possible</exception>
|
||||
@ -138,7 +138,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">value supposedly from one of the types supported by this converter to be converted to the <paramref name="destinationType"/> parameter</param>
|
||||
/// <param name="destinationType">type to convert the <paramref name="sourceValue"/> parameter, supposedly not one of the types supported by the converter</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormatable's ToString</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormattable's ToString</param>
|
||||
/// <param name="ignoreCase">true if case should be ignored</param>
|
||||
/// <returns>sourceValue converted to the <paramref name="destinationType"/> parameter using formatProvider and ignoreCase</returns>
|
||||
/// <exception cref="InvalidCastException">if no conversion was possible</exception>
|
||||
@ -149,7 +149,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">value supposedly from one of the types supported by this converter to be converted to the <paramref name="destinationType"/> parameter</param>
|
||||
/// <param name="destinationType">type to convert the <paramref name="sourceValue"/> parameter, supposedly not one of the types supported by the converter</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormatable's ToString</param>
|
||||
/// <param name="formatProvider">The format provider to use like in IFormattable's ToString</param>
|
||||
/// <param name="ignoreCase">true if case should be ignored</param>
|
||||
/// <returns>sourceValue converted to the <paramref name="destinationType"/> parameter using formatProvider and ignoreCase</returns>
|
||||
/// <exception cref="InvalidCastException">if no conversion was possible</exception>
|
||||
@ -934,7 +934,7 @@ namespace System.Management.Automation
|
||||
case 1:
|
||||
// A possible implementation would be just
|
||||
// return IsTrue(objectArray[0]);
|
||||
// but since we don't want this to recurse indefinately
|
||||
// but since we don't want this to recurse indefinitely
|
||||
// we explicitly check the case where it would recurse
|
||||
// and deal with it.
|
||||
IList firstElement = objectArray[0] as IList;
|
||||
@ -965,7 +965,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auxilliary for the cases where we want a new PSObject or null
|
||||
/// Auxiliary for the cases where we want a new PSObject or null
|
||||
/// </summary>
|
||||
internal static PSObject AsPSObjectOrNull(object obj)
|
||||
{
|
||||
@ -1305,7 +1305,7 @@ namespace System.Management.Automation
|
||||
// This assumption holds for System.Collections.Generic.Dictionary<TKey,TValue>.
|
||||
|
||||
// If we did not make this assumption, we would be forced to generate code
|
||||
// to call the generic indexer directly, somewhat analgous to what we do
|
||||
// to call the generic indexer directly, somewhat analogous to what we do
|
||||
// in GetEnumeratorFromIEnumeratorT.
|
||||
|
||||
Type[] genericArguments = i.GetGenericArguments();
|
||||
@ -1447,7 +1447,7 @@ namespace System.Management.Automation
|
||||
/// If the string to convert is null or empty then the function returns "[object]" as the default typeless type.
|
||||
/// </summary>
|
||||
/// <param name="typeName">The typename string to convert.</param>
|
||||
/// <returns>The equivalent PowerShell representatin of that type.</returns>
|
||||
/// <returns>The equivalent PowerShell representation of that type.</returns>
|
||||
public static string ConvertTypeNameToPSTypeName(string typeName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(typeName))
|
||||
@ -1557,7 +1557,7 @@ namespace System.Management.Automation
|
||||
/// string representation of valueToConvert.
|
||||
/// - to ADSI - returns DirectoryEntry represented by the
|
||||
/// string representation of valueToConvert.
|
||||
/// - to ADSISearcher - return DirectorySearcher representd by the
|
||||
/// - to ADSISearcher - return DirectorySearcher represented by the
|
||||
/// string representation of valueToConvert.
|
||||
///
|
||||
/// If none of the cases above is true, the following is considered in order:
|
||||
@ -1644,7 +1644,7 @@ namespace System.Management.Automation
|
||||
/// <param name="resultType">type to convert psobject.</param>
|
||||
/// <param name="recursion">Indicates if inner properties have to be recursively converted.</param>
|
||||
/// <param name="formatProvider">To be used in custom type conversions, to call parse and to call Convert.ChangeType</param>
|
||||
/// <param name="ignoreUnknownMembers">Indiacates if Unknown members in the psobject have to be ignored if the corresponding members in resultType do not exist.</param>
|
||||
/// <param name="ignoreUnknownMembers">Indicates if Unknown members in the psobject have to be ignored if the corresponding members in resultType do not exist.</param>
|
||||
/// <returns>converted value.</returns>
|
||||
public static object ConvertPSObjectToType(PSObject valueToConvert, Type resultType, bool recursion, IFormatProvider formatProvider, bool ignoreUnknownMembers)
|
||||
{
|
||||
@ -1658,7 +1658,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generic convertto that simplifies workfing with workflow.
|
||||
/// Generic convertto that simplifies working with workflow.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of object to return</typeparam>
|
||||
/// <param name="valueToConvert"></param>
|
||||
@ -1831,7 +1831,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
// we know the value is not negative, so this conversion
|
||||
// always succede
|
||||
// always succeed
|
||||
allValues |= Convert.ToUInt64(value, CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
@ -2121,9 +2121,9 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// There might be many cast operators in a Type A that take Type A. Each operator will have a
|
||||
/// different return type. Because of that we cannot call GetMethod since it would cause a
|
||||
/// AmbiguousMatchException. This auxilliar method calls GetMember to find the right method
|
||||
/// AmbiguousMatchException. This auxiliary method calls GetMember to find the right method
|
||||
/// </summary>
|
||||
/// <param name="methodName">Either op_Excplicit or op_Implicit, at the moment</param>
|
||||
/// <param name="methodName">Either op_Explicit or op_Implicit, at the moment</param>
|
||||
/// <param name="targetType">the type to look for an operator</param>
|
||||
/// <param name="originalType">Type of the only parameter the operator method should have</param>
|
||||
/// <param name="resultType">Return type of the operator method</param>
|
||||
@ -2472,7 +2472,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// backupTypeTable:
|
||||
/// Used by Remoting Rehydration Logic. While Deserializing a remote object,
|
||||
/// LocalPipeline.ExecutionCotextFromTLS() might return null..In which case this
|
||||
/// LocalPipeline.ExecutionContextFromTLS() might return null..In which case this
|
||||
/// TypeTable will be used to do the conversion.
|
||||
private static bool IsCustomTypeConversion(object valueToConvert,
|
||||
Type resultType,
|
||||
@ -2741,7 +2741,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We need to add this built-in converter because in FullCLR, Syste.Uri has a TypeConverter attribute
|
||||
/// We need to add this built-in converter because in FullCLR, System.Uri has a TypeConverter attribute
|
||||
/// declared: [TypeConverter(typeof(UriTypeConverter))], so the conversion from 'string' to 'Uri' is
|
||||
/// actually taken care of by 'UriTypeConverter'. However, the type 'UriTypeConverter' is not available
|
||||
/// in CoreCLR, and thus the conversion from 'string' to 'Uri' would show a different behavior.
|
||||
@ -4547,7 +4547,7 @@ namespace System.Management.Automation
|
||||
/// <param name="formatProvider">governing conversion of types</param>
|
||||
/// <param name="backupTypeTable">
|
||||
/// Used by Remoting Rehydration Logic. While Deserializing a remote object,
|
||||
/// LocalPipeline.ExecutionCotextFromTLS() might return null..In which case this
|
||||
/// LocalPipeline.ExecutionContextFromTLS() might return null..In which case this
|
||||
/// TypeTable will be used to do the conversion.
|
||||
/// </param>
|
||||
/// <returns>the value converted</returns>
|
||||
|
@ -349,7 +349,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="property">PSProperty coming from a previous call to DoGetProperty</param>
|
||||
/// <param name="setValue">value to set the property with</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter suports conversion</param>
|
||||
/// <param name="convertIfPossible">instructs the adapter to convert before setting, if the adapter supports conversion</param>
|
||||
protected override void PropertySet(PSProperty property, object setValue, bool convertIfPossible)
|
||||
{
|
||||
ManagementBaseObject mObj = property.baseObject as ManagementBaseObject;
|
||||
@ -452,7 +452,7 @@ namespace System.Management.Automation
|
||||
try
|
||||
{
|
||||
// try to populate method table..if there is any exception
|
||||
// generati.ng the method metadata..suppress the exception
|
||||
// generating the method metadata..suppress the exception
|
||||
// but dont store the info in the cache. This is to allow
|
||||
// for method look up again in future (after the wmi object
|
||||
// is fixed)
|
||||
@ -511,7 +511,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Constructs a ManagementClass object from the supplied mgmtBaseObject.
|
||||
/// ManagementObject has scope, options, path which need to be carried over to the ManagementClass for
|
||||
/// retreiveing method/property/parameter metadata
|
||||
/// retrieving method/property/parameter metadata
|
||||
/// </summary>
|
||||
/// <param name="mgmtBaseObject"></param>
|
||||
/// <returns></returns>
|
||||
@ -724,7 +724,7 @@ namespace System.Management.Automation
|
||||
// and also null ints to 0. But WMI providers do not like these
|
||||
// conversions. So dont convert input arguments if they are null.
|
||||
// We could have done this in the base adapter but the change would be
|
||||
// costly for other adpaters which dont mind the conversion.
|
||||
// costly for other adapters which dont mind the conversion.
|
||||
if ((i < arguments.Length) && (arguments[i] == null))
|
||||
{
|
||||
verifiedArguments[i] = null;
|
||||
@ -753,7 +753,7 @@ namespace System.Management.Automation
|
||||
|
||||
foreach (PropertyData data in parameters.Properties)
|
||||
{
|
||||
// parameter postion..
|
||||
// parameter position..
|
||||
int location = -1;
|
||||
WMIParameterInformation pInfo = new WMIParameterInformation(data.Name, GetDotNetType(data));
|
||||
|
||||
@ -928,7 +928,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Deals with ManagementClass objects.
|
||||
/// Adapts only static methods and SystemProperties of a
|
||||
/// ManagemetnClass object.
|
||||
/// ManagementClass object.
|
||||
/// </summary>
|
||||
internal class ManagementClassApdapter : BaseWMIAdapter
|
||||
{
|
||||
@ -961,7 +961,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes method reperesented by <paramref name="mdata"/> using supplied arguments.
|
||||
/// Invokes method represented by <paramref name="mdata"/> using supplied arguments.
|
||||
/// </summary>
|
||||
/// <param name="wmiObject">ManagementObject on which the method is invoked.</param>
|
||||
/// <param name="methodName">Method data.</param>
|
||||
@ -1118,7 +1118,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes method reperesented by <paramref name="mdata"/> using supplied arguments.
|
||||
/// Invokes method represented by <paramref name="mdata"/> using supplied arguments.
|
||||
/// </summary>
|
||||
/// <param name="obj">ManagementObject on which the method is invoked.</param>
|
||||
/// <param name="methodName">Method data.</param>
|
||||
|
@ -60,7 +60,7 @@ namespace System.Management.Automation
|
||||
} // ReplaceMetadata
|
||||
|
||||
/// <summary>
|
||||
/// Merges the specified metdata with the other metadata already defined
|
||||
/// Merges the specified metadata with the other metadata already defined
|
||||
/// in this object.
|
||||
/// </summary>
|
||||
///
|
||||
@ -625,7 +625,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Gets a dictionary of the compiled parameter metadata for this Type.
|
||||
/// The dictionary keys are the names of the parameters and
|
||||
/// the values are the compiled parameter metdata.
|
||||
/// the values are the compiled parameter metadata.
|
||||
/// </summary>
|
||||
internal IDictionary<string, MergedCompiledCommandParameter> BindableParameters { get { return _bindableParameters; } }
|
||||
private IDictionary<string, MergedCompiledCommandParameter> _bindableParameters =
|
||||
|
@ -785,7 +785,7 @@ namespace System.Management.Automation
|
||||
if (foregroundColor.HasValue || backgroundColor.HasValue)
|
||||
{
|
||||
// It is possible for either one or the other to be empty if run from a
|
||||
// non-interative host, but only one was specified in Write-Host.
|
||||
// non-interactive host, but only one was specified in Write-Host.
|
||||
// So fill them with defaults if they are empty.
|
||||
if (!foregroundColor.HasValue)
|
||||
{
|
||||
@ -825,7 +825,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only transcribe informational messages here. Transcripton of PSHost-targeted messages is done in the InternalUI.Write* methods.
|
||||
// Only transcribe informational messages here. Transcription of PSHost-targeted messages is done in the InternalUI.Write* methods.
|
||||
CBhost.InternalUI.TranscribeResult(StringUtil.Format(InternalHostUserInterfaceStrings.InformationFormatString, record.ToString()));
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
Property = 4,
|
||||
/// <summary>
|
||||
/// A prorperty defined by a Name-Value pair
|
||||
/// A property defined by a Name-Value pair
|
||||
/// </summary>
|
||||
NoteProperty = 8,
|
||||
/// <summary>
|
||||
@ -462,7 +462,7 @@ namespace System.Management.Automation
|
||||
/// When
|
||||
/// the alias has not been added to an PSObject or
|
||||
/// the alias has a cycle or
|
||||
/// an aliased member is not presen
|
||||
/// an aliased member is not present
|
||||
/// </exception>
|
||||
public override bool IsSettable
|
||||
{
|
||||
@ -761,7 +761,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="name">name of the property</param>
|
||||
/// <param name="getterCodeReference">This should be a public static non void method taking one PSObject parameter.</param>
|
||||
/// <exception cref="ArgumentException">if namme is null or empty or getterCodeReference is null</exception>
|
||||
/// <exception cref="ArgumentException">if name is null or empty or getterCodeReference is null</exception>
|
||||
/// <exception cref="ExtendedTypeSystemException">if getterCodeReference doesn't have the right format.</exception>
|
||||
public PSCodeProperty(string name, MethodInfo getterCodeReference)
|
||||
{
|
||||
@ -1010,7 +1010,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs this proprerty
|
||||
/// Constructs this property
|
||||
/// </summary>
|
||||
/// <param name="name">name of the property</param>
|
||||
/// <param name="adapter">adapter used in DoGetProperty</param>
|
||||
@ -1246,7 +1246,7 @@ namespace System.Management.Automation
|
||||
internal object noteValue;
|
||||
|
||||
/// <summary>
|
||||
/// Initiializes a new instance of the PSNoteProperty class.
|
||||
/// Initializes a new instance of the PSNoteProperty class.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the property</param>
|
||||
/// <param name="value">value of the property</param>
|
||||
@ -1413,7 +1413,7 @@ namespace System.Management.Automation
|
||||
internal PSVariable _variable;
|
||||
|
||||
/// <summary>
|
||||
/// Initiializes a new instance of the PSVariableProperty class. This is
|
||||
/// Initializes a new instance of the PSVariableProperty class. This is
|
||||
/// a subclass of the NoteProperty that wraps a variable instead of a simple value.
|
||||
/// </summary>
|
||||
/// <param name="variable">The variable to wrap</param>
|
||||
@ -2687,7 +2687,7 @@ namespace System.Management.Automation
|
||||
internal object baseObject;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs this parameterized proprerty
|
||||
/// Constructs this parameterized property
|
||||
/// </summary>
|
||||
/// <param name="name">name of the property</param>
|
||||
/// <param name="adapter">adapter used in DoGetMethod</param>
|
||||
@ -3501,7 +3501,7 @@ namespace System.Management.Automation
|
||||
|
||||
#endregion PSMemberInfo
|
||||
|
||||
#region Member collection classes and its auxilliary classes
|
||||
#region Member collection classes and its auxiliary classes
|
||||
|
||||
/// <summary>
|
||||
/// /// This class is used in PSMemberInfoInternalCollection and ReadOnlyPSMemberInfoCollection
|
||||
@ -4812,7 +4812,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Member collection classes and its auxilliary classes
|
||||
#endregion Member collection classes and its auxiliary classes
|
||||
}
|
||||
|
||||
#pragma warning restore 56503
|
||||
|
@ -206,7 +206,7 @@ namespace System.Management.Automation
|
||||
private static Collection<CollectionEntry<PSPropertyInfo>> s_propertyCollection = GetPropertyCollection(PSMemberViewTypes.All);
|
||||
|
||||
/// <summary>
|
||||
/// A collection of delegates to get Extended/Adapated/Dotnet members based on the
|
||||
/// A collection of delegates to get Extended/Adapted/Dotnet members based on the
|
||||
/// <paramref name="viewType"/>
|
||||
/// </summary>
|
||||
/// <param name="viewType">
|
||||
@ -219,7 +219,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A collection of delegates to get Extended/Adapated/Dotnet members based on the
|
||||
/// A collection of delegates to get Extended/Adapted/Dotnet members based on the
|
||||
/// <paramref name="viewType"/>
|
||||
/// </summary>
|
||||
/// <param name="viewType">
|
||||
@ -293,7 +293,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A collection of delegates to get Extended/Adapated/Dotnet properties based on the
|
||||
/// A collection of delegates to get Extended/Adapted/Dotnet properties based on the
|
||||
/// <paramref name="viewType"/>
|
||||
/// </summary>
|
||||
/// <param name="viewType">
|
||||
@ -307,7 +307,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A collection of delegates to get Extended/Adapated/Dotnet properties based on the
|
||||
/// A collection of delegates to get Extended/Adapted/Dotnet properties based on the
|
||||
/// <paramref name="viewType"/>
|
||||
/// </summary>
|
||||
/// <param name="viewType">
|
||||
@ -632,7 +632,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// This is the adapter set that will contain the adapter of the baseObject
|
||||
/// and the ultimate .net member lookup adater.
|
||||
/// and the ultimate .net member lookup adapter.
|
||||
/// See <see cref="PSObject.AdapterSet"/> for explanation.
|
||||
/// </summary>
|
||||
private AdapterSet InternalAdapterSet
|
||||
@ -1207,7 +1207,7 @@ namespace System.Management.Automation
|
||||
/// enumerating and if that fails we call obj.ToString.
|
||||
/// If this is an PSObject, we look for a brokered ToString.
|
||||
/// If it is not present, and the BaseObject is null we try listing the properties.
|
||||
/// If the BaseObject is not null we try enumerationg. If that fails we try the BaseObject's ToString.
|
||||
/// If the BaseObject is not null we try enumerating. If that fails we try the BaseObject's ToString.
|
||||
/// </param>
|
||||
/// <returns>A string representation of the object</returns>
|
||||
/// <exception cref="ExtendedTypeSystemException">
|
||||
@ -1239,7 +1239,7 @@ namespace System.Management.Automation
|
||||
/// enumerating and if that fails we call obj.ToString.
|
||||
/// If this is an PSObject, we look for a brokered ToString.
|
||||
/// If it is not present, and the BaseObject is null we try listing the properties.
|
||||
/// If the BaseObject is not null we try enumerationg. If that fails we try the BaseObject's ToString.
|
||||
/// If the BaseObject is not null we try enumerating. If that fails we try the BaseObject's ToString.
|
||||
/// </param>
|
||||
/// <param name="separator">The separator between elements, if this is an enumeration</param>
|
||||
/// <param name="format">the format to be passed to ToString</param>
|
||||
@ -1521,8 +1521,8 @@ namespace System.Management.Automation
|
||||
/// CodeMethod or ScriptMethod will be used, if available. Enumerations items are
|
||||
/// concatenated using $ofs.
|
||||
/// </summary>
|
||||
/// <param name="format">repassed to baseObject's IFormatable if present</param>
|
||||
/// <param name="formatProvider">repassed to baseObject's IFormatable if present</param>
|
||||
/// <param name="format">repassed to baseObject's IFormattable if present</param>
|
||||
/// <param name="formatProvider">repassed to baseObject's IFormattable if present</param>
|
||||
/// <returns>the string representation for baseObject</returns>
|
||||
/// <exception cref="ExtendedTypeSystemException">if an exception was thrown by the BaseObject's ToString</exception>
|
||||
public string ToString(string format, IFormatProvider formatProvider)
|
||||
@ -1648,11 +1648,11 @@ namespace System.Management.Automation
|
||||
/// Greater than zero This instance is greater than obj.
|
||||
/// </returns>
|
||||
/// <exception cref="ExtendedTypeSystemException"> If <paramref name="obj"/> has a different type
|
||||
/// than this intance's BaseObject or if the BaseObject does not implement IComparable.
|
||||
/// than this instance's BaseObject or if the BaseObject does not implement IComparable.
|
||||
/// </exception>
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
// This ReferenceEqulas is not just an optimization.
|
||||
// This ReferenceEquals is not just an optimization.
|
||||
// It is necessary so that mshObject.Equals(mshObject) returns 0.
|
||||
// Please see the comments inside the Equals implementation.
|
||||
if (Object.ReferenceEquals(this, obj))
|
||||
@ -1691,7 +1691,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
// The above check validates if we are comparing with the same object references
|
||||
// This check "shortcuts" the comparision if the first object is a CustomObject
|
||||
// This check "shortcuts" the comparison if the first object is a CustomObject
|
||||
// since 2 custom objects are not equal.
|
||||
if (Object.ReferenceEquals(this.BaseObject, PSCustomObject.SelfInstance))
|
||||
{
|
||||
@ -1748,7 +1748,7 @@ namespace System.Management.Automation
|
||||
/// The name of the member set for adapted members
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This needs to be Lower cased as it saves some comparision time elsewhere.
|
||||
/// This needs to be Lower cased as it saves some comparison time elsewhere.
|
||||
/// </remarks>
|
||||
public const string AdaptedMemberSetName = "psadapted";
|
||||
|
||||
@ -1756,7 +1756,7 @@ namespace System.Management.Automation
|
||||
/// The name of the member set for extended members
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This needs to be Lower cased as it saves some comparision time elsewhere.
|
||||
/// This needs to be Lower cased as it saves some comparison time elsewhere.
|
||||
/// </remarks>
|
||||
public const string ExtendedMemberSetName = "psextended";
|
||||
|
||||
@ -1764,7 +1764,7 @@ namespace System.Management.Automation
|
||||
/// The name of the member set for the BaseObject's members
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This needs to be Lower cased as it saves some comparision time elsewhere.
|
||||
/// This needs to be Lower cased as it saves some comparison time elsewhere.
|
||||
/// </remarks>
|
||||
public const string BaseObjectMemberSetName = "psbase";
|
||||
|
||||
@ -1773,7 +1773,7 @@ namespace System.Management.Automation
|
||||
/// The PSObject's properties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This needs to be Lower cased as it saves some comparision time elsewhere.
|
||||
/// This needs to be Lower cased as it saves some comparison time elsewhere.
|
||||
/// </remarks>
|
||||
internal const string PSObjectMemberSetName = "psobject";
|
||||
|
||||
@ -1781,7 +1781,7 @@ namespace System.Management.Automation
|
||||
/// a shortcut to .PSObject.TypeNames
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This needs to be Lower cased as it saves some comparision time elsewhere.
|
||||
/// This needs to be Lower cased as it saves some comparison time elsewhere.
|
||||
/// </remarks>
|
||||
internal const string PSTypeNames = "pstypenames";
|
||||
|
||||
@ -1817,7 +1817,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used in the serialization dupplicate entry hashtable to detect when an PSObject has been serialized
|
||||
/// Used in the serialization duplicate entry hashtable to detect when an PSObject has been serialized
|
||||
/// </summary>
|
||||
/// <returns>The System.Object implementation of GetHashCode</returns>
|
||||
internal int GetReferenceHashCode()
|
||||
@ -1836,7 +1836,7 @@ namespace System.Management.Automation
|
||||
/// true to make this PSObject as the owner of the memberset.
|
||||
/// </param>
|
||||
/// <param name="ownerObject">
|
||||
/// PSObject to be used while replicating the owner for PSMemeberSet
|
||||
/// PSObject to be used while replicating the owner for PSMemberSet
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
internal static object GetNoteSettingValue(PSMemberSet settings, string noteName,
|
||||
@ -2147,7 +2147,7 @@ namespace System.Management.Automation
|
||||
/// 3. This will fix v1.0 ADSI adapter where most of the complaints were about
|
||||
/// discovering original .net members.
|
||||
///
|
||||
/// Use of this class will allow us to customize the utlitmate .net member lookup.
|
||||
/// Use of this class will allow us to customize the ultimate .net member lookup.
|
||||
/// For example, XML adapter already exposes .net methods.
|
||||
/// Using this class you can choose exact .net adapter to support .net
|
||||
/// member lookup and avoid lookup duplication.
|
||||
@ -2159,7 +2159,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
#region Private Data
|
||||
|
||||
// orginal adapter like Xml, ManagementClass, DirectoryEntry etc.
|
||||
// original adapter like Xml, ManagementClass, DirectoryEntry etc.
|
||||
// .net adapter
|
||||
|
||||
#endregion
|
||||
@ -2407,7 +2407,7 @@ namespace System.Management.Automation
|
||||
namespace Microsoft.PowerShell
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains auxilliary ToString CodeMethod implementations for some types
|
||||
/// Contains auxiliary ToString CodeMethod implementations for some types
|
||||
/// </summary>
|
||||
public static partial class ToStringCodeMethods
|
||||
{
|
||||
@ -2464,7 +2464,7 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
if (typeinfo.IsNested)
|
||||
{
|
||||
// For nested types, we should return OutterType+InnerType. For example,
|
||||
// For nested types, we should return OuterType+InnerType. For example,
|
||||
// System.Environment+SpecialFolder -> Environment+SpecialFolder
|
||||
string fullName = type.ToString();
|
||||
result = type.Namespace == null
|
||||
|
@ -520,7 +520,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (defaultProperty != null)
|
||||
{
|
||||
// There is a defaultPropery, but let's check if it is actually one of the properties we are
|
||||
// There is a defaultProperty, but let's check if it is actually one of the properties we are
|
||||
// returning in GetProperties
|
||||
foreach (PropertyDescriptor descriptor in properties)
|
||||
{
|
||||
@ -562,7 +562,7 @@ namespace System.Management.Automation
|
||||
return this.Instance;
|
||||
}
|
||||
|
||||
#region Overides Forwarded To BaseObject
|
||||
#region Overrides Forwarded To BaseObject
|
||||
|
||||
#region ReadMe
|
||||
// This region contains methods implemented like:
|
||||
@ -725,9 +725,9 @@ namespace System.Management.Automation
|
||||
// It would be nice to throw an exception for the case 2) instructing the user to use
|
||||
// an ArrayList, but since we have case 1) and maybe others we haven't found we return
|
||||
// an PSObjectTypeDescriptor(null). PSObjectTypeDescriptor's GetProperties
|
||||
// checks for null instance and returns an empty property colection.
|
||||
// checks for null instance and returns an empty property collection.
|
||||
// All other overrides also check for null and return some default result.
|
||||
// Case 1), which is using a PropertyGrid seems to be unafected by these results returned
|
||||
// Case 1), which is using a PropertyGrid seems to be unaffected by these results returned
|
||||
// by PSObjectTypeDescriptor overrides when the Instance is null, so we must conclude
|
||||
// that the TypeDescriptor returned by that call where instance is null is not used
|
||||
// for anything meaningful. That null instance PSObjectTypeDescriptor is only one
|
||||
|
@ -7,7 +7,7 @@ using Dbg = System.Management.Automation.Diagnostics;
|
||||
namespace System.Management.Automation
|
||||
{
|
||||
/// <summary>
|
||||
/// A class respresenting a name that is qualified by the PSSnapin name
|
||||
/// A class representing a name that is qualified by the PSSnapin name
|
||||
/// </summary>
|
||||
internal class PSSnapinQualifiedName
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ namespace System.Management.Automation
|
||||
// actually have quotes in different places, but the Win32 command line=>argv parser
|
||||
// erases those differences.
|
||||
//
|
||||
// We need to check quotes that the win32 arugment parser checks which is currently
|
||||
// We need to check quotes that the win32 argument parser checks which is currently
|
||||
// just the normal double quotes, no other special quotes. Also note that mismatched
|
||||
// quotes are supported.
|
||||
|
||||
|
@ -660,7 +660,7 @@ namespace System.Management.Automation
|
||||
#region Process cleanup with Child Process cleanup
|
||||
|
||||
/// <summary>
|
||||
/// Utility routine to kill a process, discarding non-critial exceptions.
|
||||
/// Utility routine to kill a process, discarding non-critical exceptions.
|
||||
/// This utility makes two passes at killing a process. In the first pass,
|
||||
/// if the process handle is invalid (as seems to be the case with an ntvdm)
|
||||
/// then we try to get a fresh handle based on the original process id.
|
||||
@ -745,8 +745,8 @@ namespace System.Management.Automation
|
||||
{
|
||||
try
|
||||
{
|
||||
// note that we have tried to retrived parent id once.
|
||||
// retreiving parent id might throw exceptions..so
|
||||
// note that we have tried to retrieved parent id once.
|
||||
// retrieving parent id might throw exceptions..so
|
||||
// setting this to -1 so that we dont try again to
|
||||
// get the parent id.
|
||||
_parentId = -1;
|
||||
@ -1085,7 +1085,7 @@ namespace System.Management.Automation
|
||||
// compare the command name to avoid breaking change.
|
||||
if (String.Equals(outputProcessor.CommandInfo.Name, "Out-Default", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Verify that this isn't an Out-Default added for transcripting
|
||||
// Verify that this isn't an Out-Default added for transcribing
|
||||
if (!outputProcessor.Command.MyInvocation.BoundParameters.ContainsKey("Transcript"))
|
||||
{
|
||||
return true;
|
||||
@ -1113,7 +1113,7 @@ namespace System.Management.Automation
|
||||
// redirecting anything. This is a bit tricky as we always run redirected so
|
||||
// we have to see if the redirection is actually being done at the topmost level or not.
|
||||
|
||||
// If we're eligable to be running standalone, that is, without redirection
|
||||
// If we're eligible to be running standalone, that is, without redirection
|
||||
// use our pipeline position to determine if we really want to redirect
|
||||
// input and error or not. If we're first in the pipeline, then we don't
|
||||
// redirect input. If we're last in the pipeline, we don't redirect output.
|
||||
@ -1121,7 +1121,7 @@ namespace System.Management.Automation
|
||||
if (this.Command.MyInvocation.PipelinePosition == this.Command.MyInvocation.PipelineLength)
|
||||
{
|
||||
// If the output pipe is the default outputter, for example, calling the native command from command-line host,
|
||||
// then we're possiblly running standalone.
|
||||
// then we're possibly running standalone.
|
||||
//
|
||||
// If the downstream cmdlet is explicitly Out-Default, for example:
|
||||
// $powershell.AddScript('ipconfig.exe')
|
||||
@ -1140,7 +1140,7 @@ namespace System.Management.Automation
|
||||
if (CommandRuntime.ErrorMergeTo != MshCommandRuntime.MergeDataStream.Output)
|
||||
{
|
||||
// If the error output pipe is the default outputter, for example, calling the native command from command-line host,
|
||||
// then we're possiblly running standalone.
|
||||
// then we're possibly running standalone.
|
||||
//
|
||||
// If the downstream cmdlet is explicitly Out-Default, for example:
|
||||
// $powershell.AddScript('ipconfig.exe')
|
||||
@ -1697,7 +1697,7 @@ namespace System.Management.Automation
|
||||
/// and processes them appropriately.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is not thread safe. It is assumed that NativeCommnadProcessor
|
||||
/// This class is not thread safe. It is assumed that NativeCommandProcessor
|
||||
/// class will synchronize access to this class between different threads.
|
||||
/// </remarks>
|
||||
internal class ProcessStreamReader
|
||||
@ -2204,7 +2204,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the RemoteException
|
||||
/// with a specified error message, serialzed Exception and
|
||||
/// with a specified error message, serialized Exception and
|
||||
/// serialized InvocationInfo
|
||||
/// </summary>
|
||||
/// <param name="message">The message that describes the error. </param>
|
||||
|
@ -31,7 +31,7 @@ namespace System.Management.Automation
|
||||
///
|
||||
/// This is why we hard code the PowerShell version here.
|
||||
///
|
||||
/// For each later relase of PowerShell, this constant needs to
|
||||
/// For each later release of PowerShell, this constant needs to
|
||||
/// be updated to reflect the right version.
|
||||
/// </remarks>
|
||||
private static Version s_psV1Version = new Version(1, 0);
|
||||
|
@ -489,7 +489,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <param name="flags">
|
||||
/// Flags for type coercion and valiation of the arguments.
|
||||
/// Flags for type coercion and validation of the arguments.
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
@ -1139,7 +1139,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// If the parameter binder might use the value more than once, this it can save the value to avoid
|
||||
/// re-evalauting complicated expressions.
|
||||
/// re-evaluating complicated expressions.
|
||||
/// </summary>
|
||||
protected virtual void SaveDefaultScriptParameterValue(string name, object value)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ namespace System.Management.Automation
|
||||
public string Name { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the parameer set is the default parameter set.
|
||||
/// Gets whether the parameter set is the default parameter set.
|
||||
/// </summary>
|
||||
public bool IsDefault { get; private set; }
|
||||
|
||||
@ -129,7 +129,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// GenerateParameters parameters in display order
|
||||
/// ie., Postional followed by
|
||||
/// ie., Positional followed by
|
||||
/// Named Mandatory (in alpha numeric) followed by
|
||||
/// Named (in alpha numeric).
|
||||
///
|
||||
|
@ -150,7 +150,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// If HelpMessageBaseName and HelpMessageResourceId are set, the help info is
|
||||
/// loaded from the resouce indicated by HelpMessageBaseName and HelpMessageResourceId.
|
||||
/// loaded from the resource indicated by HelpMessageBaseName and HelpMessageResourceId.
|
||||
/// If that fails and HelpMessage is set, the help info is set to HelpMessage; otherwise,
|
||||
/// the exception that is thrown when loading the resource is thrown.
|
||||
/// If both HelpMessageBaseName and HelpMessageResourceId are not set, the help info is
|
||||
|
@ -44,7 +44,7 @@ namespace System.Management.Automation
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// The instance of the ConfigPropertyAccessor to use to iteract with properties.
|
||||
/// The instance of the ConfigPropertyAccessor to use to interact with properties.
|
||||
/// Derived classes should not be directly instantiated.
|
||||
/// </summary>
|
||||
internal static readonly ConfigPropertyAccessor Instance;
|
||||
@ -131,7 +131,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Lock used to enable multiple concurrent readers and singular write locks within a
|
||||
/// single process.
|
||||
/// TODO: This solution only works for IO from a single process. A more robust solution is needed to enable ReaderWriterLockSlim behavior between proceses.
|
||||
/// TODO: This solution only works for IO from a single process. A more robust solution is needed to enable ReaderWriterLockSlim behavior between processes.
|
||||
/// </summary>
|
||||
private ReaderWriterLockSlim fileLock = new ReaderWriterLockSlim();
|
||||
|
||||
@ -696,7 +696,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a DWORD from the Registry. Excpetions are intentionally allowed to pass through to
|
||||
/// Reads a DWORD from the Registry. Exceptions are intentionally allowed to pass through to
|
||||
/// the caller because different classes and methods within the code base handle Registry
|
||||
/// exceptions differently. Some suppress exceptions and others pass them to the user.
|
||||
/// </summary>
|
||||
@ -730,7 +730,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Excpetions are intentionally allowed to pass through to
|
||||
/// Exceptions are intentionally allowed to pass through to
|
||||
/// the caller because different classes and methods within the code base handle Registry
|
||||
/// exceptions differently. Some suppress exceptions and others pass them to the user.
|
||||
/// </summary>
|
||||
@ -750,7 +750,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Excpetions are intentionally allowed to pass through to
|
||||
/// Exceptions are intentionally allowed to pass through to
|
||||
/// the caller because different classes and methods within the code base handle Registry
|
||||
/// exceptions differently. Some suppress exceptions and others pass them to the user.
|
||||
/// </summary>
|
||||
@ -787,7 +787,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Excpetions are intentionally allowed to pass through to
|
||||
/// Exceptions are intentionally allowed to pass through to
|
||||
/// the caller because different classes and methods within the code base handle Registry
|
||||
/// exceptions differently. Some suppress exceptions and others pass them to the user.
|
||||
/// </summary>
|
||||
|
@ -34,7 +34,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
internal const string TypeNamesTag = "TN";
|
||||
/// <summary>
|
||||
/// Tag for type item in typeanmes
|
||||
/// Tag for type item in typenames
|
||||
/// </summary>
|
||||
internal const string TypeNamesItemTag = "T";
|
||||
/// <summary>
|
||||
@ -77,12 +77,12 @@ namespace System.Management.Automation
|
||||
internal const string DictionaryEntryTag = "En";
|
||||
|
||||
/// <summary>
|
||||
/// Value of name attribute for dictionary key part in dictnary entry
|
||||
/// Value of name attribute for dictionary key part in dictionary entry
|
||||
/// </summary>
|
||||
internal const string DictionaryKey = "Key";
|
||||
|
||||
/// <summary>
|
||||
/// Value of name attribute for dictionary value part in dictnary entry
|
||||
/// Value of name attribute for dictionary value part in dictionary entry
|
||||
/// </summary>
|
||||
internal const string DictionaryValue = "Value";
|
||||
|
||||
|
@ -188,7 +188,7 @@ namespace System.Management.Automation
|
||||
internal Dictionary<string, PSModuleInfo> ModuleTable { get; } = new Dictionary<string, PSModuleInfo>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Get/set constraints for this execution environemnt
|
||||
/// Get/set constraints for this execution environment
|
||||
/// </summary>
|
||||
internal PSLanguageMode LanguageMode
|
||||
{
|
||||
@ -230,7 +230,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The list of appications that are allowed to be run. If the name "*"
|
||||
/// The list of applications that are allowed to be run. If the name "*"
|
||||
/// is in the list, then all applications can be run. (This is the default.)
|
||||
/// </summary>
|
||||
public List<string> Applications { get; } = new List<string>(new string[] { "*" });
|
||||
|
@ -459,7 +459,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <param name="origin">
|
||||
/// Specifies the origin of the comannd setting the alias.
|
||||
/// Specifies the origin of the command setting the alias.
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
@ -670,7 +670,7 @@ namespace System.Management.Automation
|
||||
} // RemoveAlias
|
||||
|
||||
/// <summary>
|
||||
/// Gets the alises by command name (used by metadata-driven help)
|
||||
/// Gets the aliases by command name (used by metadata-driven help)
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -3701,7 +3701,7 @@ namespace System.Management.Automation
|
||||
|
||||
// Don't support 'New-Item -Type Directory' on the Function provider
|
||||
// if the runspace has ever been in constrained language mode, as the mkdir
|
||||
// funciton can be abused
|
||||
// function can be abused
|
||||
if (context.ExecutionContext.HasRunspaceEverUsedConstrainedLanguageMode &&
|
||||
(providerInstance is Microsoft.PowerShell.Commands.FunctionProvider) &&
|
||||
(String.Equals(type, "Directory", StringComparison.OrdinalIgnoreCase)))
|
||||
|
@ -938,7 +938,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// If a VHD is mounted to a drive prior to the PowerShell session being launched,
|
||||
/// then such a drive has to be validated for its existance before performing
|
||||
/// then such a drive has to be validated for its existence before performing
|
||||
/// any operations on that drive to make sure that the drive is not unmounted.
|
||||
/// </summary>
|
||||
/// <param name="drive"></param>
|
||||
@ -956,7 +956,7 @@ namespace System.Management.Automation
|
||||
// A VHD mounted drive gets detected with a DriveType of DriveType.Fixed
|
||||
// when the VHD is mounted, however if the drive is unmounted, such a
|
||||
// stale drive is no longer valid and gets detected with DriveType.NoRootDirectory.
|
||||
// We would hit this situaltion in the following scenario:
|
||||
// We would hit this situation in the following scenario:
|
||||
// 1. Launch Powershell session 'A' and mount the VHD.
|
||||
// 2. Launch different powershell session 'B'.
|
||||
// 3. Unmount the VHD in session 'A'.
|
||||
|
@ -894,7 +894,7 @@ namespace System.Management.Automation
|
||||
/// Removes a function from the function table
|
||||
/// if the function was imported from the given module.
|
||||
///
|
||||
/// BUGBUG: This is only used by the implict remoting functions...
|
||||
/// BUGBUG: This is only used by the implicit remoting functions...
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">
|
||||
|
@ -110,7 +110,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal method used by RunspaceConfig for updatting providers.
|
||||
/// Internal method used by RunspaceConfig for updating providers.
|
||||
/// </summary>
|
||||
/// <param name="providerConfig"></param>
|
||||
private ProviderInfo AddProvider(ProviderConfigurationEntry providerConfig)
|
||||
|
@ -128,7 +128,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/set constraints for this execution environemnt
|
||||
/// Get/set constraints for this execution environment
|
||||
/// </summary>
|
||||
public PSLanguageMode LanguageMode
|
||||
{
|
||||
@ -154,7 +154,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public proxy for the list of appications that are allowed to be run. If the name "*"
|
||||
/// Public proxy for the list of applications that are allowed to be run. If the name "*"
|
||||
/// is in the list, then all applications can be run. (This is the default.)
|
||||
/// </summary>
|
||||
public List<string> Applications
|
||||
@ -187,7 +187,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Utility to check the visiblity of an object based on the current
|
||||
/// Utility to check the visibility of an object based on the current
|
||||
/// command origin. If the object implements IHasSessionStateEntryVisibility
|
||||
/// then the check will be made. If the check fails, then an exception will be thrown...
|
||||
/// </summary>
|
||||
@ -359,7 +359,7 @@ namespace System.Management.Automation
|
||||
} // SessionStatePublic
|
||||
|
||||
/// <summary>
|
||||
/// This enum defines the visiblity of execution environment elements...
|
||||
/// This enum defines the visibility of execution environment elements...
|
||||
/// </summary>
|
||||
public enum SessionStateEntryVisibility
|
||||
{
|
||||
@ -386,7 +386,7 @@ namespace System.Management.Automation
|
||||
public enum PSLanguageMode
|
||||
{
|
||||
/// <summary>
|
||||
/// All PowerShell langugage elements are available
|
||||
/// All PowerShell language elements are available
|
||||
/// </summary>
|
||||
FullLanguage = 0,
|
||||
|
||||
|
@ -1948,7 +1948,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
get
|
||||
{
|
||||
// this is kind of our own lazy initization logic here.
|
||||
// this is kind of our own lazy initialization logic here.
|
||||
if (_typeResolutionState == null)
|
||||
{
|
||||
if (this.Parent != null)
|
||||
@ -2349,7 +2349,7 @@ namespace System.Management.Automation
|
||||
private Dictionary<string, List<string>> _commandsToAliasesCache = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the alises by command name (used by metadata-driven help)
|
||||
/// Gets the aliases by command name (used by metadata-driven help)
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -76,7 +76,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// The security descriptor for the item at the sepecified path.
|
||||
/// The security descriptor for the item at the specified path.
|
||||
/// </returns>
|
||||
///
|
||||
internal Collection<PSObject> GetSecurityDescriptor(string path,
|
||||
@ -115,7 +115,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// Nothing. The security descriptor for the item at the sepecified path is
|
||||
/// Nothing. The security descriptor for the item at the specified path is
|
||||
/// written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
@ -219,7 +219,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// The security descriptor that was set on the item at the sepecified path.
|
||||
/// The security descriptor that was set on the item at the specified path.
|
||||
/// </returns>
|
||||
///
|
||||
internal Collection<PSObject> SetSecurityDescriptor(string path, ObjectSecurity securityDescriptor)
|
||||
@ -263,7 +263,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// Nothing. The security descriptor that was set on the item at the sepecified path
|
||||
/// Nothing. The security descriptor that was set on the item at the specified path
|
||||
/// is written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
@ -416,7 +416,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// Nothing. The security descriptor for the item at the sepecified path is
|
||||
/// Nothing. The security descriptor for the item at the specified path is
|
||||
/// written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
@ -538,7 +538,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// Nothing. The security descriptor for the item at the sepecified type is
|
||||
/// Nothing. The security descriptor for the item at the specified type is
|
||||
/// written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
@ -570,7 +570,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// Nothing. The security descriptor for the item at the sepecified type is
|
||||
/// Nothing. The security descriptor for the item at the specified type is
|
||||
/// written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
|
@ -77,7 +77,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// When prefixing a variable "script" makes the variable
|
||||
/// global to the scipt but not global to the entire session.
|
||||
/// global to the script but not global to the entire session.
|
||||
/// </summary>
|
||||
internal const string Script = "SCRIPT";
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a variable useing a pre-parsed variablePath object instead of a string.
|
||||
/// Set a variable using a pre-parsed variablePath object instead of a string.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="variablePath">
|
||||
@ -1226,7 +1226,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a variable useing a pre-parsed variablePath object instead of a string.
|
||||
/// Set a variable using a pre-parsed variablePath object instead of a string.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="variablePath">
|
||||
|
@ -284,7 +284,7 @@ namespace System.Management.Automation
|
||||
public abstract class PSPropertyAdapter
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the type hiercharchy for the given object
|
||||
/// Returns the type hierarchy for the given object
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
|
||||
public virtual Collection<string> GetTypeNameHierarchy(object baseObject)
|
||||
|
@ -408,7 +408,7 @@ namespace System.Management.Automation.Internal
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Transaction that should be managed idependently of
|
||||
/// Creates a new Transaction that should be managed independently of
|
||||
/// any parent transactions.
|
||||
/// </summary>
|
||||
///
|
||||
@ -418,7 +418,7 @@ namespace System.Management.Automation.Internal
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Transaction that should be managed idependently of
|
||||
/// Creates a new Transaction that should be managed independently of
|
||||
/// any parent transactions.
|
||||
/// </summary>
|
||||
///
|
||||
|
@ -467,7 +467,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// An internal constructor which constructs a ParameterMetadata object
|
||||
/// from compiled commmand parameter metadata. ParameterMetadata
|
||||
/// from compiled command parameter metadata. ParameterMetadata
|
||||
/// is a proxy written on top of CompiledCommandParameter
|
||||
/// </summary>
|
||||
/// <param name="cmdParameterMD">
|
||||
@ -1089,7 +1089,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// An instance of the TypeMetdata for the specified runtime-defined parameters. The metadata
|
||||
/// An instance of the TypeMetadata for the specified runtime-defined parameters. The metadata
|
||||
/// is always constructed on demand and never cached.
|
||||
/// </returns>
|
||||
///
|
||||
@ -1131,7 +1131,7 @@ namespace System.Management.Automation
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// An instance of the TypeMetdata for the specified type. The metadata may get
|
||||
/// An instance of the TypeMetadata for the specified type. The metadata may get
|
||||
/// constructed on-demand or may be retrieved from the cache.
|
||||
/// </returns>
|
||||
///
|
||||
@ -1248,7 +1248,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Gets a dictionary of the compiled parameter metadata for this Type.
|
||||
/// The dictionary keys are the names of the parameters (or aliases) and
|
||||
/// the values are the compiled parameter metdata.
|
||||
/// the values are the compiled parameter metadata.
|
||||
/// </summary>
|
||||
///
|
||||
internal Dictionary<string, CompiledCommandParameter> BindableParameters { get; }
|
||||
|
@ -1564,7 +1564,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This constructor takes a colletion of errors occurred during construction
|
||||
/// This constructor takes a collection of errors occurred during construction
|
||||
/// time.
|
||||
/// </summary>
|
||||
/// <param name="loadErrors">
|
||||
@ -4225,7 +4225,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
ConcurrentBag<string> errors = new ConcurrentBag<string>();
|
||||
|
||||
// Always clear the consolidate memebrs - they need to be recalculated
|
||||
// Always clear the consolidate members - they need to be recalculated
|
||||
// anytime the types are updated...
|
||||
ClearConsolidatedMembers();
|
||||
|
||||
@ -4252,7 +4252,7 @@ namespace System.Management.Automation.Runspaces
|
||||
TypeData typeData = new TypeData(typeName);
|
||||
ConcurrentBag<string> errors = new ConcurrentBag<string>();
|
||||
|
||||
// Always clear the consolidate memebrs - they need to be recalculated
|
||||
// Always clear the consolidate members - they need to be recalculated
|
||||
// anytime the types are updated...
|
||||
ClearConsolidatedMembers();
|
||||
|
||||
@ -4275,7 +4275,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// Host passed to <paramref name="authorizationManager"/>. Can be null if no interactive questions should be asked.
|
||||
/// </param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// 1. The TypeTable cannot be updated becasue the TypeTable might have
|
||||
/// 1. The TypeTable cannot be updated because the TypeTable might have
|
||||
/// been created outside of the Runspace.
|
||||
/// </exception>
|
||||
internal void Update(
|
||||
@ -4322,7 +4322,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </param>
|
||||
/// <param name="failToLoadFile">Indicate if the file cannot be loaded due to the security reason</param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// 1. The TypeTable cannot be updated becasue the TypeTable might have
|
||||
/// 1. The TypeTable cannot be updated because the TypeTable might have
|
||||
/// been created outside of the Runspace.
|
||||
/// </exception>
|
||||
internal void Update(
|
||||
@ -4350,7 +4350,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </param>
|
||||
/// <param name="failToLoadFile">Indicate if the file cannot be loaded due to security reason</param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// 1. The TypeTable cannot be updated becasue the TypeTable might have
|
||||
/// 1. The TypeTable cannot be updated because the TypeTable might have
|
||||
/// been created outside of the Runspace.
|
||||
/// </exception>
|
||||
internal void Update(
|
||||
|
@ -1102,7 +1102,7 @@ namespace System.Management.Automation.Runspaces
|
||||
{
|
||||
if ($psversiontable.psversion.Major -lt 3)
|
||||
{
|
||||
# ok to cast CommandTypes enum to HelpCategory because string/indentifier for
|
||||
# ok to cast CommandTypes enum to HelpCategory because string/identifier for
|
||||
# cmdlet,function,filter,alias,externalscript is identical.
|
||||
# it is ok to fail for other enum values (i.e. for Application)
|
||||
$commandName = $this.Name
|
||||
|
@ -95,7 +95,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
//
|
||||
// we use AES algorithm which supports key
|
||||
// lenghts of 128, 192 and 256 bits.
|
||||
// lengths of 128, 192 and 256 bits.
|
||||
// We throw ArgumentException if the key is
|
||||
// of any other length
|
||||
//
|
||||
@ -943,7 +943,7 @@ namespace System.Management.Automation
|
||||
// Porting note: only Windows supports the SecurityPrincipal API of .NET. Due to
|
||||
// advanced privilege models, the correct approach on Unix is to assume the user has
|
||||
// permissions, attempt the task, and error gracefully if the task fails due to
|
||||
// permissions. To fit into PowerShell's existing model of pre-emptively checking
|
||||
// permissions. To fit into PowerShell's existing model of preemptively checking
|
||||
// permissions (which cannot be assumed on Unix), we "assume" the user is an
|
||||
// administrator by returning true, thus nullifying this check on Unix.
|
||||
#if UNIX
|
||||
|
@ -17,7 +17,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Constructs a variable attribute collection attached to
|
||||
/// the specified variable. Whenever the attributes change
|
||||
/// the variable value is varified against the attribute.
|
||||
/// the variable value is verified against the attribute.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="variable">
|
||||
|
@ -75,7 +75,7 @@ namespace System.Management.Automation
|
||||
|
||||
// Null is returned whenever the requested variable is String.Empty.
|
||||
// As per Powershell V1 implementation:
|
||||
// 1. If the requested varible exists in the session scope, the variable value is returned.
|
||||
// 1. If the requested variable exists in the session scope, the variable value is returned.
|
||||
// 2. If the requested variable is not null and does not exist in the session scope, then a null value is returned to the pipeline.
|
||||
// 3. If the requested variable is null then an NewArgumentNullException is thrown.
|
||||
// PowerShell V3 has the similar experience.
|
||||
|
@ -296,7 +296,7 @@ namespace System.Management.Automation
|
||||
Ignore = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Wait on unhandled breakpoint events until a handler is avaialable.
|
||||
/// Wait on unhandled breakpoint events until a handler is available.
|
||||
/// </summary>
|
||||
Wait
|
||||
}
|
||||
@ -594,7 +594,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="command">Command string</param>
|
||||
/// <param name="output">Output collection</param>
|
||||
/// <returns>DebuggerCommand containing information on whether and how the command was procssed.</returns>
|
||||
/// <returns>DebuggerCommand containing information on whether and how the command was processed.</returns>
|
||||
internal virtual DebuggerCommand InternalProcessCommand(string command, IList<PSObject> output)
|
||||
{
|
||||
throw new PSNotImplementedException();
|
||||
@ -1330,7 +1330,7 @@ namespace System.Management.Automation
|
||||
#region enabling/disabling breakpoints
|
||||
|
||||
/// <summary>
|
||||
/// Implmentation of Enable-PSBreakpoint cmdlet.
|
||||
/// Implementation of Enable-PSBreakpoint cmdlet.
|
||||
/// </summary>
|
||||
internal void EnableBreakpoint(Breakpoint bp)
|
||||
{
|
||||
@ -2337,7 +2337,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="command">Command string</param>
|
||||
/// <param name="output">output</param>
|
||||
/// <returns>DebuggerCommand containing information on whether and how the command was procssed.</returns>
|
||||
/// <returns>DebuggerCommand containing information on whether and how the command was processed.</returns>
|
||||
internal override DebuggerCommand InternalProcessCommand(string command, IList<PSObject> output)
|
||||
{
|
||||
if (!DebuggerStopped)
|
||||
@ -3818,7 +3818,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Process debugger or PowerShell command/script.
|
||||
/// </summary>
|
||||
/// <param name="command">PowreShell command</param>
|
||||
/// <param name="command">PowerShell command</param>
|
||||
/// <param name="output">Output collection</param>
|
||||
/// <returns>DebuggerCommandResults</returns>
|
||||
public override DebuggerCommandResults ProcessCommand(PSCommand command, PSDataCollection<PSObject> output)
|
||||
@ -4313,7 +4313,7 @@ namespace System.Management.Automation
|
||||
if (parentStackFrame == null) { return null; }
|
||||
|
||||
// Attempt to find parent script file create script block with Ast to
|
||||
// find correct line and offset adjustements.
|
||||
// find correct line and offset adjustments.
|
||||
if ((_parentScriptBlockAst == null) &&
|
||||
!string.IsNullOrEmpty(parentStackFrame.ScriptName) &&
|
||||
System.IO.File.Exists(parentStackFrame.ScriptName))
|
||||
|
@ -32,7 +32,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="ownerId">
|
||||
/// Instace Id of the object creating this instance
|
||||
/// Instance Id of the object creating this instance
|
||||
/// </param>
|
||||
/// <param name="callback">
|
||||
/// A AsyncCallback to call once the async operation completes.
|
||||
|
@ -272,7 +272,7 @@ namespace System.Management.Automation.Runspaces
|
||||
internal PipelineResultTypes[] MergeInstructions { get; set; } = new PipelineResultTypes[MaxMergeType];
|
||||
|
||||
/// <summary>
|
||||
/// Merges this commands resutls
|
||||
/// Merges this commands results
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="myResult">
|
||||
@ -874,7 +874,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string represenation of the command collection to be used for history.
|
||||
/// Gets the string representation of the command collection to be used for history.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// string representing the command(s)
|
||||
|
@ -419,7 +419,7 @@ namespace System.Management.Automation.Runspaces
|
||||
public enum RunspaceCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// No additional capabilites beyond a default runspace.
|
||||
/// No additional capabilities beyond a default runspace.
|
||||
/// </summary>
|
||||
Default = 0x0,
|
||||
|
||||
@ -674,7 +674,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get unqiue id for this instance of runspace. It is primarily used
|
||||
/// Get unique id for this instance of runspace. It is primarily used
|
||||
/// for logging purposes
|
||||
/// </summary>
|
||||
public Guid InstanceId { get;
|
||||
@ -1394,7 +1394,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with a <see cref="Command"/> object for specified command parameter.
|
||||
/// A pipeline pre-filled with a <see cref="Command"/> object for specified command parameter.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
@ -1407,7 +1407,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <param name="addToHistory">if true command is added to history</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with a <see cref="Command"/> object for specified command parameter.
|
||||
/// A pipeline pre-filled with a <see cref="Command"/> object for specified command parameter.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
@ -1430,7 +1430,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <param name="addToHistory">if true command is added to history</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with Command specified in commandString.
|
||||
/// A pipeline pre-filled with Command specified in commandString.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
|
@ -279,7 +279,7 @@ namespace System.Management.Automation.Runspaces
|
||||
OpenHelper(syncCall);
|
||||
if (etwEnabled) RunspaceEventSource.Log.OpenRunspaceStop();
|
||||
|
||||
// We report startup telemtry when opening the runspace - because this is the first time
|
||||
// We report startup telementry when opening the runspace - because this is the first time
|
||||
// we are really using PowerShell. This isn't the cleanest place though, because
|
||||
// sometimes there are many runspaces created - the callee ensures telemetry is only
|
||||
// reported once. Note that if the host implements IHostProvidesTelemetryData, we rely
|
||||
@ -541,11 +541,11 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Createa a pipeline froma command string
|
||||
/// Create a pipeline from a command string
|
||||
/// </summary>
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with Commands specified in commandString.
|
||||
/// A pipeline pre-filled with Commands specified in commandString.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
@ -566,7 +566,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <param name="addToHistory">if true command is added to history</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with Commands specified in commandString.
|
||||
/// A pipeline pre-filled with Commands specified in commandString.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
@ -600,7 +600,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <param name="command">A valid command string</param>
|
||||
/// <param name="addToHistory">if true command is added to history</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with Commands specified in commandString.
|
||||
/// A pipeline pre-filled with Commands specified in commandString.
|
||||
/// </returns>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// command is null
|
||||
@ -623,7 +623,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// <param name="addToHistory">if true command is added to history</param>
|
||||
/// <param name="isNested">True for nested pipeline</param>
|
||||
/// <returns>
|
||||
/// A pipline pre-filled with Commands specified in commandString.
|
||||
/// A pipeline pre-filled with Commands specified in commandString.
|
||||
/// </returns>
|
||||
protected abstract Pipeline CoreCreatePipeline(string command, bool addToHistory, bool isNested);
|
||||
|
||||
@ -866,7 +866,7 @@ namespace System.Management.Automation.Runspaces
|
||||
throw e;
|
||||
}
|
||||
|
||||
//Add the pipeline to list of Excuting pipeline.
|
||||
//Add the pipeline to list of Executing pipeline.
|
||||
//Note:_runningPipelines is always accessed with the lock so
|
||||
//there is no need to create a synchronized version of list
|
||||
RunningPipelines.Add(pipeline);
|
||||
@ -892,7 +892,7 @@ namespace System.Management.Automation.Runspaces
|
||||
Dbg.Assert(RunspaceState != RunspaceState.BeforeOpen,
|
||||
"Runspace should not be before open when pipeline is running");
|
||||
|
||||
//Remove the pipeline to list of Excuting pipeline.
|
||||
//Remove the pipeline to list of Executing pipeline.
|
||||
//Note:_runningPipelines is always accessed with the lock so
|
||||
//there is no need to create a synchronized version of list
|
||||
RunningPipelines.Remove(pipeline);
|
||||
@ -1529,7 +1529,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Protected methods to be implemented by derived class.
|
||||
/// This does the acutal work of setting variable.
|
||||
/// This does the actual work of setting variable.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the variable to set</param>
|
||||
/// <param name="value">The value to set it to</param>
|
||||
|
@ -480,7 +480,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Creates a RunspacePool
|
||||
/// on the specified remote runspace compuer.
|
||||
/// on the specified remote runspace computer.
|
||||
/// <paramref name="maxRunspaces"/>
|
||||
/// limits the number of Runspaces that can exist in this
|
||||
/// pool. The minimum pool size is set to
|
||||
@ -498,10 +498,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// The TypeTable to use while deserializing/serializing remote objects.
|
||||
/// TypeTable has the following information used by serializer:
|
||||
/// 1. SerializationMethod
|
||||
/// 2. SerailizationDepth
|
||||
/// 2. SerializationDepth
|
||||
/// 3. SpecificSerializationProperties
|
||||
/// TypeTable has the following inforamtion used by deserializer:
|
||||
/// 1. TargetTypeForDeserializaiton
|
||||
/// TypeTable has the following information used by deserializer:
|
||||
/// 1. TargetTypeForDeserialization
|
||||
/// 2. TypeConverter
|
||||
///
|
||||
/// If <paramref name="typeTable"/> is null no custom serialization/deserialization
|
||||
@ -527,7 +527,7 @@ namespace System.Management.Automation.Runspaces
|
||||
|
||||
/// <summary>
|
||||
/// Creates a RunspacePool
|
||||
/// on the specified remote runspace compuer.
|
||||
/// on the specified remote runspace computer.
|
||||
/// <paramref name="maxRunspaces"/>
|
||||
/// limits the number of Runspaces that can exist in this
|
||||
/// pool. The minimum pool size is set to
|
||||
@ -545,10 +545,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// The TypeTable to use while deserializing/serializing remote objects.
|
||||
/// TypeTable has the following information used by serializer:
|
||||
/// 1. SerializationMethod
|
||||
/// 2. SerailizationDepth
|
||||
/// 2. SerializationDepth
|
||||
/// 3. SpecificSerializationProperties
|
||||
/// TypeTable has the following inforamtion used by deserializer:
|
||||
/// 1. TargetTypeForDeserializaiton
|
||||
/// TypeTable has the following information used by deserializer:
|
||||
/// 1. TargetTypeForDeserialization
|
||||
/// 2. TypeConverter
|
||||
///
|
||||
/// If <paramref name="typeTable"/> is null no custom serialization/deserialization
|
||||
@ -600,10 +600,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// The TypeTable to use while deserializing/serializing remote objects.
|
||||
/// TypeTable has the following information used by serializer:
|
||||
/// 1. SerializationMethod
|
||||
/// 2. SerailizationDepth
|
||||
/// 2. SerializationDepth
|
||||
/// 3. SpecificSerializationProperties
|
||||
/// TypeTable has the following inforamtion used by deserializer:
|
||||
/// 1. TargetTypeForDeserializaiton
|
||||
/// TypeTable has the following information used by deserializer:
|
||||
/// 1. TargetTypeForDeserialization
|
||||
/// 2. TypeConverter
|
||||
/// </param>
|
||||
/// <param name="host"></param>
|
||||
@ -621,10 +621,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// The TypeTable to use while deserializing/serializing remote objects.
|
||||
/// TypeTable has the following information used by serializer:
|
||||
/// 1. SerializationMethod
|
||||
/// 2. SerailizationDepth
|
||||
/// 2. SerializationDepth
|
||||
/// 3. SpecificSerializationProperties
|
||||
/// TypeTable has the following inforamtion used by deserializer:
|
||||
/// 1. TargetTypeForDeserializaiton
|
||||
/// TypeTable has the following information used by deserializer:
|
||||
/// 1. TargetTypeForDeserialization
|
||||
/// 2. TypeConverter
|
||||
/// </param>
|
||||
/// <param name="host"></param>
|
||||
@ -647,10 +647,10 @@ namespace System.Management.Automation.Runspaces
|
||||
/// The TypeTable to use while deserializing/serializing remote objects.
|
||||
/// TypeTable has the following information used by serializer:
|
||||
/// 1. SerializationMethod
|
||||
/// 2. SerailizationDepth
|
||||
/// 2. SerializationDepth
|
||||
/// 3. SpecificSerializationProperties
|
||||
/// TypeTable has the following inforamtion used by deserializer:
|
||||
/// 1. TargetTypeForDeserializaiton
|
||||
/// TypeTable has the following information used by deserializer:
|
||||
/// 1. TargetTypeForDeserialization
|
||||
/// 2. TypeConverter
|
||||
/// </param>
|
||||
/// <param name="applicationArguments">
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execution status of assoicated pipeline
|
||||
/// Execution status of associated pipeline
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public PipelineState ExecutionStatus
|
||||
@ -245,7 +245,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
#region ICloneable Members
|
||||
|
||||
/// <summary>
|
||||
/// Retuns a clone of this object
|
||||
/// Returns a clone of this object
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public HistoryInfo Clone()
|
||||
@ -326,7 +326,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Udpate the history entry corresponding to id.
|
||||
/// Update the history entry corresponding to id.
|
||||
/// </summary>
|
||||
/// <param name="id">id of history entry to be updated</param>
|
||||
/// <param name="status">status to be updated</param>
|
||||
@ -497,7 +497,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
long index, SmallestID = 0;
|
||||
//if we change the defaulthistory size and when no of entries exceed the size, then
|
||||
//we need to get the smallest entry in the buffer when we want to clear the oldest entry
|
||||
//eg if size is 5 and then the enrties can be 7,6,1,2,3
|
||||
//eg if size is 5 and then the entries can be 7,6,1,2,3
|
||||
if (_capacity != DefaultHistorySize)
|
||||
SmallestID = SmallestIDinBuffer();
|
||||
if (!newest.IsPresent)
|
||||
@ -585,7 +585,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
List<HistoryInfo> cmdlist = new List<HistoryInfo>();
|
||||
long SmallestID = 1;
|
||||
//if buffersize is changes,Get the smallest entry thts not cleared in the buffer
|
||||
//if buffersize is changes,Get the smallest entry that's not cleared in the buffer
|
||||
if (_capacity != DefaultHistorySize)
|
||||
SmallestID = SmallestIDinBuffer();
|
||||
if (count != 0)
|
||||
@ -613,7 +613,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
long id = _countEntriesAdded;
|
||||
for (long i = 0; i <= count - 1;)
|
||||
{
|
||||
//if buffersize is changed,we have to loop from max enttry to min entry thats not cleraed
|
||||
//if buffersize is changed,we have to loop from max entry to min entry thats not cleared
|
||||
if (_capacity != DefaultHistorySize)
|
||||
{
|
||||
if (_countEntriesAdded > _capacity)
|
||||
@ -1056,7 +1056,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
// The defualt value for _count is the size of the history buffer.
|
||||
// The default value for _count is the size of the history buffer.
|
||||
if (!_countParameterSpecified)
|
||||
{
|
||||
_count = history.Buffercapacity();
|
||||
@ -1508,7 +1508,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// mshObject to be converted to HistoryInfo.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// HistoryInfo object if coversion is successful else null.
|
||||
/// HistoryInfo object if conversion is successful else null.
|
||||
/// </returns>
|
||||
#pragma warning disable 0162
|
||||
private
|
||||
@ -1991,7 +1991,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clears the session history based on the input parametera
|
||||
/// Clears the session history based on the input parameter
|
||||
/// <param name="id" >id of the entry to be cleared</param>
|
||||
/// <param name="count" > count of entries to be cleared</param>
|
||||
/// <param name="cmdline" >cmdline string to be cleared</param>
|
||||
|
@ -79,8 +79,8 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="allUsersAllHosts">The profile file name for all users and all hosts.</param>
|
||||
/// <param name="allUsersCurrentHost">The profile file name for all users and current host.</param>
|
||||
/// <param name="currentUserAllHosts">The profile file name for cuurrent user and all hosts.</param>
|
||||
/// <param name="currentUserCurrentHost">The profile name for cuurrent user and current host.</param>
|
||||
/// <param name="currentUserAllHosts">The profile file name for current user and all hosts.</param>
|
||||
/// <param name="currentUserCurrentHost">The profile name for current user and current host.</param>
|
||||
/// <returns>A PSObject whose base object is currentUserCurrentHost and with notes for the other 4 parameters.</returns>
|
||||
internal static PSObject GetDollarProfile(string allUsersAllHosts, string allUsersCurrentHost, string currentUserAllHosts, string currentUserCurrentHost)
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ namespace System.Management.Automation.Internal.Host
|
||||
/// <value></value>
|
||||
/// <exception cref="NotImplementedException">
|
||||
///
|
||||
/// when the external host's InstaceId is a zero Guid.
|
||||
/// when the external host's InstanceId is a zero Guid.
|
||||
///
|
||||
/// </exception>
|
||||
public override System.Guid InstanceId
|
||||
|
@ -424,7 +424,7 @@ namespace System.Management.Automation.Internal.Host
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
///
|
||||
/// If the debug preference is not a valid ActionPrefernce value.
|
||||
/// If the debug preference is not a valid ActionPreference value.
|
||||
///
|
||||
/// </exception>
|
||||
|
||||
@ -482,11 +482,11 @@ namespace System.Management.Automation.Internal.Host
|
||||
/// </summary>
|
||||
/// <param name="informationalBuffers">
|
||||
/// Buffers to which Debug, Verbose, Warning, Progress, Information messages
|
||||
/// will be writtern to.
|
||||
/// will be written to.
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// This method is not thread safe. Caller should make sure of the
|
||||
/// assosciated risks.
|
||||
/// associated risks.
|
||||
/// </remarks>
|
||||
internal void SetInformationalMessageBuffers(PSInformationalBuffers informationalBuffers)
|
||||
{
|
||||
@ -910,7 +910,7 @@ namespace System.Management.Automation.Internal.Host
|
||||
/// Presents a dialog allowing the user to choose options from a set of options.
|
||||
/// </summary>
|
||||
/// <param name="caption">
|
||||
/// Caption to preceed or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// Caption to precede or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// </param>
|
||||
/// <param name="message">
|
||||
/// A message that describes what the choice is for.
|
||||
|
@ -529,7 +529,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
else
|
||||
{
|
||||
// For wahtever reason, cache is corrupted. Hence override the cache content.
|
||||
// For whatever reason, cache is corrupted. Hence override the cache content.
|
||||
if (enable)
|
||||
{
|
||||
debugPreferenceCache = new Hashtable();
|
||||
@ -604,7 +604,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// Open the runspace
|
||||
/// </summary>
|
||||
/// <param name="syncCall">
|
||||
/// paramter which control if Open is done synchronously or asynchronously
|
||||
/// parameter which control if Open is done synchronously or asynchronously
|
||||
/// </param>
|
||||
protected override void OpenHelper(bool syncCall)
|
||||
{
|
||||
@ -796,7 +796,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// Returns the thread that must be used to execute pipelines when CreateThreadOptions is ReuseThread
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The pipeline calls this function after ensuring there is a single thread in the pipeline, so no locking is neccesary
|
||||
/// The pipeline calls this function after ensuring there is a single thread in the pipeline, so no locking is necessary
|
||||
/// </remarks>
|
||||
internal PipelineThread GetPipelineThread()
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace System.Management.Automation.Runspaces
|
||||
}
|
||||
else
|
||||
{
|
||||
apartmentState = this.LocalRunspace.ApartmentState; // use the Runspace apartmet state
|
||||
apartmentState = this.LocalRunspace.ApartmentState; // use the Runspace apartment state
|
||||
}
|
||||
|
||||
if (apartmentState != ApartmentState.Unknown)
|
||||
@ -821,7 +821,7 @@ namespace System.Management.Automation.Runspaces
|
||||
private PipelineStopper _stopper;
|
||||
|
||||
/// <summary>
|
||||
/// Gets PipelineStopper object which maitains stack of PipelineProcessor
|
||||
/// Gets PipelineStopper object which maintains stack of PipelineProcessor
|
||||
/// for this pipeline
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
@ -1081,7 +1081,7 @@ namespace System.Management.Automation.Runspaces
|
||||
internal
|
||||
void AddHistoryEntryFromAddHistoryCmdlet()
|
||||
{
|
||||
//This method can be called by mulitple times during a single
|
||||
//This method can be called by multiple times during a single
|
||||
//pipeline execution. For ex: a script can execute add-history
|
||||
//command multiple times. However we should add entry only
|
||||
//once.
|
||||
@ -1129,7 +1129,7 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// ExecutionContext, if it available in TLS
|
||||
/// Null, if ExecutionContext is not availalbe in TLS
|
||||
/// Null, if ExecutionContext is not available in TLS
|
||||
/// </returns>
|
||||
internal static System.Management.Automation.ExecutionContext GetExecutionContextFromTLS()
|
||||
{
|
||||
@ -1437,7 +1437,7 @@ namespace System.Management.Automation.Runspaces
|
||||
{
|
||||
_stack.Peek().ExecutionFailed = true;
|
||||
}
|
||||
// If this is the last pipeline processor on the stack, then propigate it's execution status
|
||||
// If this is the last pipeline processor on the stack, then propagate it's execution status
|
||||
if (_stack.Count == 1 && _localPipeline != null)
|
||||
{
|
||||
_localPipeline.SetHadErrors(oldPipe.ExecutionFailed);
|
||||
@ -1460,7 +1460,7 @@ namespace System.Management.Automation.Runspaces
|
||||
copyStack = _stack.ToArray();
|
||||
}
|
||||
|
||||
// Propigate error from the toplevel operation through to enclosing the LocalPipeline.
|
||||
// Propagate error from the toplevel operation through to enclosing the LocalPipeline.
|
||||
if (copyStack.Length > 0)
|
||||
{
|
||||
PipelineProcessor topLevel = copyStack[copyStack.Length - 1];
|
||||
|
@ -238,9 +238,9 @@ namespace System.Management.Automation.Host
|
||||
/// If the UI property returns null, the engine should not call this method.
|
||||
///
|
||||
///
|
||||
/// <!--Was: ExecuteSubShell. "subshell" inplies a new child engine, which is not the case here. This is called during the
|
||||
/// <!--Was: ExecuteSubShell. "subshell" implies a new child engine, which is not the case here. This is called during the
|
||||
/// interruption of a pipeline to allow nested pipeline(s) to be run as a way to the user to suspend execution while he
|
||||
/// evalautes other commands. It does not create a truly new engine instance with new session state.-->
|
||||
/// evaluates other commands. It does not create a truly new engine instance with new session state.-->
|
||||
///
|
||||
/// </remarks>
|
||||
/// <seealso cref="System.Management.Automation.Host.PSHost.ExitNestedPrompt"/>
|
||||
@ -258,7 +258,7 @@ namespace System.Management.Automation.Host
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// Typicalled called by the engine in response to some user action that resumes a suspended pipeline, such as with the
|
||||
/// Typically called by the engine in response to some user action that resumes a suspended pipeline, such as with the
|
||||
/// 'continue-command' intrinsic cmdlet. Before calling this method, the engine should clear out the loop-specific
|
||||
/// variables that were set when the loop was created.
|
||||
///
|
||||
@ -291,7 +291,7 @@ namespace System.Management.Automation.Host
|
||||
///
|
||||
/// If the host is using an in-process Runspace, then the BaseObject property can be a non-null value a live object.
|
||||
/// No guarantees are made as to the app domain or thread that the BaseObject is accessed if it is accessed in the
|
||||
/// runspace. No guarantees of threadsafety or re-entrancy are made. The object set in the BaseObject property of
|
||||
/// runspace. No guarantees of threadsafety or reentrancy are made. The object set in the BaseObject property of
|
||||
/// the value returned by this method is responsible for ensuring its own threadsafety and re-entrance safety.
|
||||
/// Note that thread(s) accessing that object may not necessarily be the same from one access to the next.
|
||||
///
|
||||
@ -364,7 +364,7 @@ namespace System.Management.Automation.Host
|
||||
/// <summary>
|
||||
/// Used by hosting applications to notify PowerShell engine that it is
|
||||
/// being hosted in a console based application and the Pipeline execution
|
||||
/// thread should call SetThreadUILanguage(0). This propery is currently
|
||||
/// thread should call SetThreadUILanguage(0). This property is currently
|
||||
/// used by ConsoleHost only and in future releases we may consider
|
||||
/// exposing this publicly.
|
||||
/// </summary>
|
||||
|
@ -880,7 +880,7 @@ namespace System.Management.Automation.Host
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Gets and sets the bottom of the rectanngle
|
||||
/// Gets and sets the bottom of the rectangle
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@ -909,7 +909,7 @@ namespace System.Management.Automation.Host
|
||||
/// </param>
|
||||
/// <param name="bottom">
|
||||
///
|
||||
/// The bottom of the rectanngle
|
||||
/// The bottom of the rectangle
|
||||
///
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentException">
|
||||
@ -2145,7 +2145,7 @@ namespace System.Management.Automation.Host
|
||||
/// equal to the largest number of cells a string in <paramref name="contents"/> takes. The
|
||||
/// foreground and background colors of the cells are initialized to
|
||||
/// <paramref name="foregroundColor"/> and <paramref name="backgroundColor"/>, respectively.
|
||||
/// The resuling array is suitable for use with <see cref="PSHostRawUserInterface.SetBufferContents(Rectangle, BufferCell)"/>
|
||||
/// The resulting array is suitable for use with <see cref="PSHostRawUserInterface.SetBufferContents(Rectangle, BufferCell)"/>
|
||||
/// and <see cref="PSHostRawUserInterface.SetBufferContents(Coordinates, BufferCell[,])"/>.
|
||||
///
|
||||
/// </remark>
|
||||
|
@ -237,7 +237,7 @@ namespace System.Management.Automation.Host
|
||||
//
|
||||
// Ideally, this would be associated with the host instance, but remoting recycles host instances
|
||||
// for each command that gets invoked (so that it can keep track of the order of commands and their
|
||||
// output.) Therefore, we store this transcripton data in the runspace. However, the
|
||||
// output.) Therefore, we store this transcription data in the runspace. However, the
|
||||
// Runspace.DefaultRunspace property isn't always available (i.e.: when the pipeline is being set up),
|
||||
// so we have to cache it the first time it becomes available.
|
||||
private TranscriptionData TranscriptionData
|
||||
@ -721,7 +721,7 @@ namespace System.Management.Automation.Host
|
||||
/// Constructs a 'dialog' where the user is presented with a number of fields for which to supply values.
|
||||
/// </summary>
|
||||
/// <param name="caption">
|
||||
/// Caption to preceed or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// Caption to precede or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// </param>
|
||||
/// <param name="message">
|
||||
/// A text description of the set of fields to be prompt.
|
||||
@ -733,7 +733,7 @@ namespace System.Management.Automation.Host
|
||||
/// A Dictionary object with results of prompting. The keys are the field names from the FieldDescriptions, the values
|
||||
/// are objects representing the values of the corresponding fields as collected from the user. To the extent possible,
|
||||
/// the host should return values of the type(s) identified in the FieldDescription. When that is not possible (for
|
||||
/// example, the type is not avaiable to the host), the host should return the value as a string.
|
||||
/// example, the type is not available to the host), the host should return the value as a string.
|
||||
/// </returns>
|
||||
/// <seealso cref="System.Management.Automation.Host.PSHostUserInterface.ReadLine"/>
|
||||
/// <seealso cref="System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString"/>
|
||||
@ -815,7 +815,7 @@ namespace System.Management.Automation.Host
|
||||
/// Presents a dialog allowing the user to choose an option from a set of options.
|
||||
/// </summary>
|
||||
/// <param name="caption">
|
||||
/// Caption to preceed or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// Caption to precede or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// </param>
|
||||
/// <param name="message">
|
||||
/// A message that describes what the choice is for.
|
||||
@ -1145,7 +1145,7 @@ namespace System.Management.Automation.Host
|
||||
/// Presents a dialog allowing the user to choose options from a set of options.
|
||||
/// </summary>
|
||||
/// <param name="caption">
|
||||
/// Caption to preceed or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// Caption to precede or title the prompt. E.g. "Parameters for get-foo (instance 1 of 2)"
|
||||
/// </param>
|
||||
/// <param name="message">
|
||||
/// A message that describes what the choice is for.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************++
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Descripton:
|
||||
Description:
|
||||
|
||||
Windows Vista and later support non-traditional UI fallback ie., a
|
||||
user on an Arabic machine can choose either French or English(US) as
|
||||
@ -61,8 +61,8 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
get
|
||||
{
|
||||
// First traverse the parent heirarchy as established by CLR.
|
||||
// This is required because there is difference in the parent heirarchy
|
||||
// First traverse the parent hierarchy as established by CLR.
|
||||
// This is required because there is difference in the parent hierarchy
|
||||
// between CLR and Windows for Chinese. Ex: Native windows has
|
||||
// zh-CN->zh-Hans->neutral whereas CLR has zh-CN->zh-CHS->zh-Hans->neutral
|
||||
if ((null != base.Parent) && (!string.IsNullOrEmpty(base.Parent.Name)))
|
||||
@ -120,7 +120,7 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
string parentCulture = base.Parent.Name;
|
||||
// remove the parentCulture from the m_fallbacks list.
|
||||
// ie., remove duplicates from the parent heirarchy.
|
||||
// ie., remove duplicates from the parent hierarchy.
|
||||
string[] fallbacksForTheParent = null;
|
||||
if (null != _fallbacks)
|
||||
{
|
||||
@ -135,7 +135,7 @@ namespace Microsoft.PowerShell
|
||||
}
|
||||
}
|
||||
|
||||
// There is atlease 1 duplicate in m_fallbacks which was not added to
|
||||
// There is atleast 1 duplicate in m_fallbacks which was not added to
|
||||
// fallbacksForTheParent array. Resize the array to take care of this.
|
||||
if (_fallbacks.Length != currentIndex)
|
||||
{
|
||||
@ -290,7 +290,7 @@ namespace Microsoft.PowerShell
|
||||
// filter out languages that console cannot display..
|
||||
// Sometimes GetConsoleFallbackUICulture returns neutral cultures
|
||||
// like "en" on "ar-SA". However neutral culture cannot be
|
||||
// asssigned as CurrentCulture. CreateSpecificCulture fixes
|
||||
// assigned as CurrentCulture. CreateSpecificCulture fixes
|
||||
// this problem.
|
||||
returnValue = CultureInfo.CreateSpecificCulture(
|
||||
returnValue.GetConsoleFallbackUICulture().Name);
|
||||
@ -352,7 +352,7 @@ namespace Microsoft.PowerShell
|
||||
/// the UI languages a user has chosen.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// List of ThredPreferredUILanguages.
|
||||
/// List of ThreadPreferredUILanguages.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// This method will work only on Vista and later.
|
||||
@ -367,7 +367,7 @@ namespace Microsoft.PowerShell
|
||||
if (filterOutNonConsoleCultures)
|
||||
{
|
||||
// Filter out languages that do not support console.
|
||||
// The third paramter should be null otherwise this API will not
|
||||
// The third parameter should be null otherwise this API will not
|
||||
// set Console CodePage filter.
|
||||
// The MSDN documentation does not call this out explicitly. Opened
|
||||
// Bug 950 (Windows Developer Content) to track this.
|
||||
@ -451,7 +451,7 @@ namespace Microsoft.PowerShell
|
||||
/// <returns>
|
||||
/// Returns the size of the buffer containing the locale name, including
|
||||
/// the terminating null character, if successful. The function returns 0
|
||||
/// if it does not succeed. To get extended error information, the applciation
|
||||
/// if it does not succeed. To get extended error information, the application
|
||||
/// can call GetLastError. Possible returns from GetLastError
|
||||
/// include ERR_INSUFFICIENT_BUFFER.
|
||||
/// </returns>
|
||||
|
@ -316,7 +316,7 @@ namespace System.Management.Automation
|
||||
/// as the data buffer.
|
||||
/// </summary>
|
||||
/// <param name="listToUse">
|
||||
/// buffer wherer the elements are stored
|
||||
/// buffer where the elements are stored
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// Using this constructor will make the data buffer a wrapper on
|
||||
@ -534,7 +534,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
_isOpen = false;
|
||||
raiseEvents = true;
|
||||
// release any threads to notify an event. Enumertor
|
||||
// release any threads to notify an event. Enumerator
|
||||
// blocks on this syncObject.
|
||||
Monitor.PulseAll(SyncObject);
|
||||
|
||||
@ -1363,7 +1363,7 @@ namespace System.Management.Automation
|
||||
_readWaitHandle.Reset();
|
||||
}
|
||||
}
|
||||
// release any threads to notify an event. Enumertor
|
||||
// release any threads to notify an event. Enumerator
|
||||
// blocks on this syncObject.
|
||||
Monitor.PulseAll(SyncObject);
|
||||
|
||||
@ -1525,7 +1525,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
InsertItem(psInstanceId, _data.Count, (T)o);
|
||||
|
||||
// set raise events if atlease one item is
|
||||
// set raise events if atleast one item is
|
||||
// added.
|
||||
raiseEvents = true;
|
||||
}
|
||||
@ -1568,7 +1568,7 @@ namespace System.Management.Automation
|
||||
_readWaitHandle.Set();
|
||||
}
|
||||
|
||||
// release any threads to notify refCount is 0. Enumertor
|
||||
// release any threads to notify refCount is 0. Enumerator
|
||||
// blocks on this syncObject and it needs to be notified
|
||||
// when the count becomes 0.
|
||||
Monitor.PulseAll(SyncObject);
|
||||
@ -1576,7 +1576,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the index of first occurece of <paramref name="item"/>
|
||||
/// Returns the index of first occurrence of <paramref name="item"/>
|
||||
/// in the buffer.
|
||||
/// This method is not thread safe.
|
||||
/// </summary>
|
||||
@ -1822,7 +1822,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Enumerator for PSDataCollection. This enumerator blocks until
|
||||
/// either all the PowerShell operations are compeleted or the
|
||||
/// either all the PowerShell operations are completed or the
|
||||
/// PSDataCollection is closed.
|
||||
/// </summary>
|
||||
/// <typeparam name="W"></typeparam>
|
||||
@ -2006,7 +2006,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="psInstanceId">
|
||||
/// Guid of Powershell instance creating this buffers.
|
||||
/// Whenver an item is added to one of the buffers, this id is
|
||||
/// Whenever an item is added to one of the buffers, this id is
|
||||
/// used to notify the buffer about the PowerShell instance adding
|
||||
/// this data.
|
||||
/// </param>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user