Class ConnectionBase
Base class for connection
Implements
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public abstract class ConnectionBase : Object, INotifyPropertyChanged
  Constructors
ConnectionBase(String)
Initialises a new instance of the ConnectionBase class.
Declaration
protected ConnectionBase(string friendlyName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | friendlyName | Friendly name  | 
      
Properties
ConnectionStatus
Gets the connection status
Declaration
public ConnectionStatus ConnectionStatus { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| ConnectionStatus | 
ConnectionStatusMessage
Gets the connection status message
Declaration
public string ConnectionStatusMessage { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
FriendlyName
Gets or sets the FriendlyName
Declaration
public string FriendlyName { get; protected set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Identifier
Gets the Nonfriendly identifier
Declaration
public abstract string Identifier { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
NonFriendlyIdentifier
Gets the Nonfriendly identifier
Declaration
public abstract string NonFriendlyIdentifier { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Methods
GetConnectionInformation()
Gets the connection information
Declaration
public abstract ConnectionInformationBase GetConnectionInformation()
  Returns
| Type | Description | 
|---|---|
| ConnectionInformationBase | Connection information  | 
      
GetConnectionString()
Gets the connection string for connecting to SQL Race. This can be a database connection string (e.g. for SQL Server) or a SQL Race Server connection string (containing details of IP addresses and port)
Declaration
public abstract string GetConnectionString()
  Returns
| Type | Description | 
|---|---|
| System.String | Connection string.  | 
      
NotifyPropertyChanged(String)
Raise the property changed event
Declaration
protected void NotifyPropertyChanged(string propertyName = "")
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | propertyName | Name of the property.  | 
      
TestConnection()
Refresh and test the SQL Race connection status
Declaration
public ConnectionStatus TestConnection()
  Returns
| Type | Description | 
|---|---|
| ConnectionStatus | Connection status  | 
      
TestFilestreamAccess(ConnectionInformationBase, String, Boolean)
Tests the filestream access.
Declaration
protected virtual bool TestFilestreamAccess(ConnectionInformationBase connectionInformation, string rootPath, bool readOnly)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ConnectionInformationBase | connectionInformation | The connection information.  | 
      
| System.String | rootPath | The root path.  | 
      
| System.Boolean | readOnly | User need read only access  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Events
PropertyChanged
Property changed event
Declaration
public event PropertyChangedEventHandler PropertyChanged
  Event Type
| Type | Description | 
|---|---|
| System.ComponentModel.PropertyChangedEventHandler |