InvocationInfoWrapper class
Wraps the PowerShell InvocationInfo object and exposes its properties for logging purposes.
public class InvocationInfoWrapper
| parameter | description |
|---|---|
| invocationInfo | The PowerShell InvocationInfo object to wrap. |
Public Members
| name | description |
|---|---|
| InvocationInfoWrapper(…) | Wraps the PowerShell InvocationInfo object and exposes its properties for logging purposes. |
| BoundParameters { get; } | Gets the dictionary of bound parameters for the PowerShell invocation. |
| CommandOrigin { get; } | Gets the origin of the command (e.g., Runspace, Internal, etc.). |
| DisplayScriptPosition { get; } | Gets the script extent that displays the position of the command in the script. |
| ExpectingInput { get; } | Gets a value indicating whether the command is expecting input. |
| HistoryId { get; } | Gets the history ID of the PowerShell invocation. |
| InvocationName { get; } | Gets the name of the command being invoked. |
| Line { get; } | Gets the line of the script where the command is invoked. |
| MyCommand { get; } | Gets the string representation of the command being invoked. |
| OffsetInLine { get; } | Gets the offset in the line where the command is invoked. |
| PipelineLength { get; } | Gets the length of the pipeline for the PowerShell invocation. |
| PipelinePosition { get; } | Gets the position of the command in the pipeline for the PowerShell invocation. |
| PositionMessage { get; } | Gets the position message for the PowerShell invocation. |
| PSCommandPath { get; } | Gets the path of the PowerShell command being executed. |
| PSScriptRoot { get; } | Gets the script root path of the PowerShell script being executed. |
| ScriptLineNumber { get; } | Gets the line number in the script where the command is invoked. |
| ScriptName { get; } | Gets the name of the script where the command is invoked. |
| UnboundArguments { get; } | Gets the list of arguments that were not bound to parameters during the PowerShell invocation. |
| override ToString() | Returns a string representation of the InvocationInfoWrapper object. |
Remarks
Initializes a new instance of the InvocationInfoWrapper class with the specified InvocationInfo.
See Also
- namespace Kestrun.Logging.Data