C# Класс GSF.ServiceProcess.ClientHelper

Наследование: System.ComponentModel.Component, ISupportLifecycle, ISupportInitialize, IPersistSettings
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BeginInit void
EndInit void
RemotingClient_ConnectionAttempt void
RemotingClient_ConnectionEstablished void
RemotingClient_ConnectionException void
RemotingClient_ConnectionTerminated void
RemotingClient_ReceiveDataComplete void
UpdateStatus void

Открытые методы

Метод Описание
ClientHelper ( ) : GSF.Communication

Initializes a new instance of the ClientHelper class.

ClientHelper ( IContainer container ) : GSF.Communication

Initializes a new instance of the ClientHelper class.

Connect ( ) : void

Connects RemotingClient to ServiceHelper.RemotingServer and wait until authentication is complete.

Disconnect ( ) : void

Disconnects RemotingClient from ServiceHelper.RemotingServer.

Initialize ( ) : void

Initializes the ClientHelper.

Initialize() is to be called by user-code directly only if the ClientHelper is not consumed through the designer surface of the IDE.

LoadSettings ( ) : void

Loads saved settings for the ClientHelper from the config file if the PersistSettings property is set to true.

PretendRequest ( string requestCommand ) : GSF.ServiceProcess.ClientRequestInfo

Returns an ClientRequestInfo object for the specified requestCommand that can be used to invoke ServiceHelper.ClientRequestHandlers manually as if the request was sent by a ClientHelper remotely.

SaveSettings ( ) : void

Saves settings for the ClientHelper to the config file if the PersistSettings property is set to true.

SendRequest ( ClientRequest request ) : void

Sends a request to the ServiceHelper using RemotingClient.

SendRequest ( string request ) : void

Sends a request to the ServiceHelper using RemotingClient.

TryParseActionableResponse ( ServiceResponse serviceResponse, string &sourceCommand, bool &responseSuccess ) : bool

Attempts to parse an actionable response sent from the service.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ClientHelper object and optionally releases the managed resources.

OnAuthenticationFailure ( ) : void

Raises the AuthenticationFailure event.

OnAuthenticationSuccess ( ) : void

Raises the AuthenticationSuccess event.

OnProcessStateChanged ( ObjectState state ) : void

Raises the ProcessStateChanged event.

OnReceivedServiceResponse ( ServiceResponse response ) : void

Raises the ReceivedServiceResponse event.

OnReceivedServiceUpdate ( UpdateType type, string update ) : void

Raises the ReceivedServiceUpdate event.

OnServiceStateChanged ( ObjectState state ) : void

Raises the ServiceStateChanged event.

OnTelnetSessionEstablished ( ) : void

Raises the TelnetSessionEstablished event.

OnTelnetSessionTerminated ( ) : void

Raises the TelnetSessionTerminated event.

Приватные методы

Метод Описание
BeginInit ( ) : void
EndInit ( ) : void
RemotingClient_ConnectionAttempt ( object sender, EventArgs e ) : void
RemotingClient_ConnectionEstablished ( object sender, EventArgs e ) : void
RemotingClient_ConnectionException ( object sender, EventArgs e ) : void
RemotingClient_ConnectionTerminated ( object sender, EventArgs e ) : void
RemotingClient_ReceiveDataComplete ( object sender, int>.EventArgs e ) : void
UpdateStatus ( UpdateType type, string message ) : void

Описание методов

ClientHelper() публичный метод

Initializes a new instance of the ClientHelper class.
public ClientHelper ( ) : GSF.Communication
Результат GSF.Communication

ClientHelper() публичный метод

Initializes a new instance of the ClientHelper class.
public ClientHelper ( IContainer container ) : GSF.Communication
container IContainer object that contains the .
Результат GSF.Communication

Connect() публичный метод

Connects RemotingClient to ServiceHelper.RemotingServer and wait until authentication is complete.
public Connect ( ) : void
Результат void

Disconnect() публичный метод

Disconnects RemotingClient from ServiceHelper.RemotingServer.
public Disconnect ( ) : void
Результат void

Dispose() защищенный метод

Releases the unmanaged resources used by the ClientHelper object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

Initialize() публичный метод

Initializes the ClientHelper.
Initialize() is to be called by user-code directly only if the ClientHelper is not consumed through the designer surface of the IDE.
public Initialize ( ) : void
Результат void

LoadSettings() публичный метод

Loads saved settings for the ClientHelper from the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public LoadSettings ( ) : void
Результат void

OnAuthenticationFailure() защищенный метод

Raises the AuthenticationFailure event.
protected OnAuthenticationFailure ( ) : void
Результат void

OnAuthenticationSuccess() защищенный метод

Raises the AuthenticationSuccess event.
protected OnAuthenticationSuccess ( ) : void
Результат void

OnProcessStateChanged() защищенный метод

Raises the ProcessStateChanged event.
protected OnProcessStateChanged ( ObjectState state ) : void
state ObjectState New .
Результат void

OnReceivedServiceResponse() защищенный метод

Raises the ReceivedServiceResponse event.
protected OnReceivedServiceResponse ( ServiceResponse response ) : void
response ServiceResponse received.
Результат void

OnReceivedServiceUpdate() защищенный метод

Raises the ReceivedServiceUpdate event.
protected OnReceivedServiceUpdate ( UpdateType type, string update ) : void
type UpdateType One of the values.
update string Update message received.
Результат void

OnServiceStateChanged() защищенный метод

Raises the ServiceStateChanged event.
protected OnServiceStateChanged ( ObjectState state ) : void
state ObjectState New .
Результат void

OnTelnetSessionEstablished() защищенный метод

Raises the TelnetSessionEstablished event.
protected OnTelnetSessionEstablished ( ) : void
Результат void

OnTelnetSessionTerminated() защищенный метод

Raises the TelnetSessionTerminated event.
protected OnTelnetSessionTerminated ( ) : void
Результат void

PretendRequest() публичный статический метод

Returns an ClientRequestInfo object for the specified requestCommand that can be used to invoke ServiceHelper.ClientRequestHandlers manually as if the request was sent by a ClientHelper remotely.
public static PretendRequest ( string requestCommand ) : GSF.ServiceProcess.ClientRequestInfo
requestCommand string Command for which an object is to be created.
Результат GSF.ServiceProcess.ClientRequestInfo

SaveSettings() публичный метод

Saves settings for the ClientHelper to the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public SaveSettings ( ) : void
Результат void

SendRequest() публичный метод

Sends a request to the ServiceHelper using RemotingClient.
public SendRequest ( ClientRequest request ) : void
request ClientRequest object to be sent.
Результат void

SendRequest() публичный метод

Sends a request to the ServiceHelper using RemotingClient.
public SendRequest ( string request ) : void
request string Request text to be sent.
Результат void

TryParseActionableResponse() публичный статический метод

Attempts to parse an actionable response sent from the service.
public static TryParseActionableResponse ( ServiceResponse serviceResponse, string &sourceCommand, bool &responseSuccess ) : bool
serviceResponse ServiceResponse to test for actionable response.
sourceCommand string Command that invoked .
responseSuccess bool Boolean success state of .
Результат bool