C# Class WebApplications.Utilities.Service.ConsoleConnection

Inheritance: IDisposable, IConnection
Exibir arquivo Open project: webappsuk/CoreLibraries Class Usage Examples

Private Properties

Property Type Description
ConsoleConnection System
GetUserNamePassword void
WritePrompt void

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

OnDisconnect ( ) : void

Called when the server disconnects the UI.

RunAsync ( [ service, RunMode runMode = RunMode.Default, [ defaultLogFormat = null, LoggingLevels defaultLoggingLevels = LoggingLevels.All, CancellationToken token = default(CancellationToken) ) : Task

Runs the specified service using the command console as a user interface.

Private Methods

Method Description
ConsoleConnection ( FormatBuilder defaultLogFormat, LoggingLevels defaultLoggingLevels, CancellationToken token ) : System

Prevents a default instance of the ConsoleConnection class from being created.

GetUserNamePassword ( string &userName, string &password ) : void

Gets the user name and password from the console.

WritePrompt ( [ service ) : void

Writes the prompt.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

OnDisconnect() public method

Called when the server disconnects the UI.
public OnDisconnect ( ) : void
return void

RunAsync() public static method

Runs the specified service using the command console as a user interface.
public static RunAsync ( [ service, RunMode runMode = RunMode.Default, [ defaultLogFormat = null, LoggingLevels defaultLoggingLevels = LoggingLevels.All, CancellationToken token = default(CancellationToken) ) : Task
service [ The service.
runMode RunMode The run mode.
defaultLogFormat [ The default log format.
defaultLoggingLevels LoggingLevels The default logging levels.
token System.Threading.CancellationToken The token.
return Task