This documentation is archived and is not being maintained.

OneWayBindingElement Class

Enables packet routing and the use of one-way methods.


Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public sealed class OneWayBindingElement : BindingElement, 

The OneWayBindingElement type exposes the following members.

Public methodOneWayBindingElementInitializes a new instance of the OneWayBindingElement class.

Public propertyChannelPoolSettingsGets the channel pool settings.
Public propertyMaxAcceptedChannelsGets or sets the maximum number of channels that can be accepted.
Public propertyPacketRoutableGets or sets a value that indicates whether packet routing is enabled.

Public methodBuildChannelFactory<TChannel>Initializes a channel factory for producing one-way channels from the binding context. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public methodBuildChannelListener<TChannel>Initializes a channel listener for accepting one-way channels. (Overrides BindingElement.BuildChannelListener<TChannel>(BindingContext).)
Public methodCanBuildChannelFactory<TChannel>Gets a value that indicates whether a channel factory of the specified type can be built. (Overrides BindingElement.CanBuildChannelFactory<TChannel>(BindingContext).)
Public methodCanBuildChannelListener<TChannel>Gets a value that indicates whether a channel listener of the specified type can be built. (Overrides BindingElement.CanBuildChannelListener<TChannel>(BindingContext).)
Public methodCloneClones an instance of this class. (Overrides BindingElement.Clone().)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetProperty<T>Gets properties from the binding stack, if present. (Overrides BindingElement.GetProperty<T>(BindingContext).)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodShouldSerializeChannelPoolSettingsReturns whether the properties of the channel pool that are associated with this binding element should be serialized.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Explicit interface implemetationPrivate methodIPolicyExportExtension.ExportPolicyExports a custom policy assertion that represents the one-way binding element.

To enable packet routing a one-way conversion layer is required, which this class provides. This class is a binding in the stack of bindings that performs a message-level shape change called OneWayBindingElement. This shape change can take a IDuplexSessionChannel or a IRequestChannel and expose it as a IInputChannel, or conversely it can take a IDuplexSessionChannel or a IRequestChannel and expose it as a IOutputChannel. A user can create a custom binding that layers this binding over a session-aware or request-reply transport to make it packet routable.

This class is also useful when you want to expose one-way methods in a more native fashion. More transformations can be applied over this layer, such as Composite Duplex and Reliable Messaging.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.