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 IChannelFactory InternalBuildChannelFactory(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
- WebBrowserNavigatedEventHandler.cs
- ObjectCloneHelper.cs
- ToolStripItemRenderEventArgs.cs
- WindowsEditBox.cs
- FixedDocument.cs
- XmlSchemaProviderAttribute.cs
- MappingMetadataHelper.cs
- VisualBasicExpressionConverter.cs
- DocumentViewerConstants.cs
- SQLInt16.cs
- Imaging.cs
- Scene3D.cs
- TypeConstant.cs
- Context.cs
- httpstaticobjectscollection.cs
- SQLStringStorage.cs
- DbProviderFactory.cs
- CollectionConverter.cs
- MimeTypeMapper.cs
- ISCIIEncoding.cs
- XmlDataSourceView.cs
- XmlStringTable.cs
- ListView.cs
- QuadraticBezierSegment.cs
- MessagePartDescription.cs
- PersonalizablePropertyEntry.cs
- BidPrivateBase.cs
- LongMinMaxAggregationOperator.cs
- WindowsListViewItemStartMenu.cs
- GenericQueueSurrogate.cs
- DebugView.cs
- IPAddress.cs
- ProtectedProviderSettings.cs
- IndexedString.cs
- StringDictionaryWithComparer.cs
- Timeline.cs
- ContextInformation.cs
- XmlSerializationReader.cs
- ToolStripContentPanelRenderEventArgs.cs
- XmlAttribute.cs
- DataPagerField.cs
- ResourceProperty.cs
- SynchronizedKeyedCollection.cs
- ApplicationServiceManager.cs
- BaseInfoTable.cs
- Enum.cs
- TextLine.cs
- ProxyWebPart.cs
- PointValueSerializer.cs
- ProtocolsConfiguration.cs
- InteropEnvironment.cs
- Query.cs
- RuleSetDialog.Designer.cs
- ServiceOperationParameter.cs
- EnvelopedPkcs7.cs
- ColorDialog.cs
- DefaultAsyncDataDispatcher.cs
- TextTreeTextNode.cs
- Point4D.cs
- localization.cs
- WCFModelStrings.Designer.cs
- SimpleWebHandlerParser.cs
- AdPostCacheSubstitution.cs
- StringConverter.cs
- Atom10FormatterFactory.cs
- ProjectionCamera.cs
- UIElement3DAutomationPeer.cs
- IISUnsafeMethods.cs
- Column.cs
- SqlDataAdapter.cs
- TemplateNameScope.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- UpdateCompiler.cs
- DataGridCellItemAutomationPeer.cs
- OleDbErrorCollection.cs
- ByteAnimationBase.cs
- XmlNodeReader.cs
- AstNode.cs
- Lease.cs
- WindowsListViewItem.cs
- DynamicEndpointElement.cs
- DataRecordInternal.cs
- DocumentViewerBaseAutomationPeer.cs
- FixedBufferAttribute.cs
- WebPartManagerInternals.cs
- XmlSchemaElement.cs
- TextTreeNode.cs
- ListParagraph.cs
- TransactionTraceIdentifier.cs
- ChangeProcessor.cs
- CommonRemoteMemoryBlock.cs
- Calendar.cs
- Pair.cs
- ScriptMethodAttribute.cs
- BulletDecorator.cs
- UidManager.cs
- RenderData.cs
- TrueReadOnlyCollection.cs
- Baml2006ReaderContext.cs
- WebColorConverter.cs