Class DataSource

A DataSource is a tuple of ConnectionFactory objects, where each database in the data dictionary has a corresponding ConnectionFactory.

System.Object
  Stonefield.Query.ConnectionManagement.DataSource
public class DataSource : object, IDataSource

Class Members

MemberDescription

Constructor

Default parameterless constructor. Necessary to use the BaseCollection from Library with this type of object. Do not use this directly.

AddConnection

Adds a new connection object of the passed in type for the passed in database. Returns a generic object for the connection. Intended for use from COM.

public sealed IConnectionFactory AddConnection(string databasename,
    ConnectionSource type);

CanConnect

Indicates whether the currently logged-in user has access to this datasource.

public bool CanConnect();

DeserializeConnections

Deserializes the connection factory objects for this Datasource.

public sealed void DeserializeConnections(XmlReader reader);

public sealed void DeserializeConnections(XmlNode node)

DeserializeRoles

Deserialize the role information for this DataSource.

public sealed void DeserializeRoles(XmlReader reader);

GetConnection

Returns an object given a database name. Intended for use from COM.

public sealed object GetConnection(string databasename);

RemoveConnection

Removes the connection for the database.

public void RemoveConnection(IDatabase index);

public void RemoveConnection(string databaseName);

SerializeConnections

Serializes the connection factory objects for this Datasource.

public sealed void SerializeConnections(XmlWriter writer);

SerializeRoles

Serialize the role information for this DataSource.

public sealed void SerializeRoles(XmlWriter writer);

SetReferences

Injects dependency objects in case this was constructed with parameterless constructor.

public void SetReferences(IConfigurationSettings settings,
    IDataDictionary datadictionary,
    ISecurity security,
    ILocalizer localizer,
    ILogManager logManager,
    IPluginRepository plugins);

TestConnections

Tests all connections.

public sealed bool TestConnections();

TestTableForConnection

Test the specified connection to ensure the database has the specified table.

public sealed bool TestTableForConnection(IConnection connection,
    IDatabase database,
    ITable table);

ToString

Override ToString to return Name.

public virtual string ToString();

CompleteConnectionInformation

Returns false if any connections for this datasource are missing information.

Description

The descriptive name for the data source (the name the user sees).

Error

The message of any errors that occur during connection.

Item

Name

The name of the data source.

Roles

The roles that can access the DataSource.

Requirements

Namespace: Stonefield.Query.ConnectionManagement
Assembly: connections.dll