2012-09-27 15:37:21 -02:00
|
|
|
|
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
|
|
|
|
|
|
{
|
2013-03-01 13:56:12 -01:00
|
|
|
|
const string KeyExtension = "extension";
|
2012-09-27 15:37:21 -02:00
|
|
|
|
|
|
|
|
|
|
public override ConfigurationElementCollectionType CollectionType
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return ConfigurationElementCollectionType.BasicMapAlternate; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override string ElementName
|
|
|
|
|
|
{
|
2013-03-01 13:56:12 -01:00
|
|
|
|
get { return KeyExtension; }
|
2012-09-27 15:37:21 -02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override bool IsElementName(string elementName)
|
|
|
|
|
|
{
|
2013-03-01 13:56:12 -01:00
|
|
|
|
return elementName.Equals(KeyExtension, StringComparison.InvariantCultureIgnoreCase);
|
2012-09-27 15:37:21 -02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|