forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNamespaceConfigurationElementCollection.cs
More file actions
36 lines (34 loc) · 1.48 KB
/
NamespaceConfigurationElementCollection.cs
File metadata and controls
36 lines (34 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace RazorEngine.Configuration
{
using System.Configuration;
/// <summary>
/// Represents a collection of <see cref="NamespaceConfigurationElement"/> items.
/// </summary>
[ConfigurationCollection(typeof(NamespaceConfigurationElement))]
public class NamespaceConfigurationElementCollection : ConfigurationElementCollection
{
#region Methods
/// <summary>
/// When overridden in a derived class, creates a new <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </summary>
/// <returns>
/// A new <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </returns>
protected override ConfigurationElement CreateNewElement()
{
return new NamespaceConfigurationElement();
}
/// <summary>
/// Gets the element key for a specified configuration element when overridden in a derived class.
/// </summary>
/// <param name="element">The <see cref="T:System.Configuration.ConfigurationElement"/> to return the key for.</param>
/// <returns>
/// An <see cref="T:System.Object"/> that acts as the key for the specified <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </returns>
protected override object GetElementKey(ConfigurationElement element)
{
return ((NamespaceConfigurationElement)element).Namespace;
}
#endregion
}
}