Files
PowerShell/src/System.Management.Automation/cimSupport/cmdletization/MethodParametersCollection.cs
T
PowerShell Team 60b3b304f2 Move files from psl-monad submodule to super-project
This commit uses psl-monad branch source-depot 7209cb9
And corresponds to [SD:688741]
2016-03-30 17:16:23 -07:00

35 lines
1.1 KiB
C#

/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
namespace Microsoft.PowerShell.Cmdletization
{
using System;
using System.Collections.ObjectModel;
/// <summary>
/// Collection of method parameters and their arguments
/// used to invoke a method in an object model wrapped by <see cref="CmdletAdapter&lt;TObjectInstance&gt;"/>
/// </summary>
internal sealed class MethodParametersCollection : KeyedCollection<string, MethodParameter>
{
/// <summary>
/// Creates an empty collection of method parameters
/// </summary>
public MethodParametersCollection()
: base(StringComparer.Ordinal, 5)
{
}
/// <summary>
/// Gets key for a method parameter
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
protected override string GetKeyForItem(MethodParameter item)
{
return item.Name;
}
}
}