Enterprise Library Data Access Application Block  7.0-rc1
The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.
Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString Class Reference

ConnectionString class constructs a connection string by inserting a username and password into a template. More...

Public Member Functions

 ConnectionString (string connectionString, string userIdTokens, string passwordTokens)
 Initializes a new instance of the ConnectionString with a connection string, the user ID tokens and password tokens. More...
 
override string ToString ()
 Gets the formatted connection string. More...
 
string ToStringNoCredentials ()
 Gets the formatted connection string without the username and password. More...
 
ConnectionString CreateNewConnectionString (string connectionStringToFormat)
 Formats a new connection string with a user ID and password. More...
 

Properties

string UserName [get, set]
 Gets or sets the name of the user. More...
 
string Password [get, set]
 Gets or sets the user password for the connection string. More...
 

Detailed Description

ConnectionString class constructs a connection string by inserting a username and password into a template.

Constructor & Destructor Documentation

◆ ConnectionString()

Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.ConnectionString ( string  connectionString,
string  userIdTokens,
string  passwordTokens 
)

Initializes a new instance of the ConnectionString with a connection string, the user ID tokens and password tokens.

Parameters
connectionStringThe connection string.
userIdTokensThe user id tokens that can be parsed out of the connection string.
passwordTokensThe password tokens that can be parsed out of the connection string.
Exceptions
ArgumentExceptionOne of the parameters is null or empty.

Member Function Documentation

◆ CreateNewConnectionString()

ConnectionString Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.CreateNewConnectionString ( string  connectionStringToFormat)

Formats a new connection string with a user ID and password.


Parameters
connectionStringToFormatThe connection string to format.


◆ ToString()

override string Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.ToString ( )

Gets the formatted connection string.


◆ ToStringNoCredentials()

string Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.ToStringNoCredentials ( )

Gets the formatted connection string without the username and password.


Property Documentation

◆ Password

string Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.Password
getset

Gets or sets the user password for the connection string.

◆ UserName

string Microsoft.Practices.EnterpriseLibrary.Data.ConnectionString.UserName
getset

Gets or sets the name of the user.

Database username for the connection string.


The documentation for this class was generated from the following file: