Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / MessageEncodingBindingElement.cs / 1 / MessageEncodingBindingElement.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel.Description; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Diagnostics; using System.Xml; public abstract class MessageEncodingBindingElement : BindingElement { protected MessageEncodingBindingElement() { } protected MessageEncodingBindingElement(MessageEncodingBindingElement elementToBeCloned) : base(elementToBeCloned) { } public abstract MessageVersion MessageVersion { get; set; } internal IChannelFactoryInternalBuildChannelFactory (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.BuildInnerChannelFactory (); } internal bool InternalCanBuildChannelFactory (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.CanBuildInnerChannelFactory (); } internal IChannelListener InternalBuildChannelListener (BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.BuildInnerChannelListener (); } internal bool InternalCanBuildChannelListener (BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.CanBuildInnerChannelListener (); } public abstract MessageEncoderFactory CreateMessageEncoderFactory(); public override T GetProperty (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } if (typeof(T) == typeof(MessageVersion)) { return (T)(object)this.MessageVersion; } else { return context.GetInnerProperty (); } } internal virtual bool CheckEncodingVersion(EnvelopeVersion version) { return false; } internal override bool IsMatch(BindingElement b) { if (b == null) return false; MessageEncodingBindingElement encoding = b as MessageEncodingBindingElement; if (encoding == null) return false; return true; } } } // 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
- PriorityBindingExpression.cs
- BooleanFunctions.cs
- FixedDocument.cs
- TreeNodeClickEventArgs.cs
- basenumberconverter.cs
- ExpressionStringBuilder.cs
- ByteAnimationBase.cs
- SessionStateContainer.cs
- MemoryFailPoint.cs
- BitmapEffectDrawingContent.cs
- WmlLiteralTextAdapter.cs
- RTLAwareMessageBox.cs
- TemplateInstanceAttribute.cs
- UserControlParser.cs
- IPEndPointCollection.cs
- SocketAddress.cs
- ListItem.cs
- HostProtectionPermission.cs
- XmlQueryTypeFactory.cs
- TransformGroup.cs
- TextClipboardData.cs
- SessionState.cs
- SafeTokenHandle.cs
- SqlRemoveConstantOrderBy.cs
- StandardCommands.cs
- WebControlAdapter.cs
- basenumberconverter.cs
- ExpressionConverter.cs
- Compiler.cs
- LabelLiteral.cs
- BuildResult.cs
- UncommonField.cs
- ZipPackage.cs
- SqlTransaction.cs
- OdbcConnectionStringbuilder.cs
- TextSpan.cs
- ResourceWriter.cs
- TraceContext.cs
- UITypeEditors.cs
- RewritingPass.cs
- SessionEndingEventArgs.cs
- HttpValueCollection.cs
- PeerSecurityHelpers.cs
- PrimitiveType.cs
- FlowchartStart.xaml.cs
- DesignerMetadata.cs
- CalendarItem.cs
- RootProfilePropertySettingsCollection.cs
- LexicalChunk.cs
- TextDecorationCollection.cs
- TransportReplyChannelAcceptor.cs
- PresentationSource.cs
- SqlDataSourceWizardForm.cs
- ComponentRenameEvent.cs
- CompositeActivityDesigner.cs
- DesignerTransactionCloseEvent.cs
- WebBrowserNavigatedEventHandler.cs
- TableLayoutStyleCollection.cs
- DbQueryCommandTree.cs
- ObjectItemCollection.cs
- VirtualizingPanel.cs
- TextEditorSelection.cs
- XmlArrayItemAttribute.cs
- DataProtection.cs
- HttpHeaderCollection.cs
- SecurityException.cs
- LocalTransaction.cs
- SpinWait.cs
- IntegerFacetDescriptionElement.cs
- XsdDuration.cs
- GlobalEventManager.cs
- DecimalAnimation.cs
- UserControlParser.cs
- XmlSchemaProviderAttribute.cs
- StylusPointProperties.cs
- ProxyWebPartConnectionCollection.cs
- QilInvokeLateBound.cs
- safemediahandle.cs
- SettingsPropertyIsReadOnlyException.cs
- InstanceCompleteException.cs
- CipherData.cs
- odbcmetadatafactory.cs
- DelayedRegex.cs
- ThreadAbortException.cs
- XmlAutoDetectWriter.cs
- ManagementPath.cs
- GridViewPageEventArgs.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- InstancePersistenceCommand.cs
- CloseCryptoHandleRequest.cs
- CacheChildrenQuery.cs
- SystemGatewayIPAddressInformation.cs
- OracleCommandSet.cs
- FileDialogCustomPlacesCollection.cs
- Guid.cs
- SweepDirectionValidation.cs
- XmlIlTypeHelper.cs
- BrowserCapabilitiesFactory.cs
- FaultDesigner.cs
- RowTypePropertyElement.cs