1 //------------------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------------------------
4 
5 namespace System.ServiceModel.Configuration
6 {
7     using System.Configuration;
8 
9     public sealed partial class BaseAddressElement : ConfigurationElement
10     {
BaseAddressElement()11         public BaseAddressElement() : base() { }
12 
13         // BaseAddress is exposed as a string instead of an Uri so that WCF can do
14         // special parsing of wildcards (e.g. '*').
15         [ConfigurationProperty(ConfigurationStrings.BaseAddress, Options = ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired)]
16         [StringValidator(MinLength = 1)]
17         public string BaseAddress
18         {
19             get { return (string)base[ConfigurationStrings.BaseAddress]; }
20             set
21             {
22                 if (String.IsNullOrEmpty(value))
23                 {
24                     value = String.Empty;
25                 }
26                 base[ConfigurationStrings.BaseAddress] = value;
27             }
28         }
29     }
30 }
31