C# Class GSF.IO.MultipleDestinationExporter

Inheritance: System.ComponentModel.Component, ISupportLifecycle, ISupportInitialize, IProvideStatus, IPersistSettings
Show file Open project: GridProtectionAlliance/gsf Class Usage Examples

Private Properties

Property Type Description
BeginInit void
CopyFileToDestination void
DeleteTemporaryFile void
EndInit void
ExecuteExports void
InitializeExporter void
Shutdown void

Public Methods

Method Description
ExportData ( byte fileData ) : void

Start multiple file export.

This is assumed to be the full content of the file to export. This class does not queue data since the export is not intended to append to an existing file but rather replace an existing one.

ExportData ( string fileData ) : void

Start multiple file export.

This is assumed to be the full content of the file to export. This class does not queue data since the export is not intended to append to an existing file but rather replace an existing one.

Initialize ( ) : void

Initializes (or reinitializes) MultipleDestinationExporter from configuration settings.

If not being used as a component (i.e., user creates their own instance of this class), this method must be called in order to initialize exports. Event if used as a component this method can be called at anytime to reinitialize the exports with new configuration information.

Initialize ( IEnumerable defaultDestinations ) : void

Initializes (or reinitializes) MultipleDestinationExporter from configuration settings.

If not being used as a component (i.e., user creates their own instance of this class), this method must be called in order to initialize exports. Even if used as a component this method can be called at anytime to reinitialize the exports with new configuration information.

LoadSettings ( ) : void

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

MultipleDestinationExporter ( ) : System

Initializes a new instance of the MultipleDestinationExporter class.

MultipleDestinationExporter ( IContainer container ) : System

Initializes a new instance of the MultipleDestinationExporter class.

MultipleDestinationExporter ( string settingsCategory, int exportTimeout ) : System

Initializes a new instance of the MultipleDestinationExporter class.

SaveSettings ( ) : void

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

Protected Methods

Method Description
Dispose ( bool disposing ) : void

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

OnInitialized ( ) : void

Raises the Initialized event.

OnProcessException ( Exception ex ) : void

Raises ProcessException event.

OnStatusMessage ( string status ) : void

Raises the StatusMessage event.

Private Methods

Method Description
BeginInit ( ) : void
CopyFileToDestination ( object state ) : void
DeleteTemporaryFile ( string filename ) : void
EndInit ( ) : void
ExecuteExports ( ) : void
InitializeExporter ( object state ) : void
Shutdown ( ) : void

Method Details

Dispose() protected method

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

ExportData() public method

Start multiple file export.
This is assumed to be the full content of the file to export. This class does not queue data since the export is not intended to append to an existing file but rather replace an existing one.
public ExportData ( byte fileData ) : void
fileData byte Binary data to export to each destination.
return void

ExportData() public method

Start multiple file export.
This is assumed to be the full content of the file to export. This class does not queue data since the export is not intended to append to an existing file but rather replace an existing one.
public ExportData ( string fileData ) : void
fileData string Text based data to export to each destination.
return void

Initialize() public method

Initializes (or reinitializes) MultipleDestinationExporter from configuration settings.
If not being used as a component (i.e., user creates their own instance of this class), this method must be called in order to initialize exports. Event if used as a component this method can be called at anytime to reinitialize the exports with new configuration information.
public Initialize ( ) : void
return void

Initialize() public method

Initializes (or reinitializes) MultipleDestinationExporter from configuration settings.
If not being used as a component (i.e., user creates their own instance of this class), this method must be called in order to initialize exports. Even if used as a component this method can be called at anytime to reinitialize the exports with new configuration information.
public Initialize ( IEnumerable defaultDestinations ) : void
defaultDestinations IEnumerable Provides a default set of export destinations if none exist in configuration settings.
return void

LoadSettings() public method

Loads saved settings for the MultipleDestinationExporter object from the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public LoadSettings ( ) : void
return void

MultipleDestinationExporter() public method

Initializes a new instance of the MultipleDestinationExporter class.
public MultipleDestinationExporter ( ) : System
return System

MultipleDestinationExporter() public method

Initializes a new instance of the MultipleDestinationExporter class.
public MultipleDestinationExporter ( IContainer container ) : System
container IContainer object that contains the .
return System

MultipleDestinationExporter() public method

Initializes a new instance of the MultipleDestinationExporter class.
public MultipleDestinationExporter ( string settingsCategory, int exportTimeout ) : System
settingsCategory string The config file settings category under which the export destinations are defined.
exportTimeout int The total allowed time in milliseconds for each export to execute.
return System

OnInitialized() protected method

Raises the Initialized event.
protected OnInitialized ( ) : void
return void

OnProcessException() protected method

Raises ProcessException event.
protected OnProcessException ( Exception ex ) : void
ex System.Exception Processing .
return void

OnStatusMessage() protected method

Raises the StatusMessage event.
protected OnStatusMessage ( string status ) : void
status string Status message to report.
return void

SaveSettings() public method

Saves settings for the MultipleDestinationExporter object to the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public SaveSettings ( ) : void
return void