Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ServiceThrottlingElement.cs / 1 / ServiceThrottlingElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Dispatcher; using System.ServiceModel.Description; using System.ServiceModel; public sealed partial class ServiceThrottlingElement : BehaviorExtensionElement { public ServiceThrottlingElement() { } [ConfigurationProperty(ConfigurationStrings.MaxConcurrentCalls, DefaultValue = ServiceThrottle.DefaultMaxConcurrentCalls)] [IntegerValidator(MinValue = 1)] public int MaxConcurrentCalls { get {return (int) base[ConfigurationStrings.MaxConcurrentCalls]; } set {base[ConfigurationStrings.MaxConcurrentCalls] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxConcurrentSessions, DefaultValue = ServiceThrottle.DefaultMaxConcurrentSessions)] [IntegerValidator(MinValue = 1)] public int MaxConcurrentSessions { get { return (int)base[ConfigurationStrings.MaxConcurrentSessions]; } set { base[ConfigurationStrings.MaxConcurrentSessions] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxConcurrentInstances, DefaultValue = ServiceThrottle.DefaultMaxConcurrentCalls + ServiceThrottle.DefaultMaxConcurrentSessions)] [IntegerValidator(MinValue = 1)] public int MaxConcurrentInstances { get {return (int) base[ConfigurationStrings.MaxConcurrentInstances]; } set {base[ConfigurationStrings.MaxConcurrentInstances] = value; } } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ServiceThrottlingElement source = (ServiceThrottlingElement) from; #pragma warning suppress 56506 //[....]; base.CopyFrom() checks for 'from' being null this.MaxConcurrentCalls = source.MaxConcurrentCalls; this.MaxConcurrentSessions = source.MaxConcurrentSessions; this.MaxConcurrentInstances = source.MaxConcurrentInstances; } protected internal override object CreateBehavior() { ServiceThrottlingBehavior behavior = new ServiceThrottlingBehavior(); behavior.MaxConcurrentCalls = this.MaxConcurrentCalls; behavior.MaxConcurrentSessions = this.MaxConcurrentSessions; PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.MaxConcurrentInstances].ValueOrigin != PropertyValueOrigin.Default) { behavior.MaxConcurrentInstances = this.MaxConcurrentInstances; } return behavior; } public override Type BehaviorType { get { return typeof(ServiceThrottlingBehavior); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SimpleTextLine.cs
- SystemIcmpV6Statistics.cs
- DefaultSerializationProviderAttribute.cs
- LiteralControl.cs
- MachineKeySection.cs
- MenuItemStyle.cs
- SmiXetterAccessMap.cs
- Privilege.cs
- WindowsListBox.cs
- PatternMatcher.cs
- TreeNodeStyle.cs
- ContainerControl.cs
- ArrayElementGridEntry.cs
- VisualStyleElement.cs
- SystemDropShadowChrome.cs
- BitmapImage.cs
- WebBaseEventKeyComparer.cs
- EncodingDataItem.cs
- FontStyle.cs
- MonthChangedEventArgs.cs
- DataSourceXmlSerializer.cs
- SqlInfoMessageEvent.cs
- InputBinder.cs
- WebResponse.cs
- TableProviderWrapper.cs
- FrameworkTemplate.cs
- XPathBuilder.cs
- Debug.cs
- AnnotationResourceChangedEventArgs.cs
- TextParaLineResult.cs
- SerialPinChanges.cs
- Model3D.cs
- GroupBox.cs
- FixedSOMFixedBlock.cs
- CorrelationToken.cs
- WmfPlaceableFileHeader.cs
- XmlMapping.cs
- CompleteWizardStep.cs
- CompilationPass2TaskInternal.cs
- WindowsToolbarItemAsMenuItem.cs
- GridViewSortEventArgs.cs
- ImageMap.cs
- PagedDataSource.cs
- DataSourceExpressionCollection.cs
- PromptStyle.cs
- TextChange.cs
- MetadataPropertyvalue.cs
- GrammarBuilderWildcard.cs
- DataServicePagingProviderWrapper.cs
- RegexRunner.cs
- ViewStateChangedEventArgs.cs
- MeshGeometry3D.cs
- Transform3D.cs
- ImageBrush.cs
- OptimalBreakSession.cs
- RelationshipWrapper.cs
- ConfigXmlComment.cs
- VersionedStreamOwner.cs
- NavigationHelper.cs
- ObjectManager.cs
- ArithmeticException.cs
- ExecutionEngineException.cs
- DataErrorValidationRule.cs
- IndependentAnimationStorage.cs
- WebPartDisplayModeCancelEventArgs.cs
- MenuItemStyle.cs
- EmbeddedObject.cs
- EventData.cs
- Hyperlink.cs
- FormsAuthenticationCredentials.cs
- DocumentApplication.cs
- PageHandlerFactory.cs
- ArglessEventHandlerProxy.cs
- ConnectorRouter.cs
- CallTemplateAction.cs
- HeaderCollection.cs
- MailAddressCollection.cs
- Shape.cs
- SettingsSection.cs
- ObjectContextServiceProvider.cs
- altserialization.cs
- XsltLibrary.cs
- WrapPanel.cs
- ConfigurationValidatorBase.cs
- CompositeDataBoundControl.cs
- EventQueueState.cs
- SimpleBitVector32.cs
- UInt16Converter.cs
- SelfIssuedSamlTokenFactory.cs
- StagingAreaInputItem.cs
- TimersDescriptionAttribute.cs
- ByteRangeDownloader.cs
- IndicFontClient.cs
- PersonalizationProviderCollection.cs
- WebServicesSection.cs
- AnimationClock.cs
- CodeEntryPointMethod.cs
- TemplateColumn.cs
- OutputCacheProviderCollection.cs
- MeshGeometry3D.cs