Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Channels / WebScriptMetadataMessageEncodingBindingElement.cs / 1 / WebScriptMetadataMessageEncodingBindingElement.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.ServiceModel; using System.Text; using System.Xml; sealed class WebScriptMetadataMessageEncodingBindingElement : MessageEncodingBindingElement { XmlDictionaryReaderQuotas readerQuotas; public WebScriptMetadataMessageEncodingBindingElement() { this.readerQuotas = new XmlDictionaryReaderQuotas(); EncoderDefaults.ReaderQuotas.CopyTo(this.readerQuotas); } WebScriptMetadataMessageEncodingBindingElement(WebScriptMetadataMessageEncodingBindingElement elementToBeCloned) : base(elementToBeCloned) { this.readerQuotas = new XmlDictionaryReaderQuotas(); elementToBeCloned.readerQuotas.CopyTo(this.readerQuotas); } public override MessageVersion MessageVersion { get { return MessageVersion.None; } set { if (value == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); } if (value != MessageVersion.None) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("value", SR2.GetString(SR2.JsonOnlySupportsMessageVersionNone)); } } } public XmlDictionaryReaderQuotas ReaderQuotas { get { return this.readerQuotas; } } public override IChannelFactoryBuildChannelFactory (BindingContext context) { return InternalBuildChannelFactory (context); } public override IChannelListener BuildChannelListener (BindingContext context) { return InternalBuildChannelListener (context); } public override bool CanBuildChannelFactory (BindingContext context) { return InternalCanBuildChannelFactory (context); } public override bool CanBuildChannelListener (BindingContext context) { return InternalCanBuildChannelListener (context); } public override BindingElement Clone() { return new WebScriptMetadataMessageEncodingBindingElement(this); } public override MessageEncoderFactory CreateMessageEncoderFactory() { return new WebScriptMetadataMessageEncoderFactory(this.ReaderQuotas); } public override T GetProperty (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } if (typeof(T) == typeof(XmlDictionaryReaderQuotas)) { return (T)(object) this.readerQuotas; } else { return base.GetProperty (context); } } } } // 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
- DeferredRunTextReference.cs
- NativeMethods.cs
- HtmlInputSubmit.cs
- ValueOfAction.cs
- FileSystemEventArgs.cs
- CounterSampleCalculator.cs
- TraceListeners.cs
- MemoryFailPoint.cs
- RuntimeHandles.cs
- CoreSwitches.cs
- DataColumnChangeEvent.cs
- ToggleButton.cs
- ExpressionBinding.cs
- DynamicDataRoute.cs
- DispatcherTimer.cs
- BypassElementCollection.cs
- ApplicationHost.cs
- TableRow.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- BaseParaClient.cs
- MapPathBasedVirtualPathProvider.cs
- HandleExceptionArgs.cs
- RenderOptions.cs
- HttpModuleActionCollection.cs
- XmlSchemaExternal.cs
- ProxyFragment.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- HttpRequest.cs
- safesecurityhelperavalon.cs
- StaticExtension.cs
- DrawingContextDrawingContextWalker.cs
- FontInfo.cs
- FreezableOperations.cs
- MetabaseSettingsIis7.cs
- EmptyCollection.cs
- XsltContext.cs
- KeyGestureValueSerializer.cs
- EndGetFileNameFromUserRequest.cs
- HitTestResult.cs
- CompositeClientFormatter.cs
- CreatingCookieEventArgs.cs
- ThreadStateException.cs
- SchemaElementDecl.cs
- LinqDataSourceUpdateEventArgs.cs
- SafeFileHandle.cs
- HtmlToClrEventProxy.cs
- ServiceHttpHandlerFactory.cs
- XmlText.cs
- StaticFileHandler.cs
- RuleValidation.cs
- WebReferencesBuildProvider.cs
- MobileResource.cs
- TextTreeDeleteContentUndoUnit.cs
- DataServiceQueryProvider.cs
- PKCS1MaskGenerationMethod.cs
- XmlSchemaGroup.cs
- Bold.cs
- DbConnectionPoolOptions.cs
- PointHitTestResult.cs
- BuildProviderCollection.cs
- CompilerGlobalScopeAttribute.cs
- QilPatternVisitor.cs
- ExpressionBuilder.cs
- DBCSCodePageEncoding.cs
- MembershipUser.cs
- CompositeDataBoundControl.cs
- GeneralTransform.cs
- ProtocolImporter.cs
- processwaithandle.cs
- WizardStepBase.cs
- Cursor.cs
- LinqToSqlWrapper.cs
- DataGridLinkButton.cs
- DataServiceOperationContext.cs
- MouseGestureConverter.cs
- Part.cs
- DetailsViewActionList.cs
- Dispatcher.cs
- Byte.cs
- HitTestDrawingContextWalker.cs
- BaseParser.cs
- Drawing.cs
- WebPartConnectionsDisconnectVerb.cs
- CssTextWriter.cs
- FixedSOMElement.cs
- __ComObject.cs
- Config.cs
- DeploymentSection.cs
- MDIClient.cs
- UriSectionReader.cs
- PeerNearMe.cs
- HwndProxyElementProvider.cs
- GestureRecognitionResult.cs
- CompositeDataBoundControl.cs
- RowUpdatedEventArgs.cs
- CqlIdentifiers.cs
- DataControlFieldCollection.cs
- CodePageUtils.cs
- ArraySubsetEnumerator.cs
- _UriSyntax.cs