Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / XmlDictionaryReaderQuotasElement.cs / 1 / XmlDictionaryReaderQuotasElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.Globalization; using System.Net; using System.Xml; using System.ServiceModel; using System.ComponentModel; public sealed partial class XmlDictionaryReaderQuotasElement : ConfigurationElement { // for all properties, a value of 0 means "just use the default" [ConfigurationProperty(ConfigurationStrings.MaxDepth, DefaultValue = 0)] [IntegerValidator(MinValue = 0)] public int MaxDepth { get { return (int)base[ConfigurationStrings.MaxDepth]; } set { base[ConfigurationStrings.MaxDepth] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxStringContentLength, DefaultValue = 0)] [IntegerValidator(MinValue = 0)] public int MaxStringContentLength { get { return (int)base[ConfigurationStrings.MaxStringContentLength]; } set { base[ConfigurationStrings.MaxStringContentLength] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxArrayLength, DefaultValue = 0)] [IntegerValidator(MinValue = 0)] public int MaxArrayLength { get { return (int)base[ConfigurationStrings.MaxArrayLength]; } set { base[ConfigurationStrings.MaxArrayLength] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxBytesPerRead, DefaultValue = 0)] [IntegerValidator(MinValue = 0)] public int MaxBytesPerRead { get { return (int)base[ConfigurationStrings.MaxBytesPerRead]; } set { base[ConfigurationStrings.MaxBytesPerRead] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxNameTableCharCount, DefaultValue = 0)] [IntegerValidator(MinValue = 0)] public int MaxNameTableCharCount { get { return (int)base[ConfigurationStrings.MaxNameTableCharCount]; } set { base[ConfigurationStrings.MaxNameTableCharCount] = value; } } internal void ApplyConfiguration(XmlDictionaryReaderQuotas readerQuotas) { if (readerQuotas == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerQuotas"); } if (this.MaxDepth != 0) { readerQuotas.MaxDepth = this.MaxDepth; } if (this.MaxStringContentLength != 0) { readerQuotas.MaxStringContentLength = this.MaxStringContentLength; } if (this.MaxArrayLength != 0) { readerQuotas.MaxArrayLength = this.MaxArrayLength; } if (this.MaxBytesPerRead != 0) { readerQuotas.MaxBytesPerRead = this.MaxBytesPerRead; } if (this.MaxNameTableCharCount != 0) { readerQuotas.MaxNameTableCharCount = this.MaxNameTableCharCount; } } internal void InitializeFrom(XmlDictionaryReaderQuotas readerQuotas) { if (readerQuotas == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerQuotas"); } this.MaxDepth = readerQuotas.MaxDepth; this.MaxStringContentLength = readerQuotas.MaxStringContentLength; this.MaxArrayLength = readerQuotas.MaxArrayLength; this.MaxBytesPerRead = readerQuotas.MaxBytesPerRead; this.MaxNameTableCharCount = readerQuotas.MaxNameTableCharCount; } } } // 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
- ReadWriteSpinLock.cs
- TraceLevelStore.cs
- AppSettingsSection.cs
- ProcessHostConfigUtils.cs
- BitmapEffectDrawingContextWalker.cs
- PackageFilter.cs
- SizeF.cs
- WebScriptMetadataMessage.cs
- Wildcard.cs
- NestPullup.cs
- BrowserCapabilitiesFactory.cs
- PaintValueEventArgs.cs
- EventLevel.cs
- CreateParams.cs
- TextEditorMouse.cs
- ErrorFormatterPage.cs
- _AutoWebProxyScriptWrapper.cs
- HMACMD5.cs
- XsltCompileContext.cs
- AutomationElementCollection.cs
- LinkLabelLinkClickedEvent.cs
- WindowsListViewGroupHelper.cs
- fixedPageContentExtractor.cs
- ObjectDataSourceMethodEventArgs.cs
- DefaultSettingsSection.cs
- DockPanel.cs
- DocumentXmlWriter.cs
- EdmComplexPropertyAttribute.cs
- SQLInt32Storage.cs
- ZipIOCentralDirectoryFileHeader.cs
- ClaimTypes.cs
- PasswordTextContainer.cs
- XmlBinaryWriter.cs
- ArrayListCollectionBase.cs
- MD5.cs
- HttpRuntime.cs
- Pts.cs
- JavascriptCallbackMessageInspector.cs
- CompositeActivityValidator.cs
- TagNameToTypeMapper.cs
- _SSPIWrapper.cs
- RectAnimationClockResource.cs
- FontClient.cs
- FramingEncoders.cs
- ZipArchive.cs
- ParameterCollectionEditorForm.cs
- PenThreadPool.cs
- AspNetCacheProfileAttribute.cs
- PartitionResolver.cs
- LookupBindingPropertiesAttribute.cs
- CompositeFontFamily.cs
- XmlSerializer.cs
- DataMisalignedException.cs
- ErrorFormatterPage.cs
- ClientBuildManagerCallback.cs
- TreeNodeMouseHoverEvent.cs
- RawMouseInputReport.cs
- IndexedWhereQueryOperator.cs
- PackageStore.cs
- ThemeDictionaryExtension.cs
- XmlDataSourceView.cs
- SafeViewOfFileHandle.cs
- BufferBuilder.cs
- SoapIncludeAttribute.cs
- MetadataPropertyvalue.cs
- XsltFunctions.cs
- InputLanguageProfileNotifySink.cs
- HttpListener.cs
- RawStylusSystemGestureInputReport.cs
- ResourceReferenceExpressionConverter.cs
- ModelTreeEnumerator.cs
- SoapInteropTypes.cs
- MarkupProperty.cs
- GlobalItem.cs
- DbBuffer.cs
- OdbcEnvironment.cs
- PolyLineSegment.cs
- Animatable.cs
- DbConnectionFactory.cs
- TypeGeneratedEventArgs.cs
- FrameSecurityDescriptor.cs
- ObjectListItem.cs
- WeakReferenceKey.cs
- XmlReaderSettings.cs
- SoapHttpTransportImporter.cs
- CompleteWizardStep.cs
- MenuItem.cs
- BaseCAMarshaler.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- CatalogPartChrome.cs
- DisableDpiAwarenessAttribute.cs
- EditorAttribute.cs
- MoveSizeWinEventHandler.cs
- XamlSerializerUtil.cs
- StorageInfo.cs
- SizeChangedEventArgs.cs
- RowCache.cs
- GridViewColumn.cs
- Setter.cs
- PageEventArgs.cs