//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.Configuration {
using System.Configuration;
///
/// Represents the name of a single host or a regex pattern for host names.
///
internal class HostNameElement : ConfigurationElement {
///
/// Gets the name of the @name attribute.
///
private const string NameConfigName = "name";
///
/// Initializes a new instance of the class.
///
internal HostNameElement() {
}
///
/// Initializes a new instance of the class.
///
/// The default value of the property.
internal HostNameElement(string name) {
this.Name = name;
}
///
/// Gets or sets the name of the host on the white or black list.
///
[ConfigurationProperty(NameConfigName, IsRequired = true, IsKey = true)]
////[StringValidator(MinLength = 1)]
public string Name {
get { return (string)this[NameConfigName]; }
set { this[NameConfigName] = value; }
}
}
}