HttpServerChannel.WantsToListen 屬性

定義

取得布林 (Boolean) 值,指出 IChannelReceiverHook 是否想要連結至外部接聽服務。

public:
 property bool WantsToListen { bool get(); void set(bool value); };
public bool WantsToListen { get; set; }
member this.WantsToListen : bool with get, set
Public Property WantsToListen As Boolean

屬性值

布林值,指出 IChannelReceiverHook 是否要連結至外部接聽服務。

範例

下列程式碼範例示範如何使用 WantsToListen 屬性。 此程式碼範例是針對 類別提供的較大範例的 HttpServerChannel 一部分。

// See if the channel wants to listen.
bool wantsToListen = serverChannel->WantsToListen;
Console::WriteLine( L"The value of WantsToListen is {0}.", wantsToListen );
// See if the channel wants to listen.
bool wantsToListen = serverChannel.WantsToListen;
Console.WriteLine(
    "The value of WantsToListen is {0}.",
    wantsToListen);

適用於