Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Channels / System / ServiceModel / Configuration / ByteStreamMessageEncodingElement.cs / 1305376 / ByteStreamMessageEncodingElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.Runtime; using System.ServiceModel.Channels; using System.ServiceModel.Configuration; using System.Xml; using System.Diagnostics.CodeAnalysis; public sealed partial class ByteStreamMessageEncodingElement : BindingElementExtensionElement { public ByteStreamMessageEncodingElement() { } [SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationPropertyAttributeRule, Justification = "this property not a configuration property")] public override Type BindingElementType { get { return typeof(ByteStreamMessageEncodingBindingElement); } } [ConfigurationProperty(ByteStreamConfigurationStrings.ReaderQuotas)] public XmlDictionaryReaderQuotasElement ReaderQuotas { get { return (XmlDictionaryReaderQuotasElement)base[ByteStreamConfigurationStrings.ReaderQuotas]; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); ByteStreamMessageEncodingBindingElement binding = (ByteStreamMessageEncodingBindingElement)bindingElement; this.ApplyConfiguration(binding.ReaderQuotas); } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ByteStreamMessageEncodingElement source = (ByteStreamMessageEncodingElement)from; this.CopyFrom(source.ReaderQuotas); } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); ByteStreamMessageEncodingBindingElement element = (ByteStreamMessageEncodingBindingElement)bindingElement; this.InitializeFrom(element.ReaderQuotas); } protected internal override BindingElement CreateBindingElement() { ByteStreamMessageEncodingBindingElement binding = new ByteStreamMessageEncodingBindingElement(); this.ApplyConfiguration(binding); return binding; } void ApplyConfiguration(XmlDictionaryReaderQuotas readerQuotas) { if (readerQuotas == null) { throw FxTrace.Exception.ArgumentNull("readerQuotas"); } XmlDictionaryReaderQuotasElement oldQuotas = this.ReaderQuotas; if (oldQuotas.MaxDepth != 0) { readerQuotas.MaxDepth = oldQuotas.MaxDepth; } if (oldQuotas.MaxStringContentLength != 0) { readerQuotas.MaxStringContentLength = oldQuotas.MaxStringContentLength; } if (oldQuotas.MaxArrayLength != 0) { readerQuotas.MaxArrayLength = oldQuotas.MaxArrayLength; } if (oldQuotas.MaxBytesPerRead != 0) { readerQuotas.MaxBytesPerRead = oldQuotas.MaxBytesPerRead; } if (oldQuotas.MaxNameTableCharCount != 0) { readerQuotas.MaxNameTableCharCount = oldQuotas.MaxNameTableCharCount; } } void InitializeFrom(XmlDictionaryReaderQuotas readerQuotas) { XmlDictionaryReaderQuotasElement thisQuotas = this.ReaderQuotas; thisQuotas.MaxDepth = readerQuotas.MaxDepth; thisQuotas.MaxStringContentLength = readerQuotas.MaxStringContentLength; thisQuotas.MaxArrayLength = readerQuotas.MaxArrayLength; thisQuotas.MaxBytesPerRead = readerQuotas.MaxBytesPerRead; thisQuotas.MaxNameTableCharCount = readerQuotas.MaxNameTableCharCount; } void CopyFrom(XmlDictionaryReaderQuotasElement readerQuotas) { XmlDictionaryReaderQuotasElement thisQuotas = this.ReaderQuotas; thisQuotas.MaxDepth = readerQuotas.MaxDepth; thisQuotas.MaxStringContentLength = readerQuotas.MaxStringContentLength; thisQuotas.MaxArrayLength = readerQuotas.MaxArrayLength; thisQuotas.MaxBytesPerRead = readerQuotas.MaxBytesPerRead; thisQuotas.MaxNameTableCharCount = readerQuotas.MaxNameTableCharCount; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClosableStream.cs
- UrlAuthFailureHandler.cs
- MonthCalendar.cs
- BorderSidesEditor.cs
- ECDsa.cs
- ButtonRenderer.cs
- QEncodedStream.cs
- KeyedCollection.cs
- KeyValueInternalCollection.cs
- AvTraceDetails.cs
- X509RawDataKeyIdentifierClause.cs
- XmlName.cs
- MemberAccessException.cs
- PrintController.cs
- WindowsScrollBar.cs
- TextPenaltyModule.cs
- TreeView.cs
- SHA1.cs
- ComplexPropertyEntry.cs
- DiscoveryEndpointValidator.cs
- BrowserCapabilitiesFactoryBase.cs
- HtmlShimManager.cs
- ActivityPreviewDesigner.cs
- PerformanceCounterNameAttribute.cs
- TextTreeInsertUndoUnit.cs
- SpecialTypeDataContract.cs
- RelatedImageListAttribute.cs
- ObjectCloneHelper.cs
- HtmlAnchor.cs
- RowToParametersTransformer.cs
- MulticastOption.cs
- Roles.cs
- KeyGestureValueSerializer.cs
- DataGridState.cs
- EntityClientCacheKey.cs
- StylusPointPropertyInfoDefaults.cs
- Filter.cs
- InvalidDocumentContentsException.cs
- CopyOfAction.cs
- WorkflowDurableInstance.cs
- EpmSourcePathSegment.cs
- Int64Converter.cs
- TabletDevice.cs
- BrowserDefinition.cs
- SqlTriggerContext.cs
- ToolboxBitmapAttribute.cs
- StaticSiteMapProvider.cs
- FocusTracker.cs
- NonParentingControl.cs
- CompiledXpathExpr.cs
- AppDomainEvidenceFactory.cs
- WhiteSpaceTrimStringConverter.cs
- FileFormatException.cs
- MailBnfHelper.cs
- ColumnCollection.cs
- COAUTHIDENTITY.cs
- DataServiceRequestOfT.cs
- AllMembershipCondition.cs
- _CommandStream.cs
- WorkflowServiceNamespace.cs
- ContainerAction.cs
- SecureUICommand.cs
- DelegatedStream.cs
- UserControlDocumentDesigner.cs
- ClassicBorderDecorator.cs
- AssemblyCache.cs
- WebPartConnectVerb.cs
- ClientRoleProvider.cs
- LogicalExpr.cs
- UnsettableComboBox.cs
- Control.cs
- SinglePhaseEnlistment.cs
- SByteStorage.cs
- LockedBorderGlyph.cs
- LinkedResource.cs
- XNodeSchemaApplier.cs
- SwitchAttribute.cs
- XmlEncoding.cs
- RouteParser.cs
- _ConnectOverlappedAsyncResult.cs
- TextTrailingWordEllipsis.cs
- XmlParserContext.cs
- infer.cs
- _SSPISessionCache.cs
- ModelPerspective.cs
- EnumerableRowCollectionExtensions.cs
- UrlMapping.cs
- EqualityComparer.cs
- TreeNodeClickEventArgs.cs
- WebServiceMethodData.cs
- Peer.cs
- SqlBulkCopyColumnMapping.cs
- InternalPolicyElement.cs
- BinaryReader.cs
- SendingRequestEventArgs.cs
- FactoryGenerator.cs
- UriExt.cs
- StylusOverProperty.cs
- JsonSerializer.cs
- SessionStateItemCollection.cs