Initializes a new instance of the DataSource class that logs events to a configurable log file.
Declaration Syntax
Remarks
Only a single instance of DataSource can be created.
The configuration file defines the configuration of the DataSource library. Its contents must be in the standard DataSource "conf" file format; see Configuration. This constructor instantiates a DataSource with a logger that will direct all log messages to the log file belonging to DataSource.NET.
The name of the log file can be defined using the event-log configuration item. The log cycle period can be configured using the add-log configuration section. For more information, see the section of the Liberator Administration Guide on “Advanced log file settings”.
Examples
CopyC#
using Caplin.DataSource; namespace DataSourceExamples.Basics { public class ConstructDataSource { public static void ConstructDataSourceExample() { // Construct a DataSource instance using the configuration file "datasource.conf". DataSource dataSource = new DataSource("datasource.conf"); } } }