//
// Authors:
// Tim Coleman (tim@timcoleman.com)
+// Chris Toshok (toshok@ximian.com)
//
// Copyright (C) Tim Coleman, 2004
-// (c) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004,2005 Novell, Inc. (http://www.novell.com)
//
//
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 && CONFIGURATION_DEP
using System.Configuration;
{
#region Fields
- ConfigurationPropertyCollection properties;
- static ConfigurationProperty address = new ConfigurationProperty ("Address", typeof (string), null);
+ static ConfigurationPropertyCollection properties;
+ static ConfigurationProperty addressProp;
#endregion // Fields
#region Constructors
- public BypassElement ()
+ static BypassElement ()
{
+ addressProp = new ConfigurationProperty ("Address", typeof (string),
+ null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
+
properties = new ConfigurationPropertyCollection ();
- properties.Add (address);
+ properties.Add (addressProp);
+ }
+
+ public BypassElement ()
+ {
}
public BypassElement (string address)
- : this ()
{
Address = address;
}
#region Properties
+ [ConfigurationProperty ("address", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string Address {
- get { return (string) base [address]; }
- set { base [address] = value; }
+ get { return (string) base [addressProp]; }
+ set { base [addressProp] = value; }
}
- protected internal override ConfigurationPropertyCollection Properties {
+ protected override ConfigurationPropertyCollection Properties {
get { return properties; }
}