Merge with 4.9.0
This commit is contained in:
42
src/Umbraco.Core/Configuration/FileSystemProviderElement.cs
Normal file
42
src/Umbraco.Core/Configuration/FileSystemProviderElement.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class FileSystemProviderElement : ConfigurationElement
|
||||
{
|
||||
private const string ALIAS_KEY = "alias";
|
||||
private const string TYPE_KEY = "type";
|
||||
private const string PARAMETERS_KEY = "Parameters";
|
||||
|
||||
[ConfigurationProperty(ALIAS_KEY, IsKey = true, IsRequired = true)]
|
||||
public string Alias
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((string)(base[ALIAS_KEY]));
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(TYPE_KEY, IsKey = false, IsRequired = true)]
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((string)(base[TYPE_KEY]));
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(PARAMETERS_KEY, IsDefaultCollection = true, IsRequired = false)]
|
||||
public KeyValueConfigurationCollection Parameters
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((KeyValueConfigurationCollection)(base[PARAMETERS_KEY]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Umbraco.Core.Configuration
|
||||
{
|
||||
[ConfigurationCollection(typeof(FileSystemProviderElement), AddItemName = "Provider")]
|
||||
public class FileSystemProviderElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new FileSystemProviderElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((FileSystemProviderElement)(element)).Alias;
|
||||
}
|
||||
|
||||
new public FileSystemProviderElement this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (FileSystemProviderElement)BaseGet(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs
Normal file
19
src/Umbraco.Core/Configuration/FileSystemProvidersSection.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class FileSystemProvidersSection : ConfigurationSection
|
||||
{
|
||||
private const string PROVIDERS_KEY = "providers";
|
||||
|
||||
[ConfigurationProperty("", IsDefaultCollection = true, IsRequired = true)]
|
||||
public FileSystemProviderElementCollection Providers
|
||||
{
|
||||
get { return ((FileSystemProviderElementCollection)(base[""])); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user