Class DbConnectionString<T, TBuilder>

Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ETLBox.Connection
Assembly: ETLBox.dll
Syntax
    public abstract class DbConnectionString<T, TBuilder> : IDbConnectionString where T : DbConnectionString<T, TBuilder>, new()
    where TBuilder : DbConnectionStringBuilder, new()
Type Parameters
NameDescription
T

Derived type

TBuilder

The underlying ADO.NET connection string builder

Constructors

DbConnectionString()

Declaration
    public DbConnectionString()

DbConnectionString(String)

Declaration
    protected DbConnectionString(string value)
Parameters
TypeNameDescription
System.Stringvalue

Properties

Builder

The underlying ADO.NET ConnectionStringBuilder

Declaration
    public TBuilder Builder { get; }
Property Value
TypeDescription
TBuilder

DbName

The database name

Declaration
    public abstract string DbName { get; set; }
Property Value
TypeDescription
System.String

DbNameKeyword

The keyword used in the connection string to identify a database

Declaration
    protected abstract string DbNameKeyword { get; }
Property Value
TypeDescription
System.String

MasterDbName

The name of the master database (if applicable)

Declaration
    public abstract string MasterDbName { get; }
Property Value
TypeDescription
System.String

Value

The connection string value, e.g. "Server=localhost;Database=etlbox;"

Declaration
    public virtual string Value { get; set; }
Property Value
TypeDescription
System.String

Methods

Clone()

Clones the current connection string

Declaration
    public virtual T Clone()
Returns
TypeDescription
T

A copy of the current connection string

CloneWithMasterDbName()

Clones the current connection string with the master database name (if applicable)

Declaration
    public T CloneWithMasterDbName()
Returns
TypeDescription
T

The new connection string with master database name

CloneWithNewDbName(String)

Clone the current connection string with a new database name

Declaration
    public T CloneWithNewDbName(string value)
Parameters
TypeNameDescription
System.Stringvalue

The new database name

Returns
TypeDescription
T

The new connection string

CloneWithoutDbName()

Clones the current connection string with removing the database name

Declaration
    public T CloneWithoutDbName()
Returns
TypeDescription
T

The new connection string without database name

ToString()

Returns the connection string Value

Declaration
    public override string ToString()
Returns
TypeDescription
System.String

The new connection string

Overrides
System.Object.ToString()

Explicit Interface Implementations

IDbConnectionString.Clone()

Creates a copy of the current connection

Declaration
    IDbConnectionString IDbConnectionString.Clone()
Returns
TypeDescription
IDbConnectionString

A copy of the connection string

IDbConnectionString.CloneWithMasterDbName()

Clone the current connection string with the master database

Declaration
    IDbConnectionString IDbConnectionString.CloneWithMasterDbName()
Returns
TypeDescription
IDbConnectionString

The new connection string

IDbConnectionString.CloneWithNewDbName(String)

Clone the current connection string with a new database name

Declaration
    IDbConnectionString IDbConnectionString.CloneWithNewDbName(string value)
Parameters
TypeNameDescription
System.Stringvalue

The new database name

Returns
TypeDescription
IDbConnectionString

The new connection string

Implements