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
- PolicyLevel.cs
- SafeCryptoHandles.cs
- ErrorWebPart.cs
- CodeTypeReferenceCollection.cs
- DecimalAnimation.cs
- TimerElapsedEvenArgs.cs
- OleDbPropertySetGuid.cs
- OdbcConnectionFactory.cs
- DiagnosticsConfiguration.cs
- StringComparer.cs
- PageBuildProvider.cs
- ContentWrapperAttribute.cs
- Hyperlink.cs
- VerticalAlignConverter.cs
- UnsafeNativeMethodsMilCoreApi.cs
- BufferBuilder.cs
- TimeSpan.cs
- QueryAccessibilityHelpEvent.cs
- OutputCacheModule.cs
- SspiSafeHandles.cs
- LicenseException.cs
- DataGridViewCellEventArgs.cs
- SubclassTypeValidatorAttribute.cs
- BrowserCapabilitiesFactory.cs
- ExtendedProperty.cs
- CommandPlan.cs
- ProxyWebPartConnectionCollection.cs
- IdleTimeoutMonitor.cs
- TypeInitializationException.cs
- ChildTable.cs
- TPLETWProvider.cs
- DictionaryMarkupSerializer.cs
- SByte.cs
- Margins.cs
- WorkflowDefinitionDispenser.cs
- CrossContextChannel.cs
- KeyValueSerializer.cs
- RelationalExpressions.cs
- StandardBindingImporter.cs
- ServiceOperationParameter.cs
- StackSpiller.Generated.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ArraySubsetEnumerator.cs
- BaseServiceProvider.cs
- ParseElementCollection.cs
- DesigntimeLicenseContextSerializer.cs
- HandlerWithFactory.cs
- UnaryExpression.cs
- DesignerOptions.cs
- RequestCachePolicyConverter.cs
- MergeFailedEvent.cs
- ProxyWebPart.cs
- dbenumerator.cs
- ChannelCacheSettings.cs
- XmlnsCompatibleWithAttribute.cs
- ArrayConverter.cs
- FixedSOMTableCell.cs
- RootAction.cs
- ToolStripLocationCancelEventArgs.cs
- X509ServiceCertificateAuthenticationElement.cs
- OdbcStatementHandle.cs
- BindingsCollection.cs
- CommonRemoteMemoryBlock.cs
- PlatformNotSupportedException.cs
- SafeThreadHandle.cs
- XmlPropertyBag.cs
- HelpExampleGenerator.cs
- BufferBuilder.cs
- SqlColumnizer.cs
- TypeBuilderInstantiation.cs
- SessionParameter.cs
- ScriptBehaviorDescriptor.cs
- CustomMenuItemCollection.cs
- SendingRequestEventArgs.cs
- DataSourceExpression.cs
- Environment.cs
- NavigationWindowAutomationPeer.cs
- DynamicILGenerator.cs
- BufferBuilder.cs
- UnitySerializationHolder.cs
- DispatcherProcessingDisabled.cs
- XmlDataCollection.cs
- COSERVERINFO.cs
- ObjectDataSourceView.cs
- TypeDescriptorFilterService.cs
- LogicalExpr.cs
- EntityExpressionVisitor.cs
- ActiveXSite.cs
- ContainerVisual.cs
- XmlnsDefinitionAttribute.cs
- SelectionItemPattern.cs
- ObjectStateManagerMetadata.cs
- ExtentCqlBlock.cs
- FormViewInsertEventArgs.cs
- AssemblyInfo.cs
- InteropBitmapSource.cs
- TrustLevel.cs
- PropertyPath.cs
- FileChangesMonitor.cs
- StyleSheetComponentEditor.cs