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
- TypePresenter.xaml.cs
- UseLicense.cs
- WebConfigurationHost.cs
- DetailsViewPageEventArgs.cs
- XmlSerializerNamespaces.cs
- BufferedStream.cs
- CallbackValidatorAttribute.cs
- CodeCommentStatement.cs
- SubclassTypeValidator.cs
- StringResourceManager.cs
- Graphics.cs
- CngKey.cs
- SizeChangedInfo.cs
- FontStretch.cs
- X509Certificate2Collection.cs
- Paragraph.cs
- SqlBulkCopyColumnMapping.cs
- sqlnorm.cs
- ServiceAuthorizationManager.cs
- EncodingTable.cs
- ComponentCollection.cs
- EndpointFilterProvider.cs
- DbConnectionFactory.cs
- TokenBasedSetEnumerator.cs
- OfTypeExpression.cs
- BeginSelectCardRequest.cs
- OperationSelectorBehavior.cs
- Rule.cs
- WithParamAction.cs
- CultureTable.cs
- MsmqReceiveHelper.cs
- MimeTypePropertyAttribute.cs
- assertwrapper.cs
- SyntaxCheck.cs
- UnhandledExceptionEventArgs.cs
- ComponentDispatcher.cs
- ObjectReaderCompiler.cs
- Range.cs
- AppDomainShutdownMonitor.cs
- RepeaterDesigner.cs
- Route.cs
- DrawingContextWalker.cs
- BlockingCollection.cs
- InfocardClientCredentials.cs
- ArrayHelper.cs
- DataGridColumnCollection.cs
- SqlSupersetValidator.cs
- HttpCacheVaryByContentEncodings.cs
- ResetableIterator.cs
- EventPropertyMap.cs
- Frame.cs
- EntityRecordInfo.cs
- MergablePropertyAttribute.cs
- ConstraintConverter.cs
- SBCSCodePageEncoding.cs
- OneWayBindingElement.cs
- TextElement.cs
- ResourceDictionary.cs
- FtpWebResponse.cs
- ToolStripPanelRenderEventArgs.cs
- ResolveCriteriaApril2005.cs
- DoubleAnimationClockResource.cs
- LoadRetryAsyncResult.cs
- ConsumerConnectionPointCollection.cs
- DocumentXmlWriter.cs
- UnsafeNativeMethodsCLR.cs
- XmlDeclaration.cs
- AttachmentCollection.cs
- DesignerSerializerAttribute.cs
- FixedSOMContainer.cs
- precedingsibling.cs
- ScriptServiceAttribute.cs
- MailMessageEventArgs.cs
- OutputCacheSettingsSection.cs
- AssociationTypeEmitter.cs
- DataGridViewRowHeaderCell.cs
- DataGridViewIntLinkedList.cs
- ResourcePermissionBase.cs
- UnrecognizedPolicyAssertionElement.cs
- XPathDocumentBuilder.cs
- ToolTipService.cs
- ViewManager.cs
- EncryptedKey.cs
- DbConnectionPoolOptions.cs
- PermissionListSet.cs
- RelOps.cs
- MobileControlBuilder.cs
- LoginName.cs
- ConfigurationValidatorAttribute.cs
- SecUtil.cs
- PersonalizableTypeEntry.cs
- MessageContractImporter.cs
- GeometryModel3D.cs
- ClientTargetSection.cs
- WebMessageEncodingElement.cs
- FormClosingEvent.cs
- _SslState.cs
- InplaceBitmapMetadataWriter.cs
- WSSecurityTokenSerializer.cs
- PrePostDescendentsWalker.cs