1 //------------------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //------------------------------------------------------------------------------
5 namespace System.ServiceModel.Configuration
7 using System.Configuration;
8 using System.ServiceModel.Description;
10 public sealed partial class TransactedBatchingElement : BehaviorExtensionElement
12 [ConfigurationProperty(ConfigurationStrings.MaxBatchSize, DefaultValue = 0)]
13 [IntegerValidator(MinValue = 0)]
14 public int MaxBatchSize
16 get { return (int)base[ConfigurationStrings.MaxBatchSize]; }
17 set { base[ConfigurationStrings.MaxBatchSize] = value; }
20 public override void CopyFrom(ServiceModelExtensionElement from)
24 TransactedBatchingElement source = from as TransactedBatchingElement;
25 #pragma warning suppress 56506 //Microsoft; base.CopyFrom() checks for 'from' being null
26 this.MaxBatchSize = source.MaxBatchSize;
29 protected internal override object CreateBehavior()
31 return new TransactedBatchingBehavior(this.MaxBatchSize);
34 public override Type BehaviorType
36 get { return typeof(TransactedBatchingBehavior); }