C# Class Elmah.ConnectionStringHelper

Helper class for resolving connection strings.
Afficher le fichier Open project: elmah/Elmah Class Usage Examples

Méthodes publiques

Méthode Description
GetConnectionString ( System.Collections.IDictionary config ) : string

Gets the connection string from the given configuration dictionary.

GetConnectionString ( System.Collections.IDictionary config, bool resolveDataSource ) : string

Gets the connection string from the given configuration, resolving ~/ and DataDirectory if necessary.

GetConnectionStringProviderName ( System.Collections.IDictionary config ) : string

Gets the provider name from the named connection string (if supplied) from the given configuration dictionary.

GetDataSourceFilePath ( string connectionString ) : string

Extracts the Data Source file path from a connection string ~/ gets resolved as does |DataDirectory|

GetResolvedConnectionString ( string connectionString ) : string

Converts the supplied connection string so that the Data Source specification contains the full path and not ~/ or DataDirectory.

Private Methods

Méthode Description
GetDataSourceFilePath ( DbConnectionStringBuilder builder, string connectionString ) : string
MapPath ( string path ) : string
ResolveDataSourceFilePath ( string path ) : string

Method Details

GetConnectionString() public static méthode

Gets the connection string from the given configuration dictionary.
public static GetConnectionString ( System.Collections.IDictionary config ) : string
config System.Collections.IDictionary
Résultat string

GetConnectionString() public static méthode

Gets the connection string from the given configuration, resolving ~/ and DataDirectory if necessary.
public static GetConnectionString ( System.Collections.IDictionary config, bool resolveDataSource ) : string
config System.Collections.IDictionary
resolveDataSource bool
Résultat string

GetConnectionStringProviderName() public static méthode

Gets the provider name from the named connection string (if supplied) from the given configuration dictionary.
public static GetConnectionStringProviderName ( System.Collections.IDictionary config ) : string
config System.Collections.IDictionary
Résultat string

GetDataSourceFilePath() public static méthode

Extracts the Data Source file path from a connection string ~/ gets resolved as does |DataDirectory|
public static GetDataSourceFilePath ( string connectionString ) : string
connectionString string
Résultat string

GetResolvedConnectionString() public static méthode

Converts the supplied connection string so that the Data Source specification contains the full path and not ~/ or DataDirectory.
public static GetResolvedConnectionString ( string connectionString ) : string
connectionString string
Résultat string