OneWayBindingElement 類別

定義

啟用封包路由和使用單向方法。Enables packet routing and the use of one-way methods.

public ref class OneWayBindingElement sealed : System::ServiceModel::Channels::BindingElement, System::ServiceModel::Description::IPolicyExportExtension
public sealed class OneWayBindingElement : System.ServiceModel.Channels.BindingElement, System.ServiceModel.Description.IPolicyExportExtension
type OneWayBindingElement = class
    inherit BindingElement
    interface IPolicyExportExtension
Public NotInheritable Class OneWayBindingElement
Inherits BindingElement
Implements IPolicyExportExtension
繼承
OneWayBindingElement
實作

備註

若要啟用封包路由,則需要一個單向轉換層,此類別提供此階層。To enable packet routing a one-way conversion layer is required, which this class provides. 這個類別是繫結堆疊中的繫結,它會執行稱為 OneWayBindingElement 的訊息層級形狀變更。This class is a binding in the stack of bindings that performs a message-level shape change called OneWayBindingElement. 這個形狀變更可以接受 IDuplexSessionChannelIRequestChannel,並將它公開為 IInputChannel;或是相反地接受 IDuplexSessionChannelIRequestChannel,並將它公開為 IOutputChannelThis 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.

建構函式

OneWayBindingElement()

初始化 OneWayBindingElement 類別的新執行個體。Initializes a new instance of the OneWayBindingElement class.

屬性

ChannelPoolSettings

取得通道集區設定。Gets the channel pool settings.

MaxAcceptedChannels

取得或設定可以接受的通道數目上限。Gets or sets the maximum number of channels that can be accepted.

PacketRoutable

取得或設定值,指出是否啟用封包路由。Gets or sets a value that indicates whether packet routing is enabled.

方法

BuildChannelFactory<TChannel>(BindingContext)

初始化通道處理站,以便從繫結內容產生單向通道。Initializes a channel factory for producing one-way channels from the binding context.

BuildChannelListener<TChannel>(BindingContext)

將通道接聽程式初始化成接受單向通道。Initializes a channel listener for accepting one-way channels.

CanBuildChannelFactory<TChannel>(BindingContext)

取得值,這個值會指出是否能建置指定型別的通道處理站。Gets a value that indicates whether a channel factory of the specified type can be built.

CanBuildChannelListener<TChannel>(BindingContext)

取得值,這個值會指出是否能建置指定型別的通道接聽程式。Gets a value that indicates whether a channel listener of the specified type can be built.

Clone()

複製這個類別的執行個體。Clones an instance of this class.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetProperty<T>(BindingContext)

從繫結堆疊取得屬性,如果有的話。Gets properties from the binding stack, if present.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ShouldSerializeChannelPoolSettings()

傳回與這個繫結項目相關聯之通道集區的屬性是否應序列化。Returns whether the properties of the channel pool that are associated with this binding element should be serialized.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext)

匯出可表示單向繫結項目的自訂原則判斷提示。Exports a custom policy assertion that represents the one-way binding element.

適用於