mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-15 06:09:09 +00:00
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files. Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks. Separate PR coming to update contribution document for new source files: #6140 Manually reviewed each change. Fix #6073
67 lines
2.7 KiB
C#
67 lines
2.7 KiB
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
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>();
|
|
}
|
|
}
|
|
|