C# Class GSF.ServiceModel.SelfHostingService

A base class for web service that can send and receive data over REST (Representational State Transfer) interface.
Inheritance: GSF.Adapters.Adapter, ISelfHostingService, IPolicyRetriever
ファイルを表示 Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
GetFlashPolicy ( ) : Stream

Gets policy stream for Flash applications.

GetSilverlightPolicy ( ) : Stream

Gets policy stream for Silverlight applications.

Initialize ( ) : void

Initializes the web service.

LoadSettings ( ) : void

Loads saved web service settings from the config file if the Adapter.PersistSettings property is set to true.

SaveSettings ( ) : void

Saves web service settings to the config file if the Adapter.PersistSettings property is set to true.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the web service and optionally releases the managed resources.

GetServiceAddress ( ) : string

Gets an address where the ServiceHost will host the service.

GetUnusedPort ( ) : int

Get an unused port number.

InitializeServiceHost ( ) : void

Initializes the ServiceHost.

OnServiceHostCreated ( ) : void

Raises the ServiceHostCreated event.

OnServiceHostStarted ( ) : void

Raises the ServiceHostStarted event.

OnServiceProcessException ( Exception exception ) : void

Raises the ServiceProcessException event.

SelfHostingService ( ) : System

Initializes a new instance of the web service.

Private Methods

Method Description
StringToStream ( string result ) : Stream

Method Details

Dispose() protected method

Releases the unmanaged resources used by the web service 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.
return void

GetFlashPolicy() public method

Gets policy stream for Flash applications.
public GetFlashPolicy ( ) : Stream
return Stream

GetServiceAddress() protected method

Gets an address where the ServiceHost will host the service.
protected GetServiceAddress ( ) : string
return string

GetSilverlightPolicy() public method

Gets policy stream for Silverlight applications.
public GetSilverlightPolicy ( ) : Stream
return Stream

GetUnusedPort() protected method

Get an unused port number.
protected GetUnusedPort ( ) : int
return int

Initialize() public method

Initializes the web service.
public Initialize ( ) : void
return void

InitializeServiceHost() protected method

Initializes the ServiceHost.
protected InitializeServiceHost ( ) : void
return void

LoadSettings() public method

Loads saved web service settings from the config file if the Adapter.PersistSettings property is set to true.
public LoadSettings ( ) : void
return void

OnServiceHostCreated() protected method

Raises the ServiceHostCreated event.
protected OnServiceHostCreated ( ) : void
return void

OnServiceHostStarted() protected method

Raises the ServiceHostStarted event.
protected OnServiceHostStarted ( ) : void
return void

OnServiceProcessException() protected method

Raises the ServiceProcessException event.
protected OnServiceProcessException ( Exception exception ) : void
exception System.Exception to sent to event.
return void

SaveSettings() public method

Saves web service settings to the config file if the Adapter.PersistSettings property is set to true.
public SaveSettings ( ) : void
return void

SelfHostingService() protected method

Initializes a new instance of the web service.
protected SelfHostingService ( ) : System
return System