Table of Contents

Class DbConAdapter

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Base class for connection string adapters.

public abstract class DbConAdapter
Inheritance
DbConAdapter
Derived
Inherited Members
Extension Methods

Properties

PropDefs

Gets the connection property definitions supported by this adapter.

public abstract DbConPropDef[] PropDefs { get; }

Property Value

DbConPropDef[]

ServerType

Gets the database server type handled by this adapter.

public abstract DbServerType ServerType { get; }

Property Value

DbServerType

Methods

Add(List<string>, string, string)

Adds a connection string part when the value is not empty.

protected void Add(List<string> Parts, string Name, string Value)

Parameters

Parts List<string>
Name string
Value string

Add(List<DbConProp>, DbConPropType, string)

Adds a connection property when the value is not empty.

protected void Add(List<DbConProp> Props, DbConPropType Type, string Value)

Parameters

Props List<DbConProp>
Type DbConPropType
Value string

Construct(List<DbConProp>)

Constructs a connection string from the specified connection properties.

public string Construct(List<DbConProp> Props)

Parameters

Props List<DbConProp>

Returns

string

Contains(Dictionary<string, string>, params string[])

Returns true if the dictionary contains any of the specified names.

protected bool Contains(Dictionary<string, string> Dict, params string[] Names)

Parameters

Dict Dictionary<string, string>
Names string[]

Returns

bool

Find(List<DbConProp>, DbConPropType)

Returns the value of a connection property.

protected string Find(List<DbConProp> Props, DbConPropType Type)

Parameters

Props List<DbConProp>
Type DbConPropType

Returns

string

IsValid(DbConPropType)

Returns true if the specified connection property type is supported by this adapter.

public bool IsValid(DbConPropType Type)

Parameters

Type DbConPropType

Returns

bool

Parse(string)

Parses a connection string into connection properties.

public List<DbConProp> Parse(string ConnectionString)

Parameters

ConnectionString string

Returns

List<DbConProp>

ParseToDictionary(string)

Parses a connection string into a case-insensitive key-value dictionary.

protected Dictionary<string, string> ParseToDictionary(string ConnectionString)

Parameters

ConnectionString string

Returns

Dictionary<string, string>

Read(Dictionary<string, string>, params string[])

Reads the first available value from the specified dictionary names.

protected string Read(Dictionary<string, string> Dict, params string[] Names)

Parameters

Dict Dictionary<string, string>
Names string[]

Returns

string

ReadCharset(Dictionary<string, string>, List<DbConProp>)

Reads the charset property from a parsed connection string.

protected virtual void ReadCharset(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadDatabase(Dictionary<string, string>, List<DbConProp>)

Reads the database property from a parsed connection string.

protected virtual void ReadDatabase(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadIntegratedSecurity(Dictionary<string, string>, List<DbConProp>)

Reads the integrated security property from a parsed connection string.

protected virtual void ReadIntegratedSecurity(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadPassword(Dictionary<string, string>, List<DbConProp>)

Reads the password property from a parsed connection string.

protected virtual void ReadPassword(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadPort(Dictionary<string, string>, List<DbConProp>)

Reads the port property from a parsed connection string.

protected virtual void ReadPort(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadServer(Dictionary<string, string>, List<DbConProp>)

Reads the server property from a parsed connection string.

protected virtual void ReadServer(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadSslMode(Dictionary<string, string>, List<DbConProp>)

Reads the SSL mode property from a parsed connection string.

protected virtual void ReadSslMode(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadTrustServerCertificate(Dictionary<string, string>, List<DbConProp>)

Reads the trust server certificate property from a parsed connection string.

protected virtual void ReadTrustServerCertificate(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

ReadUserId(Dictionary<string, string>, List<DbConProp>)

Reads the user id property from a parsed connection string.

protected virtual void ReadUserId(Dictionary<string, string> Dict, List<DbConProp> Props)

Parameters

Dict Dictionary<string, string>
Props List<DbConProp>

WriteCharset(List<string>, List<DbConProp>)

Writes the charset property to the connection string parts.

protected virtual void WriteCharset(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteDatabase(List<string>, List<DbConProp>)

Writes the database property to the connection string parts.

protected virtual void WriteDatabase(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteIntegratedSecurity(List<string>, List<DbConProp>)

Writes the integrated security property to the connection string parts.

protected virtual void WriteIntegratedSecurity(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WritePassword(List<string>, List<DbConProp>)

Writes the password property to the connection string parts.

protected virtual void WritePassword(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WritePort(List<string>, List<DbConProp>)

Writes the port property to the connection string parts.

protected virtual void WritePort(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteServer(List<string>, List<DbConProp>)

Writes the server property to the connection string parts.

protected virtual void WriteServer(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteSslMode(List<string>, List<DbConProp>)

Writes the SSL mode property to the connection string parts.

protected virtual void WriteSslMode(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteTrustServerCertificate(List<string>, List<DbConProp>)

Writes the trust server certificate property to the connection string parts.

protected virtual void WriteTrustServerCertificate(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>

WriteUserId(List<string>, List<DbConProp>)

Writes the user id property to the connection string parts.

protected virtual void WriteUserId(List<string> Parts, List<DbConProp> Props)

Parameters

Parts List<string>
Props List<DbConProp>