IChannelReceiverHook Interfejs

Definicja

Wskazuje, że kanał implementujący chce podłączyć się do zewnętrznej usługi odbiornika.

C#
public interface IChannelReceiverHook
C#
[System.Runtime.InteropServices.ComVisible(true)]
public interface IChannelReceiverHook
Pochodne
Atrybuty

Przykłady

C#
// Implementation of 'IChannelReceiverHook' interface.
public class MyCustomChannel : IChannelReceiverHook
{
   private bool portSet;
   // Constructor for MyCustomChannel.
   public MyCustomChannel(int port)
   {
      portSet = true;
   }
   // Constructor for MyCustomChannel.
   public MyCustomChannel()
   {
      portSet = false;
   }
   public bool WantsToListen
   {
      get
      {
         if (portSet)
         {
            return false;
         }
         else
         {
            return true;
         }
      }
   }
   private string MyChannelScheme = "http";
   public string ChannelScheme
   {
      get
      {
         return MyChannelScheme;
      }
   }
   public IServerChannelSink ChannelSinkChain
   {
      get
      {
         // Null implementation.
         return null;
      }
   }
   public void AddHookChannelUri(string channelUri)
   {
      // Null implementation.
   }
}

Właściwości

ChannelScheme

Pobiera typ odbiornika do zaczepienia.

ChannelSinkChain

Pobiera łańcuch ujścia kanału używany przez bieżący kanał.

WantsToListen

Pobiera wartość logiczną wskazującą, czy IChannelReceiverHook należy podłączyć się do zewnętrznej usługi odbiornika.

Metody

AddHookChannelUri(String)

Dodaje identyfikator URI, na którym będzie nasłuchiwany punkt zaczepienia kanału.

Dotyczy

Produkt Wersje
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1