Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / BinaryMessageEncodingElement.cs / 1 / BinaryMessageEncodingElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Channels; public sealed partial class BinaryMessageEncodingElement : BindingElementExtensionElement { public BinaryMessageEncodingElement() { } public override Type BindingElementType { get { return typeof(BinaryMessageEncodingBindingElement); } } [ConfigurationProperty(ConfigurationStrings.MaxReadPoolSize, DefaultValue = EncoderDefaults.MaxReadPoolSize)] [IntegerValidator(MinValue = 1)] public int MaxReadPoolSize { get { return (int)base[ConfigurationStrings.MaxReadPoolSize]; } set { base[ConfigurationStrings.MaxReadPoolSize] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxWritePoolSize, DefaultValue = EncoderDefaults.MaxWritePoolSize)] [IntegerValidator(MinValue = 1)] public int MaxWritePoolSize { get { return (int)base[ConfigurationStrings.MaxWritePoolSize]; } set { base[ConfigurationStrings.MaxWritePoolSize] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxSessionSize, DefaultValue = BinaryEncoderDefaults.MaxSessionSize)] [IntegerValidator(MinValue = 0)] public int MaxSessionSize { get { return (int)base[ConfigurationStrings.MaxSessionSize]; } set { base[ConfigurationStrings.MaxSessionSize] = value; } } [ConfigurationProperty(ConfigurationStrings.ReaderQuotas)] public XmlDictionaryReaderQuotasElement ReaderQuotas { get { return (XmlDictionaryReaderQuotasElement) base[ConfigurationStrings.ReaderQuotas]; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); BinaryMessageEncodingBindingElement binding = (BinaryMessageEncodingBindingElement)bindingElement; binding.MaxSessionSize = this.MaxSessionSize; binding.MaxReadPoolSize = this.MaxReadPoolSize; binding.MaxWritePoolSize = this.MaxWritePoolSize; #pragma warning suppress 56506 //[....]; base.ApplyConfiguration() checks for 'binding' being null this.ReaderQuotas.ApplyConfiguration(binding.ReaderQuotas); } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); BinaryMessageEncodingElement source = (BinaryMessageEncodingElement)from; #pragma warning suppress 56506 //[....]; base.CopyFrom() checks for 'from' being null this.MaxSessionSize = source.MaxSessionSize; this.MaxReadPoolSize = source.MaxReadPoolSize; this.MaxWritePoolSize = source.MaxWritePoolSize; } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); BinaryMessageEncodingBindingElement binding = (BinaryMessageEncodingBindingElement)bindingElement; this.MaxSessionSize = binding.MaxSessionSize; this.MaxReadPoolSize = binding.MaxReadPoolSize; this.MaxWritePoolSize = binding.MaxWritePoolSize; this.ReaderQuotas.InitializeFrom(binding.ReaderQuotas); } protected internal override BindingElement CreateBindingElement() { BinaryMessageEncodingBindingElement binding = new BinaryMessageEncodingBindingElement(); this.ApplyConfiguration(binding); return binding; } } } // 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
- DataPager.cs
- CmsInterop.cs
- SocketException.cs
- HyperLinkDataBindingHandler.cs
- WebPartEditorApplyVerb.cs
- CounterSetInstanceCounterDataSet.cs
- ListMarkerSourceInfo.cs
- VisualTarget.cs
- Duration.cs
- UnsafeNativeMethods.cs
- IteratorFilter.cs
- AdPostCacheSubstitution.cs
- NumberFormatInfo.cs
- Part.cs
- HttpCacheVary.cs
- StrokeCollection2.cs
- UnionExpr.cs
- EmissiveMaterial.cs
- EnumerableCollectionView.cs
- ApplicationId.cs
- ArrangedElement.cs
- FixedFlowMap.cs
- ADMembershipUser.cs
- SingleQueryOperator.cs
- PerspectiveCamera.cs
- XmlSchemaComplexContent.cs
- MulticastNotSupportedException.cs
- DataGridViewCellConverter.cs
- EmptyEnumerable.cs
- HtmlFormWrapper.cs
- SpecialTypeDataContract.cs
- ExtenderProvidedPropertyAttribute.cs
- SqlError.cs
- TextParaClient.cs
- UshortList2.cs
- IisTraceWebEventProvider.cs
- ProfileSettingsCollection.cs
- VectorAnimationBase.cs
- TranslateTransform3D.cs
- InitializationEventAttribute.cs
- WsatProxy.cs
- NonVisualControlAttribute.cs
- WrappedIUnknown.cs
- SettingsPropertyValueCollection.cs
- EventData.cs
- PingReply.cs
- TextPattern.cs
- ExceptionHandlers.cs
- SqlDataSourceSelectingEventArgs.cs
- FileClassifier.cs
- StubHelpers.cs
- CaseInsensitiveHashCodeProvider.cs
- UIElement3DAutomationPeer.cs
- FlowDocumentView.cs
- EnumerableRowCollectionExtensions.cs
- DataGridViewCellStyleConverter.cs
- GraphicsPath.cs
- D3DImage.cs
- MailHeaderInfo.cs
- IItemProperties.cs
- TreeNodeEventArgs.cs
- Size3D.cs
- ValueSerializer.cs
- DispatcherTimer.cs
- XmlImplementation.cs
- BitmapEncoder.cs
- CatalogPartChrome.cs
- RightsManagementLicense.cs
- BindingOperations.cs
- DesignOnlyAttribute.cs
- MaskPropertyEditor.cs
- WindowsFormsLinkLabel.cs
- infer.cs
- DbMetaDataFactory.cs
- MenuItem.cs
- XmlCharCheckingWriter.cs
- UriWriter.cs
- ObjectDataSourceStatusEventArgs.cs
- UIElementHelper.cs
- ListView.cs
- Clause.cs
- Permission.cs
- SafeSystemMetrics.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Container.cs
- CookieProtection.cs
- ExpressionEditorSheet.cs
- WebWorkflowRole.cs
- TabPanel.cs
- ReachFixedPageSerializerAsync.cs
- ClientSession.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- StyleSheetRefUrlEditor.cs
- WindowsFont.cs
- HttpStreamXmlDictionaryWriter.cs
- Utils.cs
- DataGridCaption.cs
- UrlPropertyAttribute.cs
- DBSchemaRow.cs
- EntitySetDataBindingList.cs