Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ReliableSessionElement.cs / 1 / ReliableSessionElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Channels; using System.ServiceModel; using System.Globalization; using System.ComponentModel; public sealed partial class ReliableSessionElement : BindingElementExtensionElement { public ReliableSessionElement() { } [ConfigurationProperty(ConfigurationStrings.AcknowledgementInterval, DefaultValue = ReliableSessionDefaults.AcknowledgementIntervalString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanOneTick)] public TimeSpan AcknowledgementInterval { get {return (TimeSpan) base[ConfigurationStrings.AcknowledgementInterval]; } set {base[ConfigurationStrings.AcknowledgementInterval] = value; } } public override Type BindingElementType { get {return typeof(ReliableSessionBindingElement); } } [ConfigurationProperty(ConfigurationStrings.FlowControlEnabled, DefaultValue = true)] public bool FlowControlEnabled { get { return (bool)base[ConfigurationStrings.FlowControlEnabled]; } set { base[ConfigurationStrings.FlowControlEnabled] = value; } } [ConfigurationProperty(ConfigurationStrings.InactivityTimeout, DefaultValue = ReliableSessionDefaults.InactivityTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanOneTick)] public TimeSpan InactivityTimeout { get {return (TimeSpan) base[ConfigurationStrings.InactivityTimeout]; } set {base[ConfigurationStrings.InactivityTimeout] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxPendingChannels, DefaultValue = ReliableSessionDefaults.MaxPendingChannels)] [IntegerValidator(MinValue = 1, MaxValue = 16384)] public int MaxPendingChannels { get {return (int) base[ConfigurationStrings.MaxPendingChannels]; } set {base[ConfigurationStrings.MaxPendingChannels] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxRetryCount, DefaultValue = ReliableSessionDefaults.MaxRetryCount)] [IntegerValidator(MinValue = 1)] public int MaxRetryCount { get {return (int) base[ConfigurationStrings.MaxRetryCount]; } set {base[ConfigurationStrings.MaxRetryCount] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxTransferWindowSize, DefaultValue = ReliableSessionDefaults.MaxTransferWindowSize)] [IntegerValidator(MinValue = 1, MaxValue = 4096)] public int MaxTransferWindowSize { get { return (int)base[ConfigurationStrings.MaxTransferWindowSize]; } set { base[ConfigurationStrings.MaxTransferWindowSize] = value; } } [ConfigurationProperty(ConfigurationStrings.Ordered, DefaultValue = ReliableSessionDefaults.Ordered)] public bool Ordered { get {return (bool) base[ConfigurationStrings.Ordered]; } set {base[ConfigurationStrings.Ordered] = value; } } [ConfigurationProperty(ConfigurationStrings.ReliableMessagingVersion, DefaultValue = ReliableSessionDefaults.ReliableMessagingVersionString)] [TypeConverter(typeof(ReliableMessagingVersionConverter))] public ReliableMessagingVersion ReliableMessagingVersion { get { return (ReliableMessagingVersion)base[ConfigurationStrings.ReliableMessagingVersion]; } set { base[ConfigurationStrings.ReliableMessagingVersion] = value; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); ReliableSessionBindingElement binding = (ReliableSessionBindingElement)bindingElement; binding.AcknowledgementInterval = this.AcknowledgementInterval; binding.FlowControlEnabled = this.FlowControlEnabled; binding.InactivityTimeout = this.InactivityTimeout; binding.MaxPendingChannels = this.MaxPendingChannels; binding.MaxRetryCount = this.MaxRetryCount; binding.MaxTransferWindowSize = this.MaxTransferWindowSize; binding.Ordered = this.Ordered; binding.ReliableMessagingVersion = this.ReliableMessagingVersion; } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ReliableSessionElement source = (ReliableSessionElement) from; #pragma warning suppress 56506 //[....]; base.CopyFrom() checks for 'from' being null this.AcknowledgementInterval = source.AcknowledgementInterval; this.FlowControlEnabled = source.FlowControlEnabled; this.InactivityTimeout = source.InactivityTimeout; this.MaxPendingChannels = source.MaxPendingChannels; this.MaxRetryCount = source.MaxRetryCount; this.MaxTransferWindowSize = source.MaxTransferWindowSize; this.Ordered = source.Ordered; this.ReliableMessagingVersion = source.ReliableMessagingVersion; } protected internal override BindingElement CreateBindingElement() { ReliableSessionBindingElement binding = new ReliableSessionBindingElement(); this.ApplyConfiguration(binding); return binding; } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); ReliableSessionBindingElement binding = (ReliableSessionBindingElement) bindingElement; this.AcknowledgementInterval = binding.AcknowledgementInterval; this.FlowControlEnabled = binding.FlowControlEnabled; this.InactivityTimeout = binding.InactivityTimeout; this.MaxPendingChannels = binding.MaxPendingChannels; this.MaxRetryCount = binding.MaxRetryCount; this.MaxTransferWindowSize = binding.MaxTransferWindowSize; this.Ordered = binding.Ordered; this.ReliableMessagingVersion = binding.ReliableMessagingVersion; } } } // 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
- XmlUtilWriter.cs
- WindowsToolbarItemAsMenuItem.cs
- X509ChainElement.cs
- DataGridViewRowPostPaintEventArgs.cs
- AncillaryOps.cs
- WinInet.cs
- WebPartRestoreVerb.cs
- CancelRequestedQuery.cs
- SelectionGlyphBase.cs
- BitmapCache.cs
- ElementAction.cs
- BackStopAuthenticationModule.cs
- DataSourceSelectArguments.cs
- RtfControls.cs
- PolicyManager.cs
- SerializationException.cs
- XslCompiledTransform.cs
- CodeNamespaceImportCollection.cs
- SimpleTextLine.cs
- DocumentPaginator.cs
- GregorianCalendar.cs
- ConnectionManagementSection.cs
- _SpnDictionary.cs
- AstTree.cs
- LinqExpressionNormalizer.cs
- BlurBitmapEffect.cs
- _BaseOverlappedAsyncResult.cs
- IteratorDescriptor.cs
- Stylus.cs
- Int64.cs
- DesignerActionUIStateChangeEventArgs.cs
- TraceEventCache.cs
- PseudoWebRequest.cs
- TemplateControlCodeDomTreeGenerator.cs
- JournalNavigationScope.cs
- GuidTagList.cs
- XmlFormatWriterGenerator.cs
- SizeAnimationBase.cs
- WebPartDisplayModeCollection.cs
- Parser.cs
- ModuleBuilder.cs
- ByteStreamMessageEncoderFactory.cs
- StorageEntityTypeMapping.cs
- BitmapEffectvisualstate.cs
- ReceiveSecurityHeaderEntry.cs
- ByeOperation11AsyncResult.cs
- RelationshipManager.cs
- ColumnMapTranslator.cs
- EffectiveValueEntry.cs
- SpellerInterop.cs
- CompositeFontInfo.cs
- UnsafeNativeMethods.cs
- Pkcs9Attribute.cs
- EnumerableRowCollectionExtensions.cs
- AttributeExtensions.cs
- AnnotationResource.cs
- SerialReceived.cs
- storepermissionattribute.cs
- Permission.cs
- EmptyStringExpandableObjectConverter.cs
- RegexTree.cs
- NativeMethods.cs
- RequestBringIntoViewEventArgs.cs
- LassoSelectionBehavior.cs
- WaitHandleCannotBeOpenedException.cs
- SMSvcHost.cs
- _SslSessionsCache.cs
- CursorConverter.cs
- HtmlTableRowCollection.cs
- XmlFormatExtensionPointAttribute.cs
- DictionaryKeyPropertyAttribute.cs
- GradientBrush.cs
- TemplateManager.cs
- CodeTypeMember.cs
- SystemIPInterfaceProperties.cs
- ApplicationGesture.cs
- Equal.cs
- DropSource.cs
- DesignerTransaction.cs
- NominalTypeEliminator.cs
- ElementInit.cs
- WindowsSlider.cs
- HttpWebRequest.cs
- ModifierKeysValueSerializer.cs
- EntityDataSourceSelectingEventArgs.cs
- WebPartMinimizeVerb.cs
- RelationshipDetailsRow.cs
- DataGridViewCellFormattingEventArgs.cs
- GroupBoxAutomationPeer.cs
- RegularExpressionValidator.cs
- Column.cs
- PartialList.cs
- UnsettableComboBox.cs
- InfoCardArgumentException.cs
- DataGridViewImageCell.cs
- HttpRequestWrapper.cs
- ColorContextHelper.cs
- SyncMethodInvoker.cs
- SmtpNtlmAuthenticationModule.cs
- Panel.cs