Initial import

This commit is contained in:
Paul Schneider 2014-07-16 20:35:03 +02:00
commit 04804b89a9
279 changed files with 12945 additions and 0 deletions

View file

@ -0,0 +1,39 @@
using System;
using System.Configuration;
namespace SalesCatalog.Configuration
{
public class CatalogProviderConfigurationElement : ConfigurationElement
{
[ConfigurationProperty("name", IsRequired = true, IsKey=true)]
public string Name {
get { return (string)this ["name"]; }
set { this ["name"] = value; }
}
[ConfigurationProperty("type", IsRequired = true)]
public string Type {
get { return (string)this ["type"]; }
set { this ["type"] = value; }
}
[ConfigurationProperty("connection")]
public string Connection {
get { return (string)this ["connection"]; }
set { this ["connection"] = value; }
}
[ConfigurationProperty("description")]
public string Description {
get { return (string)this ["description"]; }
set { this ["description"] = value; }
}
[ConfigurationProperty("applicationName")]
public string ApplicationName {
get { return (string)this ["applicationName"]; }
set { this ["applicationName"] = value; }
}
}
}

View file

@ -0,0 +1,26 @@
using System;
using System.Configuration;
using System.ComponentModel;
namespace SalesCatalog.Configuration
{
public class CatalogProvidersConfigurationCollection : ConfigurationElementCollection
{
protected override ConfigurationElement CreateNewElement ()
{
return new CatalogProviderConfigurationElement();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((CatalogProviderConfigurationElement) element).Name;
}
public CatalogProviderConfigurationElement GetElement (string name)
{
return this.BaseGet(name) as CatalogProviderConfigurationElement;
}
}
}

View file

@ -0,0 +1,26 @@
using System;
using System.Configuration;
using System.ComponentModel;
namespace SalesCatalog.Configuration
{
public class CatalogProvidersConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("defaultProvider")]
public string DefaultProvider {
get { return (string)base ["defaultProvider"]; }
set { base ["defaultProvider"] = value; }
}
[ConfigurationProperty("providers")]
[ConfigurationCollection(typeof(CatalogProvidersConfigurationCollection),
AddItemName = "add",
ClearItemsName = "clear",
RemoveItemName = "remove")]
public CatalogProvidersConfigurationCollection Providers{
get { return (CatalogProvidersConfigurationCollection) base ["providers"]; }
set { base ["providers"] = value; }
}
}
}