Files
PowerShell/src/System.Management.Automation/engine/ParameterSetPromptingData.cs
T
PowerShell Team ae8d2ed794 Refactor - convert to auto-property
Mostly using R# to automatically refactor, with some manual
fixups where it wouldn't work automatically (e.g. xml comments
on fields) or some it seemed to miss.

Some minor code reformatting was also done on properties near
other stuff I was manually inspecting.
2016-08-03 12:14:28 -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>();
}
}