Windows-powershell / PowerShell-master /src /System.Management.Automation /cimSupport /cmdletization /MethodParametersCollection.cs
Download PowerShell-master/src/System.Management.Automation/cimSupport/cmdletization/MethodParametersCollection.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 996 Bytes
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/cimSupport/cmdletization/MethodParametersCollection.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/src/System.Management.Automation/cimSupport/cmdletization/MethodParametersCollection.cs
-
curl -L -o MethodParametersCollection.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/cimSupport/cmdletization/MethodParametersCollection.cs
996 Bytes
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Collections.ObjectModel; | |
| namespace Microsoft.PowerShell.Cmdletization | |
| { | |
| /// <summary> | |
| /// Collection of method parameters and their arguments | |
| /// used to invoke a method in an object model wrapped by <see cref="CmdletAdapter<TObjectInstance>"/> | |
| /// </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; | |
| } | |
| } | |
| } | |