C# Class NuGetConsole.Host.PowerShell.Implementation.NuGetHostUserInterface

Inheritance: System.Management.Automation.Host.PSHostUserInterface, IHostUISupportsMultipleChoiceSelection
显示文件 Open project: xero-github/Nuget

Private Properties

Property Type Description
GetFieldType System.Type
PromptCollection bool
PromptScalar bool
ReadLineAsSecureString System.Security.SecureString
ToColor Color?
Write void
WriteLine void

Public Methods

Method Description
NuGetHostUserInterface ( NuGetPSHost host ) : System
Prompt ( string caption, string message, Collection descriptions ) : PSObject>.Dictionary
PromptForChoice ( string caption, string message, Collection choices, IEnumerable defaultChoices ) : Collection
PromptForChoice ( string caption, string message, Collection choices, int defaultChoice ) : int
PromptForCredential ( string caption, string message, string userName, string targetName ) : System.Management.Automation.PSCredential
PromptForCredential ( string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options ) : System.Management.Automation.PSCredential
ReadLine ( ) : string
Write ( ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value ) : void
Write ( string value ) : void
WriteDebugLine ( string message ) : void
WriteErrorLine ( string value ) : void
WriteLine ( string value ) : void
WriteProgress ( long sourceId, System.Management.Automation.ProgressRecord record ) : void
WriteVerboseLine ( string message ) : void
WriteWarningLine ( string message ) : void

Private Methods

Method Description
GetFieldType ( System.Management.Automation.Host.FieldDescription field ) : Type
PromptCollection ( string name, Type fieldType, object &answer ) : bool
PromptScalar ( string name, Type fieldType, object &answer ) : bool
ReadLineAsSecureString ( ) : SecureString
ToColor ( ConsoleColor c ) : Color?

Convert a System.ConsoleColor enum to a Color value, or null if c is not a valid enum.

Write ( string value, ConsoleColor foregroundColor, ConsoleColor backgroundColor = NoColor ) : void
WriteLine ( string value, ConsoleColor foregroundColor, ConsoleColor backgroundColor = NoColor ) : void

Method Details

NuGetHostUserInterface() public method

public NuGetHostUserInterface ( NuGetPSHost host ) : System
host NuGetPSHost
return System

Prompt() public method

public Prompt ( string caption, string message, Collection descriptions ) : PSObject>.Dictionary
caption string
message string
descriptions Collection
return PSObject>.Dictionary

PromptForChoice() public method

public PromptForChoice ( string caption, string message, Collection choices, IEnumerable defaultChoices ) : Collection
caption string
message string
choices Collection
defaultChoices IEnumerable
return Collection

PromptForChoice() public method

public PromptForChoice ( string caption, string message, Collection choices, int defaultChoice ) : int
caption string
message string
choices Collection
defaultChoice int
return int

PromptForCredential() public method

public PromptForCredential ( string caption, string message, string userName, string targetName ) : System.Management.Automation.PSCredential
caption string
message string
userName string
targetName string
return System.Management.Automation.PSCredential

PromptForCredential() public method

public PromptForCredential ( string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options ) : System.Management.Automation.PSCredential
caption string
message string
userName string
targetName string
allowedCredentialTypes PSCredentialTypes
options PSCredentialUIOptions
return System.Management.Automation.PSCredential

ReadLine() public method

public ReadLine ( ) : string
return string

Write() public method

public Write ( ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value ) : void
foregroundColor ConsoleColor
backgroundColor ConsoleColor
value string
return void

Write() public method

public Write ( string value ) : void
value string
return void

WriteDebugLine() public method

public WriteDebugLine ( string message ) : void
message string
return void

WriteErrorLine() public method

public WriteErrorLine ( string value ) : void
value string
return void

WriteLine() public method

public WriteLine ( string value ) : void
value string
return void

WriteProgress() public method

public WriteProgress ( long sourceId, System.Management.Automation.ProgressRecord record ) : void
sourceId long
record System.Management.Automation.ProgressRecord
return void

WriteVerboseLine() public method

public WriteVerboseLine ( string message ) : void
message string
return void

WriteWarningLine() public method

public WriteWarningLine ( string message ) : void
message string
return void