2012-08-13 13:26:06 -01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Configuration
|
|
|
|
|
|
{
|
2017-09-15 18:22:19 +02:00
|
|
|
|
public class FileSystemProviderElement : ConfigurationElement, IFileSystemProviderElement
|
2012-08-13 13:26:06 -01:00
|
|
|
|
{
|
|
|
|
|
|
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]));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-09-15 18:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
string IFileSystemProviderElement.Alias
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return Alias; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string IFileSystemProviderElement.Type
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return Type; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IDictionary<string, string> _params;
|
|
|
|
|
|
IDictionary<string, string> IFileSystemProviderElement.Parameters
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_params != null) return _params;
|
|
|
|
|
|
_params = new Dictionary<string, string>();
|
|
|
|
|
|
foreach (KeyValueConfigurationElement element in Parameters)
|
|
|
|
|
|
{
|
|
|
|
|
|
_params.Add(element.Key, element.Value);
|
|
|
|
|
|
}
|
|
|
|
|
|
return _params;
|
|
|
|
|
|
}
|
2017-09-23 10:08:18 +02:00
|
|
|
|
}
|
2012-08-13 13:26:06 -01:00
|
|
|
|
}
|
|
|
|
|
|
}
|