2013-09-02 15:40:14 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Configuration.UmbracoSettings
|
|
|
|
|
|
{
|
2013-09-13 13:41:07 +10:00
|
|
|
|
internal class RazorStaticMappingCollection : ConfigurationElementCollection, IEnumerable<IRazorStaticMapping>
|
2013-09-02 15:40:14 +02:00
|
|
|
|
{
|
|
|
|
|
|
protected override ConfigurationElement CreateNewElement()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new RazorStaticMappingElement();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override object GetElementKey(ConfigurationElement element)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ((RazorStaticMappingElement) element).DataTypeGuid
|
|
|
|
|
|
+ ((RazorStaticMappingElement) element).NodeTypeAlias
|
|
|
|
|
|
+ ((RazorStaticMappingElement) element).DocumentTypeAlias;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-13 13:41:07 +10:00
|
|
|
|
IEnumerator<IRazorStaticMapping> IEnumerable<IRazorStaticMapping>.GetEnumerator()
|
2013-09-02 15:40:14 +02:00
|
|
|
|
{
|
|
|
|
|
|
for (var i = 0; i < Count; i++)
|
|
|
|
|
|
{
|
2013-09-13 13:41:07 +10:00
|
|
|
|
yield return BaseGet(i) as IRazorStaticMapping;
|
2013-09-02 15:40:14 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetEnumerator();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2013-08-31 11:28:19 +10:00
|
|
|
|
}
|