Windows-powershell / PowerShell-master /src /System.Management.Automation /FormatAndOutput /common /DisplayDatabase /commands.cs
Download PowerShell-master/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/commands.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/commands.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/commands.cs
-
curl -L -o commands.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/commands.cs
1.26 kB
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System; | |
| using Microsoft.PowerShell.Commands.Internal.Format; | |
| namespace Microsoft.PowerShell.Commands | |
| { | |
| internal static class EnumerableExpansionConversion | |
| { | |
| internal const string CoreOnlyString = "CoreOnly"; | |
| internal const string EnumOnlyString = "EnumOnly"; | |
| internal const string BothString = "Both"; | |
| internal static bool Convert(string expansionString, out EnumerableExpansion expansion) | |
| { | |
| expansion = EnumerableExpansion.EnumOnly; | |
| if (string.Equals(expansionString, CoreOnlyString, StringComparison.OrdinalIgnoreCase)) | |
| { | |
| expansion = EnumerableExpansion.CoreOnly; | |
| return true; | |
| } | |
| if (string.Equals(expansionString, EnumOnlyString, StringComparison.OrdinalIgnoreCase)) | |
| { | |
| expansion = EnumerableExpansion.EnumOnly; | |
| return true; | |
| } | |
| if (string.Equals(expansionString, BothString, StringComparison.OrdinalIgnoreCase)) | |
| { | |
| expansion = EnumerableExpansion.Both; | |
| return true; | |
| } | |
| return false; | |
| } | |
| } | |
| } | |