Files
PowerShell/src/System.Management.Automation/engine/ParameterSetPromptingData.cs
T
Steve Lee 4bc52d2358 Use consistent '(c)' for copyright symbol (#5210)
- Remove the year about copyright
- Fix casing of `All rights reserved`
- Replace Unicode characters representing single quote with a single quote
2017-10-26 14:12:19 -07:00

69 lines
2.8 KiB
C#

/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Collections.Generic;
namespace System.Management.Automation
{
/// <summary>
/// This class holds the data for missing mandatory parameters for each parameter set as we
/// are trying to process which parameter set to use based on the missing mandatory parameters
/// </summary>
///
internal class ParameterSetPromptingData
{
internal ParameterSetPromptingData(uint parameterSet, bool isDefaultSet)
{
ParameterSet = parameterSet;
IsDefaultSet = isDefaultSet;
}
/// <summary>
/// True if this parameter set represents the default parameter set
/// </summary>
///
internal bool IsDefaultSet { get; }
/// <summary>
/// The parameter set this data represents
/// </summary>
///
internal uint ParameterSet { get; } = 0;
/// <summary>
/// True if the parameter set represents parameters in all the parameter sets
/// </summary>
internal bool IsAllSet
{
get { return ParameterSet == uint.MaxValue; }
}
/// <summary>
/// Gets the parameters that take pipeline input and are mandatory in this parameter set
/// </summary>
internal Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata> PipelineableMandatoryParameters
{ get; } = new Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata>();
/// <summary>
/// Gets the parameters that take pipeline input by value, and are mandatory in this parameter set
/// </summary>
internal Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata> PipelineableMandatoryByValueParameters
{ get; } = new Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata>();
/// <summary>
/// Gets the parameters that take pipeline input by property name, and are mandatory in this parameter set
/// </summary>
internal Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata> PipelineableMandatoryByPropertyNameParameters
{ get; } = new Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata>();
/// <summary>
/// Gets the parameters that do not take pipeline input and are mandatory in this parameter set
/// </summary>
internal Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata> NonpipelineableMandatoryParameters
{ get; } = new Dictionary<MergedCompiledCommandParameter, ParameterSetSpecificMetadata>();
}
}