C# 클래스 PoshCode.PoshConsole

상속: PoshCode.Controls.ConsoleControl, IRichConsole
파일 보기 프로젝트 열기: Jaykul/PoshConsole

공개 프로퍼티들

프로퍼티 타입 설명
ContentProperty System.Windows.DependencyProperty
ProgressProperty System.Windows.DependencyProperty

Private Properties

프로퍼티 타입 설명
BuildHotkeysAndPlainLabels ].string[
GetHotkeyAndLabel string[]
GetSingle System.Management.Automation.PSObject
TryConvertTo System.Management.Automation.PSInvalidCastException

공개 메소드들

메소드 설명
Invoke ( string script, ConsoleOutput output = ConsoleOutput.Default ) : Collection

Invoke the specified script, synchronously, and return the pipeline output.

InvokeAsync ( Command commands, IEnumerable input = null, ConsoleOutput output = ConsoleOutput.Default ) : Task

Invoke the specified commands in a pipeline asynchronously, optionally providing input to the first command, and with the specified output handling.

InvokeAsync ( string command, bool isScript = true, bool useLocalScope = false, IEnumerable input = null, ConsoleOutput output = ConsoleOutput.Default ) : Task

Invoke the specified command in a pipeline asynchronously, optionally providing input to the first command, and with the specified output handling.

OnPromptForChoice ( PromptForChoiceEventArgs e ) : int
OnPromptForObject ( PromptForObjectEventArgs e ) : PSObject>.Dictionary
PoshConsole ( ) : System
PromptForCredentialInline ( string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes = PSCredentialTypes.Generic, PSCredentialUIOptions options = PSCredentialUIOptions.None ) : System.Management.Automation.PSCredential
WriteErrorRecord ( ErrorRecord errorRecord ) : void
WriteErrorRecords ( Collection errorRecords ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
OnCommand ( CommandEventArgs command ) : void
OnInitialized ( EventArgs e ) : void

비공개 메소드들

메소드 설명
BuildHotkeysAndPlainLabels ( Collection choices, bool addHelp ) : ].string[

This is a private worker function that splits out the accelerator keys from the menu and builds a two dimentional array with the first access containing the accelerator and the second containing the label string with & removed.

GetHotkeyAndLabel ( string input ) : string[]

Parse a string containing a hotkey character. Take a string of the form: "Yes to &all" And return a two-dimensional array split out as "A", "Yes to all".

GetSingle ( string caption, string message, string prompt, System.Management.Automation.Host.FieldDescription field, Type type ) : System.Management.Automation.PSObject
TryConvertTo ( Type type, string input, object &output ) : System.Management.Automation.PSInvalidCastException

메소드 상세

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

Invoke() 공개 메소드

Invoke the specified script, synchronously, and return the pipeline output.
public Invoke ( string script, ConsoleOutput output = ConsoleOutput.Default ) : Collection
script string The script from which the pipeline will be constructed. Can be just a command name, but is executed as though typed on the console.
output ConsoleOutput Optionally: what to print to the console (prints everything, by default, as though the user had typed the commands in the console)
리턴 Collection

InvokeAsync() 공개 메소드

Invoke the specified commands in a pipeline asynchronously, optionally providing input to the first command, and with the specified output handling.
public InvokeAsync ( Command commands, IEnumerable input = null, ConsoleOutput output = ConsoleOutput.Default ) : Task
commands Command Commands from which the pipeline will be constructed
input IEnumerable Optional Pipeline Input. If this is specified, your first command must accept pipeline input
output ConsoleOutput Optionally: what to print to the console (prints everything, by default, as though the user had typed the commands in the console)
리턴 Task

InvokeAsync() 공개 메소드

Invoke the specified command in a pipeline asynchronously, optionally providing input to the first command, and with the specified output handling.
public InvokeAsync ( string command, bool isScript = true, bool useLocalScope = false, IEnumerable input = null, ConsoleOutput output = ConsoleOutput.Default ) : Task
command string The Command from which the pipeline will be constructed.
isScript bool Whether the command is a script (defaults to true). You should set this to false if you are just naming a command.
useLocalScope bool Whether the command should use it's own local scope -- only valid for scripts (defaults to false)
input IEnumerable Optional Pipeline Input. If this is specified, your first command must accept pipeline input
output ConsoleOutput Optionally: what to print to the console (prints everything, by default, as though the user had typed the commands in the console)
리턴 Task

OnCommand() 보호된 메소드

protected OnCommand ( CommandEventArgs command ) : void
command PoshCode.Controls.CommandEventArgs
리턴 void

OnInitialized() 보호된 메소드

protected OnInitialized ( EventArgs e ) : void
e System.EventArgs
리턴 void

OnPromptForChoice() 공개 메소드

public OnPromptForChoice ( PromptForChoiceEventArgs e ) : int
e PoshCode.Controls.PromptForChoiceEventArgs
리턴 int

OnPromptForObject() 공개 메소드

public OnPromptForObject ( PromptForObjectEventArgs e ) : PSObject>.Dictionary
e PoshCode.Controls.PromptForObjectEventArgs
리턴 PSObject>.Dictionary

PoshConsole() 공개 메소드

public PoshConsole ( ) : System
리턴 System

PromptForCredentialInline() 공개 메소드

public PromptForCredentialInline ( string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes = PSCredentialTypes.Generic, PSCredentialUIOptions options = PSCredentialUIOptions.None ) : System.Management.Automation.PSCredential
caption string
message string
userName string
targetName string
allowedCredentialTypes PSCredentialTypes
options PSCredentialUIOptions
리턴 System.Management.Automation.PSCredential

WriteErrorRecord() 공개 메소드

public WriteErrorRecord ( ErrorRecord errorRecord ) : void
errorRecord System.Management.Automation.ErrorRecord
리턴 void

WriteErrorRecords() 공개 메소드

public WriteErrorRecords ( Collection errorRecords ) : void
errorRecords Collection
리턴 void

프로퍼티 상세

ContentProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ContentProperty
리턴 System.Windows.DependencyProperty

ProgressProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ProgressProperty
리턴 System.Windows.DependencyProperty