Download PowerShell-master/test/tools/TestAlc/nested/NestedCommand.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 877 Bytes
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/tools/TestAlc/nested/NestedCommand.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/test/tools/TestAlc/nested/NestedCommand.cs
-
curl -L -o NestedCommand.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/tools/TestAlc/nested/NestedCommand.cs
877 Bytes
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System.CommandLine; | |
| using System.Management.Automation; | |
| namespace Test.Isolated.Nested | |
| { | |
| [] | |
| public class TestNestedCommand : PSCmdlet | |
| { | |
| [] | |
| public Foo Param { get; set; } | |
| protected override void ProcessRecord() | |
| { | |
| WriteObject($"{Param.Name}-{Param.Path}-{typeof(RootCommand).Assembly.FullName}"); | |
| } | |
| } | |
| public class Foo | |
| { | |
| public string Name { get; } | |
| public string Path { get; } | |
| public Foo(string name, string path) | |
| { | |
| Name = name; | |
| Path = path; | |
| } | |
| } | |
| public class Bar | |
| { | |
| public string Id { get; } | |
| public Bar(string id) | |
| { | |
| Id = id; | |
| } | |
| } | |
| } | |