Méthode | Description | |
---|---|---|
DatabaseConfig ( IDictionary settings ) : System |
A constructor as before, but with the configuration settings passed as an IDictionary object
|
|
DatabaseConfig ( string vendor, string server, string database, string userName, string password, string port ) : System |
A constructor with specific configurations provided
|
|
Equals ( object obj ) : bool |
Checks whether this database configuration is equal to that of the object provided
|
|
GetConnection ( ) : IDbConnection |
Creates a database connection using the configuration settings stored
|
|
GetConnectionString ( ) : String |
Returns a connection string tailored for the database vendor
|
|
GetDatabaseConnection ( ) : IDatabaseConnection |
Creates a database connection using the configuration settings stored
|
|
GetHashCode ( ) : int |
Returns the hashcode of all the settings added together
|
|
ISupportsRSADecryption ( string xmlPrivateKey ) : void |
Sets the private key to use to decrypt the password. The private key is in xml format.
|
|
ReadFromConfigFile ( ) : |
Creates a new configuration object by reading the "DatabaseConfig" settings from the project's configuration settings
|
|
ReadFromConfigFile ( string configSectionName ) : |
Creates a new configuration object by reading the "DatabaseConfig" settings from the project's configuration settings
|
|
SetPrivateKey ( |
Sets the private key to use to decrypt password. The private key is an RSA object.
|
|
SetPrivateKey ( string xmlPrivateKey ) : void |
Sets the private key to use to decrypt the password. The private key is in xml format.
|
|
ToString ( ) : string |
Returns a string with all the settings listed
|
Méthode | Description | |
---|---|---|
Clone ( ) : |
Méthode | Description | |
---|---|---|
DatabaseConfig ( ) : System |
A deparameterised constructor
|
public DatabaseConfig ( IDictionary settings ) : System | ||
settings | IDictionary | An IDictionary object containing entries /// for "vendor", "server", "database", "username", "password" and /// "port" |
Résultat | System |
public DatabaseConfig ( string vendor, string server, string database, string userName, string password, string port ) : System | ||
vendor | string | The database vendor - use the strings /// provided (eg. DatabaseConfig.MySql) |
server | string | The database server |
database | string | The database name |
userName | string | The username |
password | string | The password |
port | string | The port |
Résultat | System |
public Equals ( object obj ) : bool | ||
obj | object | The object to compare with, which must be a /// type of DatabaseConfig |
Résultat | bool |
public GetDatabaseConnection ( ) : IDatabaseConnection | ||
Résultat | IDatabaseConnection |
public ISupportsRSADecryption ( string xmlPrivateKey ) : void | ||
xmlPrivateKey | string | The xml format of the RSA key (RSA.ToXmlString(true)) |
Résultat | void |
public static ReadFromConfigFile ( ) : |
||
Résultat |
public static ReadFromConfigFile ( string configSectionName ) : |
||
configSectionName | string | The name of the Config Setting Section where the database connection settings are stored. |
Résultat |
public SetPrivateKey ( |
||
privateKey | The RSA object which has the private key | |
Résultat | void |
public SetPrivateKey ( string xmlPrivateKey ) : void | ||
xmlPrivateKey | string | The xml format of the RSA key (RSA.ToXmlString(true)) |
Résultat | void |