DataSource.NET
DataSource Constructor (configFile)
NamespacesCaplin.DataSourceDataSourceDataSource(String)
Initializes a new instance of the DataSource class that logs events to a configurable log file.
Declaration Syntax
C#Visual BasicVisual C++
public DataSource(
	string configFile
)
Public Sub New ( _
	configFile As String _
)
public:
DataSource(
	String^ configFile
)
Parameters
configFile (String)
The configuration file for this DataSource application.
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");
        }
    }
}

Assembly: DataSource.NET (Module: DataSource.NET) Version: 6.2.6.2123 (6.2.6.2123)