1 //------------------------------------------------------------------------------
2 // <copyright file="BypassElement.cs" company="Microsoft Corporation">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 
7 namespace System.Net.Configuration
8 {
9     using System;
10     using System.Configuration;
11     using System.Reflection;
12     using System.Security.Permissions;
13 
14     public sealed class BypassElement : ConfigurationElement
15     {
BypassElement()16         public BypassElement()
17         {
18             this.properties.Add(this.address);
19         }
20 
BypassElement(string address)21         public BypassElement(string address) : this()
22         {
23             this.Address = address;
24         }
25 
26         protected override ConfigurationPropertyCollection Properties
27         {
28             get
29             {
30                 return this.properties;
31             }
32         }
33 
34         [ConfigurationProperty(ConfigurationStrings.Address, IsRequired=true, IsKey = true)]
35         public string Address
36         {
37             get { return (string)this[this.address]; }
38             set { this[this.address] = value; }
39         }
40 
41         internal string Key
42         {
43             get { return this.Address; }
44         }
45 
46         ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
47 
48         readonly ConfigurationProperty address =
49             new ConfigurationProperty(ConfigurationStrings.Address, typeof(string), null,
50                     ConfigurationPropertyOptions.IsKey);
51 
52     }
53 }
54 
55