Multiple
|
[ToolboxBitmapAttribute(typeof(MultipleDestinationExporter))] public class MultipleDestinationExporter : Component, ISupportLifecycle, IDisposable, ISupportInitialize, IProvideStatus, IPersistSettings
The MultipleDestinationExporter type exposes the following members.
Name | Description | |
---|---|---|
MultipleDestinationExporter | Initializes a new instance of the MultipleDestinationExporter class. | |
MultipleDestinationExporter(IContainer) | Initializes a new instance of the MultipleDestinationExporter class. | |
MultipleDestinationExporter(String, Int32) | Initializes a new instance of the MultipleDestinationExporter class. |
Name | Description | |
---|---|---|
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component) | |
Container | Gets the IContainer that contains the Component. (Inherited from Component) | |
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component) | |
Enabled | Gets or sets a boolean value that indicates whether the MultipleDestinationExporter object is currently enabled. | |
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component) | |
ExportDestinations | Gets a list of currently defined ExportDestination. | |
ExportTimeout | Gets or sets the total allowed time in milliseconds for each export to execute. | |
IsDisposed | Gets a flag that indicates whether the object has been disposed. | |
MaximumRetryAttempts | Gets or sets the maximum number of retries that will be attempted during an export if the export fails. | |
Name | Gets the unique identifier of the MultipleDestinationExporter object. | |
PersistSettings | Gets or sets a boolean value that indicates whether the settings of MultipleDestinationExporter object are to be saved to the config file. | |
RetryDelayInterval | Gets or sets the interval to wait, in milliseconds, before retrying an export if the export fails. | |
SettingsCategory | Gets or sets the category under which the settings of MultipleDestinationExporter object are to be saved to the config file if the PersistSettings property is set to true. | |
Site | Gets or sets the ISite of the Component. (Inherited from Component) | |
Status | Gets the descriptive status of the MultipleDestinationExporter object. | |
TextEncoding | Gets or sets the Encoding to be used to encode text data being exported. | |
TotalExports | Gets the total number exports performed successfully. |
Name | Description | |
---|---|---|
BeginInit | Performs necessary operations before the MultipleDestinationExporter object properties are initialized. | |
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) | |
Dispose | Releases all resources used by the Component. (Inherited from Component) | |
Dispose(Boolean) |
Releases the unmanaged resources used by the MultipleDestinationExporter object and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean)) | |
EndInit | Performs necessary operations after the MultipleDestinationExporter object properties are initialized. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
ExportData(Byte) | Start multiple file export. | |
ExportData(String) | Start multiple file export. | |
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) | |
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Initialize | Initializes (or reinitializes) MultipleDestinationExporter from configuration settings. | |
Initialize(IEnumerableExportDestination) | Initializes (or reinitializes) MultipleDestinationExporter from configuration settings. | |
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject) | |
LoadSettings | Loads saved settings for the MultipleDestinationExporter object from the config file if the PersistSettings property is set to true. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject) | |
OnInitialized | Raises the Initialized event. | |
OnProcessException | Raises ProcessException event. | |
OnStatusMessage | Raises the StatusMessage event. | |
SaveSettings | Saves settings for the MultipleDestinationExporter object to the config file if the PersistSettings property is set to true. | |
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component) |
Name | Description | |
---|---|---|
Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component) | |
Initialized | Occurs when the MultipleDestinationExporter object has been initialized. | |
ProcessException | Event is raised when there is an exception encountered while processing. | |
StatusMessage | Occurs when status information for the MultipleDestinationExporter object is being reported. |
Name | Description | |
---|---|---|
DefaultExportTimeout | Specifies the default value for the ExportTimeout property. | |
DefaultMaximumRetryAttempts | Specifies the default value for the MaximumRetryAttempts property. | |
DefaultPersistSettings | Specifies the default value for the PersistSettings property. | |
DefaultRetryDelayInterval | Specifies the default value for the RetryDelayInterval property. | |
DefaultSettingsCategory | Specifies the default value for the SettingsCategory property. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
using System; using GSF.IO; class Program { static MultipleDestinationExporter s_exporter; static void Main(string[] args) { s_exporter = new MultipleDestinationExporter(); s_exporter.Initialized += s_exporter_Initialized; ExportDestination[] defaultDestinations = new ExportDestination[] { new ExportDestination(@"\\server1\share\exportFile.txt", false, "domain", "user1", "password1"), new ExportDestination(@"\\server2\share\exportFile.txt", false, "domain", "user2", "password2") }; // Initialize with the destinations where data is to be exported. s_exporter.Initialize(defaultDestinations); Console.ReadLine(); } static void s_exporter_Initialized(object sender, EventArgs e) { // Export data to all defined locations after initialization. s_exporter.ExportData("TEST DATA"); } }
<exportDestinations> <add name="ExportTimeout" value="-1" description="Total allowed time for all exports to execute in milliseconds." encrypted="false" /> <add name="ExportCount" value="2" description="Total number of export files to produce." encrypted="false" /> <add name="ExportDestination1" value="\\server1\share\" description="Root path for export destination. Use UNC path (\\server\share) with no trailing slash for network shares." encrypted="false" /> <add name="ExportDestination1.ConnectToShare" value="True" description="Set to True to attempt authentication to network share." encrypted="false" /> <add name="ExportDestination1.Domain" value="domain" description="Domain used for authentication to network share (computer name for local accounts)." encrypted="false" /> <add name="ExportDestination1.UserName" value="user1" description="User name used for authentication to network share." encrypted="false" /> <add name="ExportDestination1.Password" value="l2qlAwAPihJjoThH+G53BUxzYsIkTE2yNBHLtd1WA3hysDhwDB82ouJb9n35QtG8" description="Encrypted password used for authentication to network share." encrypted="true" /> <add name="ExportDestination1.FileName" value="exportFile.txt" description="Path and file name of data export (do not include drive letter or UNC share). Prefix with slash when using UNC paths (\path\filename.txt)." encrypted="false" /> <add name="ExportDestination2" value="\\server2\share\" description="Root path for export destination. Use UNC path (\\server\share) with no trailing slash for network shares." encrypted="false" /> <add name="ExportDestination2.ConnectToShare" value="True" description="Set to True to attempt authentication to network share." encrypted="false" /> <add name="ExportDestination2.Domain" value="domain" description="Domain used for authentication to network share (computer name for local accounts)." encrypted="false" /> <add name="ExportDestination2.UserName" value="user2" description="User name used for authentication to network share." encrypted="false" /> <add name="ExportDestination2.Password" value="l2qlAwAPihJjoThH+G53BYT6BXHQr13D6Asdibl0rDmlrgRXvJmCwcP8uvkFRHr9" description="Encrypted password used for authentication to network share." encrypted="true" /> <add name="ExportDestination2.FileName" value="exportFile.txt" description="Path and file name of data export (do not include drive letter or UNC share). Prefix with slash when using UNC paths (\path\filename.txt)." encrypted="false" /> </exportDestinations>