Windows-powershell / PowerShell-master /src /Microsoft.PowerShell.Commands.Utility /commands /utility /Get-PSCallStack.cs
Download PowerShell-master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Get-PSCallStack.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Get-PSCallStack.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Get-PSCallStack.cs
-
curl -L -o Get-PSCallStack.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Get-PSCallStack.cs
737 Bytes
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System.Management.Automation; | |
| namespace Microsoft.PowerShell.Commands | |
| { | |
| /// <summary> | |
| /// This class implements Get-PSCallStack. | |
| /// </summary> | |
| [] | |
| [] | |
| public class GetPSCallStackCommand : PSCmdlet | |
| { | |
| /// <summary> | |
| /// Get the call stack. | |
| /// </summary> | |
| protected override void ProcessRecord() | |
| { | |
| foreach (CallStackFrame frame in Context.Debugger.GetCallStack()) | |
| { | |
| WriteObject(frame); | |
| } | |
| } | |
| } | |
| } | |