C# Class Elastacloud.AzureManagement.Fluent.Commands.Services.ServiceCommand

Abstract base class used to encapsulate a command to a hosted service
Inheritance: ICommand
ファイルを表示 Open project: azurecoder/fluent-management Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Execute ( ) : void

Executes the request and waits for a response from the Service Management API Control is delegated back to the calling class when the reponse comes back which releases the WaitHandle

Parse ( HttpWebResponse response, string root, BaseParser baseParser = null ) : dynamic

Used to get and instance of the BaseParser that will parse the Xml response from the Fabric

ToString ( ) : string

Used to return the routable value of the command to the correct notification interface

Protected Methods

Method Description
CreatePayload ( ) : string

Creates an empty Xml payload since the service command itself does not expect a response - overriden in a derived class which does

ErrorResponseCallback ( WebException exception ) : void

The error callback exception that will be attached to if the response presents a failure of some sort - to be routed to a notification interface of a certain type

ResponseCallback ( HttpWebResponse webResponse ) : void

Initially used via a response callback for commands which expect a async response

ServiceCommand ( ) : System

Method Details

CreatePayload() protected method

Creates an empty Xml payload since the service command itself does not expect a response - overriden in a derived class which does
protected CreatePayload ( ) : string
return string

ErrorResponseCallback() protected method

The error callback exception that will be attached to if the response presents a failure of some sort - to be routed to a notification interface of a certain type
protected ErrorResponseCallback ( WebException exception ) : void
exception System.Net.WebException The web exception as it stands
return void

Execute() public method

Executes the request and waits for a response from the Service Management API Control is delegated back to the calling class when the reponse comes back which releases the WaitHandle
public Execute ( ) : void
return void

Parse() public static method

Used to get and instance of the BaseParser that will parse the Xml response from the Fabric
public static Parse ( HttpWebResponse response, string root, BaseParser baseParser = null ) : dynamic
response System.Net.HttpWebResponse the HttpWebResponse that is returned
root string the root element neededs
baseParser Elastacloud.AzureManagement.Fluent.Commands.Parsers.BaseParser used to parse the response coming back
return dynamic

ResponseCallback() protected method

Initially used via a response callback for commands which expect a async response
protected ResponseCallback ( HttpWebResponse webResponse ) : void
webResponse System.Net.HttpWebResponse the HttpWebResponse that will be sent back to the user from the request
return void

ServiceCommand() protected method

protected ServiceCommand ( ) : System
return System

ToString() public method

Used to return the routable value of the command to the correct notification interface
public ToString ( ) : string
return string