Refactoring: moving

the Catalog manager and model into the Yavsc.Model.FrontOffice 
namespace
* Web.config:
* Catalog.xml:
* MyClass.cs:
* Note.cs:
* Euro.cs:
* Unit.cs:
* Text.cs:
* Link.cs:
* Price.cs:
* Label.cs:
* Brand.cs:
* Scalar.cs:
* Option.cs:
* Period.cs:
* YavscModel.csproj:
* Catalog.cs:
* Service.cs:
* Product.cs:
* YavscClient.csproj:
* CatalogManager.cs:
* Currency.cs:
* CheckBox.cs:
* SaleForm.cs:
* FormInput.cs:
* CatalogProvider.cs:
* TextInput.cs:
* SelectItem.cs:
* SalesCatalog.csproj:
* FilesInput.cs:
* FormElement.cs:
* SelectInput.cs:
* IValueProvider.cs:
* StockStatus.cs:
* RadioButton.cs:
* Commande.cs:
* ProductImage.cs:
* WebCatalogExtensions.cs:
* TemplateException.cs:
* ProductCategory.cs:
* PhysicalProduct.cs:
* Note.cs:
* Link.cs:
* Text.cs:
* Euro.cs:
* Unit.cs:
* WorkFlowManager.cs:
* Brand.cs:
* Label.cs:
* Price.cs:
* Scalar.cs:
* FrontOfficeController.cs:
* Period.cs:
* Option.cs:
* Product.cs:
* Service.cs:
* Catalog.cs:
* SaleForm.cs:
* Currency.cs:
* CheckBox.cs:
* TextInput.cs:
* FrontOfficeApiController.cs:
* FormInput.cs:
* SelectItem.cs:
* FilesInput.cs:
* XmlCatalog.cs:
* FormElement.cs:
* SelectInput.cs:
* RadioButton.cs:
* StockStatus.cs:
* ProductImage.cs:
* CatalogHelper.cs:
* CatalogManager.cs:
* CatalogProvider.cs:
* ProductCategory.cs:
* PhysicalProduct.cs:
* XmlCatalogProvider.cs:
* CatalogProviderConfigurationElement.cs:
* CatalogProvidersConfigurationSection.cs:
* CatalogProvidersConfigurationCollection.cs:
* CatalogProviderConfigurationElement.cs:
* CatalogProvidersConfigurationSection.cs:
* CatalogProvidersConfigurationCollection.cs: 
* CatalogHelper.cs:
This commit is contained in:
Paul Schneider 2015-01-28 15:04:07 +01:00
commit 3c6c3f19aa
49 changed files with 110 additions and 98 deletions

View file

@ -0,0 +1,39 @@
using System;
using System.Configuration;
namespace Yavsc.Model.FrontOffice.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 Yavsc.Model.FrontOffice.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 Yavsc.Model.FrontOffice.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; }
}
}
}