Class DbConAdapter
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
ServerType
Gets the database server type handled by this adapter.
public abstract DbServerType ServerType { get; }
Property Value
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
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
PropsList<DbConProp>TypeDbConPropTypeValuestring
Construct(List<DbConProp>)
Constructs a connection string from the specified connection properties.
public string Construct(List<DbConProp> Props)
Parameters
Returns
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
DictDictionary<string, string>Namesstring[]
Returns
Find(List<DbConProp>, DbConPropType)
Returns the value of a connection property.
protected string Find(List<DbConProp> Props, DbConPropType Type)
Parameters
PropsList<DbConProp>TypeDbConPropType
Returns
IsValid(DbConPropType)
Returns true if the specified connection property type is supported by this adapter.
public bool IsValid(DbConPropType Type)
Parameters
TypeDbConPropType
Returns
Parse(string)
Parses a connection string into connection properties.
public List<DbConProp> Parse(string ConnectionString)
Parameters
ConnectionStringstring
Returns
ParseToDictionary(string)
Parses a connection string into a case-insensitive key-value dictionary.
protected Dictionary<string, string> ParseToDictionary(string ConnectionString)
Parameters
ConnectionStringstring
Returns
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
DictDictionary<string, string>Namesstring[]
Returns
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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
DictDictionary<string, string>PropsList<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
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
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
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
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
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
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
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
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)