fix base/rest service - cleanup + new config file

This commit is contained in:
Stephan
2012-09-27 15:37:21 -02:00
parent 126044cd48
commit a469e3dbe3
17 changed files with 383 additions and 145 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
namespace Umbraco.Web.BaseRest.Configuration
{
[ConfigurationCollection(typeof(ExtensionElement), CollectionType = ConfigurationElementCollectionType.BasicMapAlternate)]
public class ExtensionElementCollection : ConfigurationElementCollection
{
const string Key_Extension = "extension";
public override ConfigurationElementCollectionType CollectionType
{
get { return ConfigurationElementCollectionType.BasicMapAlternate; }
}
protected override string ElementName
{
get { return Key_Extension; }
}
protected override bool IsElementName(string elementName)
{
return elementName.Equals(Key_Extension, StringComparison.InvariantCultureIgnoreCase);
}
protected override ConfigurationElement CreateNewElement()
{
return new ExtensionElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((ExtensionElement)element).Alias;
}
public override bool IsReadOnly()
{
return false;
}
new public ExtensionElement this[string index]
{
get { return (ExtensionElement)BaseGet(index); }
}
}
}