|
using System.Configuration;
namespace DbKeeperNet.Engine
{
/// <summary>Configuration section for .NET App.Config and Web.Config files</summary>
/// <remarks>
/// <code>
/// <![CDATA[
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <configSections>
/// <section name="dbkeeper.net" type="DbKeeperNet.Engine.DbKeeperNetConfigurationSection,DbKeeperNet.Engine"/>
/// </configSections>
/// <dbkeeper.net loggingService="fx">
/// <databaseServiceMappings>
/// <add connectString="mssql" databaseService="MsSql" />
/// </databaseServiceMappings>
/// <extensions>
/// <add assembly="DbKeeperNet.dll" />
/// </extensions>
/// <updateScripts>
/// <add provider="asm" location="manifestResource="MyAssembly.Updates.xml,MyAssembly.dll" />
/// <add provider="disk" location="update.xml" />
/// </updateScripts>
/// </dbkeeper.net>
/// </configuration>
/// ]]>
/// </code>
/// </remarks>
public sealed class DbKeeperNetConfigurationSection: ConfigurationSection
{
[ConfigurationProperty("databaseServiceMappings")]
public DatabaseServiceMappingConfigurationElementCollection DatabaseServiceMappings
{
get
{
return (DatabaseServiceMappingConfigurationElementCollection)this["databaseServiceMappings"];
}
}
[ConfigurationProperty("loggingService", DefaultValue = "dummy")]
public string LoggingService
{
get { return (string)this["loggingService"]; }
}
[ConfigurationProperty("extensions")]
public ExtensionConfigurationElementCollection Extensions
{
get { return (ExtensionConfigurationElementCollection)this["extensions"]; }
}
[ConfigurationProperty("updateScripts")]
public UpdateScriptConfigurationElementCollection UpdateScripts
{
get { return (UpdateScriptConfigurationElementCollection)this["updateScripts"]; }
}
public static DbKeeperNetConfigurationSection Current
{
get
{
return (DbKeeperNetConfigurationSection)ConfigurationManager.GetSection("dbkeeper.net");
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm software developer since 1996. I started with assembler on Intel 8051 CPUs, during years I was interested in C, C++, Sybase PowerBuilder, PHP, Sybase Anywhere Database, MSSQL server and multiplatform development.
Currently I'm developing in C++ and C# (this is my favorit and I spent some time with MCPD achievement). I'm also interested in design patterns.