Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.ServiceModel / System / ServiceModel / Configuration / RemoveBehaviorElement.cs
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 RemoveBehaviorElement : BehaviorExtensionElement
10     {
11         public RemoveBehaviorElement() { }
12         
13         [ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsRequired)]
14         [StringValidator(MinLength = 1)]
15         public string Name
16         {
17             get { return (string)base[ConfigurationStrings.Name]; }
18             set { base[ConfigurationStrings.Name] = value; }
19         }
20         
21         public override void CopyFrom(ServiceModelExtensionElement from)
22         {
23             base.CopyFrom(from);
24
25             RemoveBehaviorElement source = (RemoveBehaviorElement) from;
26 #pragma warning suppress 56506 //[....]; base.CopyFrom() checks for 'from' being null
27             this.Name = source.Name;
28         }
29
30         protected internal override object CreateBehavior()
31         {
32             return null;
33         }
34
35         public override Type BehaviorType
36         {
37             get { return null; }
38         }
39     }
40 }