mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
spelling: comments in src/System.Management.Automation/engine
This commit is contained in:
1 parent
bf5d15d891
commit
c59e992c25
70 files changed
+283
-283
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace System.Management.Automation.Internal
|
||||
|
||||
commandProcessor.AddedToPipelineAlready = true;
|
||||
}
|
||||
// 2003/08/11-JonN Subseqent commands must have predecessor
|
||||
// 2003/08/11-JonN Subsequent commands must have predecessor
|
||||
else if (readFromCommand > _commands.Count || readFromCommand <= 0)
|
||||
{
|
||||
// "invalid command number"
|
||||
@@ -1002,7 +1002,7 @@ namespace System.Management.Automation.Internal
|
||||
// Generate new Activity Id for the thread
|
||||
Guid pipelineActivityId = EtwActivity.CreateActivityId();
|
||||
|
||||
// commandProcess.PieplineActivityId = new Activity id
|
||||
// commandProcess.PipelineActivityId = new Activity id
|
||||
EtwActivity.SetActivityId(pipelineActivityId);
|
||||
commandProcessor.PipelineActivityId = pipelineActivityId;
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an instance of the WildcardPatternException object taking
|
||||
/// a message parameter to use in cnstructing the exception.
|
||||
/// a message parameter to use in constructing the exception.
|
||||
/// </summary>
|
||||
/// <param name="message">The string to use as the exception message</param>
|
||||
public WildcardPatternException(string message) : base(message)
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Serializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
/// </summary>
|
||||
internal TypeTable TypeTable
|
||||
{
|
||||
@@ -517,7 +517,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Deserializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
/// </summary>
|
||||
internal TypeTable TypeTable
|
||||
{
|
||||
@@ -806,7 +806,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Serializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
private TypeTable _typeTable;
|
||||
|
||||
/// <summary>
|
||||
@@ -843,7 +843,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Serializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
/// </summary>
|
||||
internal TypeTable TypeTable
|
||||
{
|
||||
@@ -1039,7 +1039,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// <summary>
|
||||
/// Handles primitive known type by first converting it to a PSObject.In W8, extended
|
||||
/// property data is stored external to PSObject. By coverting to PSObject, we will
|
||||
/// property data is stored external to PSObject. By converting to PSObject, we will
|
||||
/// be able to retrieve and serialize the extended properties. This is tracked by
|
||||
/// Win8: 414042
|
||||
/// </summary>
|
||||
@@ -1243,7 +1243,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (depth != 0)
|
||||
{
|
||||
// An object which is orignially enumerable becomes an PSObject with ArrayList on deserialization.
|
||||
// An object which is original enumerable becomes an PSObject with ArrayList on deserialization.
|
||||
// So on roundtrip it will show up as List.
|
||||
// We serialize properties of enumerable and on deserialization mark the object as Deserialized.
|
||||
// So if object is marked deserialized, we should write properties.
|
||||
@@ -2929,7 +2929,7 @@ namespace System.Management.Automation
|
||||
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Serializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
private TypeTable _typeTable;
|
||||
|
||||
/// <summary>
|
||||
@@ -2997,7 +2997,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Used by Remoting infrastructure. This TypeTable instance
|
||||
/// will be used by Deserializer if ExecutionContext is not
|
||||
/// avaliable (to get the ExecutionContext's TypeTable)
|
||||
/// available (to get the ExecutionContext's TypeTable)
|
||||
/// </summary>
|
||||
internal TypeTable TypeTable
|
||||
{
|
||||
@@ -3038,7 +3038,7 @@ namespace System.Management.Automation
|
||||
//Versioning Note:Future version of serialization can add new known types.
|
||||
//This version will ignore those known types, if they are base object.
|
||||
//It is expected that future version will still put information in base
|
||||
//and adpater properties which this serializer can read and use.
|
||||
//and adapter properties which this serializer can read and use.
|
||||
//For example, assume the version 2 serialization engine supports a new known
|
||||
//type IPAddress. The version 1 deserializer doesn't know IPAddress as known
|
||||
//type and it must retrieve it as an PSObject. The version 2 serializer
|
||||
@@ -3046,17 +3046,17 @@ namespace System.Management.Automation
|
||||
//<PSObject Version=1.2 Was=Deserialized.IPAddress >
|
||||
// <TypeNames>...</TypeNames>
|
||||
// <BaseObject>
|
||||
// <IPAddress>120.23.35.53</IPAdddress>
|
||||
// <IPAddress>120.23.35.53</IPAddress>
|
||||
// </BaseObject>
|
||||
// <Properties>
|
||||
// <string name=Address>120.23.34.53</string>
|
||||
// <string name=class>A</string>
|
||||
// </Properties>
|
||||
//</PSObject>
|
||||
// In above example, V1 serializer will ingore <IPAdresss> element and read
|
||||
// In above example, V1 serializer will ignore <IPAddress> element and read
|
||||
// properties from <Properties>
|
||||
// V2 serializer can read <IPAddress> tag and ignore properties.
|
||||
// Read serializion note doc for information.
|
||||
// Read serialization note doc for information.
|
||||
|
||||
//Now validate the major version number is 1
|
||||
if (_version.Major != 1)
|
||||
@@ -3624,7 +3624,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
else
|
||||
{
|
||||
//We have an unknwon tag
|
||||
//We have an unknown tag
|
||||
s_trace.WriteLine("Unknwon tag {0} encountered", _reader.LocalName);
|
||||
if (UnknownTagsAllowed)
|
||||
{
|
||||
@@ -5595,7 +5595,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
// collected object doesn't have a hash code
|
||||
// return an arbitrary hashcode here and fall back on Equal method for comparison
|
||||
return RuntimeHelpers.GetHashCode(obj); // RuntimeHelpers.GetHashCode(null) returns 0 - this would cause many hashtable colisions for WeakReferences to dead objects
|
||||
return RuntimeHelpers.GetHashCode(obj); // RuntimeHelpers.GetHashCode(null) returns 0 - this would cause many hashtable collisions for WeakReferences to dead objects
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6602,7 +6602,7 @@ namespace Microsoft.PowerShell
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">The value to convert from</param>
|
||||
/// <param name="destinationType">The type to convert 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>
|
||||
@@ -6690,7 +6690,7 @@ namespace Microsoft.PowerShell
|
||||
/// </summary>
|
||||
/// <param name="sourceValue">The value to convert from</param>
|
||||
/// <param name="destinationType">The type to convert 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>sourceValue converted to the <paramref name="destinationType"/> parameter using formatProvider and ignoreCase</returns>
|
||||
/// <exception cref="InvalidCastException">if no conversion was possible</exception>
|
||||
@@ -7209,7 +7209,7 @@ namespace Microsoft.PowerShell
|
||||
/// of the DebuggerStopEventArgs type.
|
||||
/// </summary>
|
||||
/// <param name="instance">InvocationInfo instance.</param>
|
||||
/// <returns>PSObject containing seralized InvocationInfo.</returns>
|
||||
/// <returns>PSObject containing serialized InvocationInfo.</returns>
|
||||
public static PSObject GetInvocationInfo(PSObject instance)
|
||||
{
|
||||
if (instance == null)
|
||||
@@ -7400,7 +7400,7 @@ namespace Microsoft.PowerShell
|
||||
private static PSControl RehydratePSControl(PSObject deserializedControl)
|
||||
{
|
||||
// Earlier versions of PowerShell did not have all of the possible properties in a control, so we must
|
||||
// use MisingPropertyOk to allow for connections to those older endpoints.
|
||||
// use MissingPropertyOk to allow for connections to those older endpoints.
|
||||
PSControl result;
|
||||
if (Deserializer.IsDeserializedInstanceOfType(deserializedControl, typeof(TableControl)))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user