| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Configuration; |
| | | 6 | | |
| | | 7 | | namespace CoreWCF.Configuration |
| | | 8 | | { |
| | | 9 | | public class ServiceElement : ConfigurationElement |
| | | 10 | | { |
| | | 11 | | [ConfigurationProperty(ConfigurationStrings.BehaviorConfiguration, DefaultValue = "")] |
| | | 12 | | [StringValidator(MinLength = 0)] |
| | | 13 | | public string BehaviorConfiguration |
| | | 14 | | { |
| | 1 | 15 | | get { return (string)base[ConfigurationStrings.BehaviorConfiguration]; } |
| | | 16 | | set |
| | | 17 | | { |
| | 0 | 18 | | if (string.IsNullOrEmpty(value)) |
| | | 19 | | { |
| | 0 | 20 | | value = string.Empty; |
| | | 21 | | } |
| | 0 | 22 | | base[ConfigurationStrings.BehaviorConfiguration] = value; |
| | 0 | 23 | | } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefa |
| | | 27 | | public ServiceEndpointElementCollection Endpoints |
| | | 28 | | { |
| | 11 | 29 | | get { return (ServiceEndpointElementCollection)base[ConfigurationStrings.DefaultCollectionName]; } |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | [ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsKey | ConfigurationPr |
| | | 33 | | // [StringValidator(MinLength = 1)] |
| | | 34 | | public string Name |
| | | 35 | | { |
| | 50 | 36 | | get { return (string)base[ConfigurationStrings.Name]; } |
| | | 37 | | set |
| | | 38 | | { |
| | 0 | 39 | | if (string.IsNullOrEmpty(value)) |
| | | 40 | | { |
| | 0 | 41 | | value = string.Empty; |
| | | 42 | | } |
| | 0 | 43 | | base[ConfigurationStrings.Name] = value; |
| | 0 | 44 | | } |
| | | 45 | | } |
| | | 46 | | } |
| | | 47 | | } |