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
- SiteIdentityPermission.cs
- GenericWebPart.cs
- CodeCastExpression.cs
- GAC.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- IPipelineRuntime.cs
- Random.cs
- SmtpReplyReader.cs
- HwndTarget.cs
- CallbackHandler.cs
- WebPartCatalogCloseVerb.cs
- PasswordRecovery.cs
- ClientSettings.cs
- PermissionListSet.cs
- DetailsViewPagerRow.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SelectionRange.cs
- FillErrorEventArgs.cs
- ToolBarPanel.cs
- ParallelTimeline.cs
- ToolStripPanel.cs
- Socket.cs
- EventSetter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DataServiceQueryProvider.cs
- AdornedElementPlaceholder.cs
- SizeFConverter.cs
- WinEventQueueItem.cs
- WindowsGraphicsWrapper.cs
- OciHandle.cs
- StrokeNodeData.cs
- PartitionResolver.cs
- BinHexDecoder.cs
- FilteredXmlReader.cs
- FtpCachePolicyElement.cs
- SmtpNegotiateAuthenticationModule.cs
- CapabilitiesSection.cs
- cookie.cs
- StateDesigner.LayoutSelectionGlyph.cs
- DbCommandDefinition.cs
- SectionXmlInfo.cs
- SortQuery.cs
- GeometryDrawing.cs
- altserialization.cs
- TreeViewDesigner.cs
- BaseValidator.cs
- XmlException.cs
- FontConverter.cs
- NotifyIcon.cs
- PageClientProxyGenerator.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ToolStripItemTextRenderEventArgs.cs
- SEHException.cs
- VerificationAttribute.cs
- DeviceSpecificChoice.cs
- DataObject.cs
- TextParagraphView.cs
- ByeMessage11.cs
- KeyGestureConverter.cs
- UnauthorizedAccessException.cs
- CheckBoxList.cs
- GridViewRowPresenterBase.cs
- ApplicationGesture.cs
- ASCIIEncoding.cs
- MenuItemBinding.cs
- DPAPIProtectedConfigurationProvider.cs
- ControlBindingsCollection.cs
- DBCommandBuilder.cs
- ClientSponsor.cs
- MetadataPropertyCollection.cs
- Thread.cs
- SynchronizingStream.cs
- SafeNativeMethodsMilCoreApi.cs
- ActivityTypeResolver.xaml.cs
- ClrProviderManifest.cs
- DataGridPagerStyle.cs
- XmlSchemaSubstitutionGroup.cs
- OleDbConnectionInternal.cs
- CodePropertyReferenceExpression.cs
- UpWmlMobileTextWriter.cs
- FrameworkElement.cs
- StringUtil.cs
- UserUseLicenseDictionaryLoader.cs
- RecordBuilder.cs
- XmlElementAttribute.cs
- StaticTextPointer.cs
- SizeConverter.cs
- MobileControlDesigner.cs
- WebMessageBodyStyleHelper.cs
- DataControlFieldHeaderCell.cs
- NavigationProgressEventArgs.cs
- WriteTimeStream.cs
- Update.cs
- TextSerializer.cs
- TypefaceMetricsCache.cs
- PointF.cs
- IPEndPointCollection.cs
- _NativeSSPI.cs
- HwndTarget.cs
- InputBindingCollection.cs