IChannelReceiverHookとは? わかりやすく解説

IChannelReceiverHook インターフェイス

該当インターフェイス実装しているチャネル外部リスナ サービスフックする必要があることを示します

名前空間: System.Runtime.Remoting.Channels
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public Interface IChannelReceiverHook
Dim instance As IChannelReceiverHook
[ComVisibleAttribute(true)] 
public interface IChannelReceiverHook
[ComVisibleAttribute(true)] 
public interface class IChannelReceiverHook
/** @attribute ComVisibleAttribute(true) */ 
public interface IChannelReceiverHook
ComVisibleAttribute(true) 
public interface IChannelReceiverHook
使用例使用例
' Implementation of 'IChannelReceiverHook' interface.
<PermissionSet(SecurityAction.Demand, Name:="FullTrust")>
 _
Public Class MyCustomChannel
   Implements IChannelReceiverHook 
   Private portSet As Boolean

   ' Constructor for MyCustomChannel.
   Public Sub New(ByVal
 port As Integer)
      portSet = True
   End Sub 'New

   ' Constructor for MyCustomChannel.
   Public Sub New()
      portSet = False
   End Sub 'New

   Public ReadOnly Property
 WantsToListen() As Boolean Implements
 IChannelReceiverHook.WantsToListen
      Get
         If portSet Then
            Return False
         Else
            Return True
         End If
      End Get
   End Property

   Private MyChannelScheme As String
 = "http"

   Public ReadOnly Property
 ChannelScheme() As String Implements
 IChannelReceiverHook.ChannelScheme
      Get
         Return MyChannelScheme
      End Get
   End Property

   Public ReadOnly Property
 ChannelSinkChain() As IServerChannelSink _
                                       Implements IChannelReceiverHook.ChannelSinkChain
      Get
         ' Null implementation.
         Return Nothing
      End Get
   End Property

   Public Sub AddHookChannelUri(ByVal
 channelUri As String) _
                                          Implements IChannelReceiverHook.AddHookChannelUri
      ' Null implementation.
   End Sub 'AddHookChannelUri
End Class 'MyCustomChannel 
// Implementation of 'IChannelReceiverHook' interface.
[PermissionSet(SecurityAction.Demand, Name="FullTrust")]
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.
   }
}
// Implementation of 'IChannelReceiverHook' interface.
public ref class MyCustomChannel: public
 IChannelReceiverHook
{
private:
   bool portSet;

public:
   // Constructor for MyCustomChannel.
   MyCustomChannel( int /*port*/ )
   {
      MyChannelScheme = "http";
      portSet = true;
   }

   // Constructor for MyCustomChannel.
   MyCustomChannel()
   {
      MyChannelScheme = "http";
      portSet = false;
   }

   property bool WantsToListen 
   {
      [System::Security::Permissions::SecurityPermissionAttribute
      (System::Security::Permissions::SecurityAction::LinkDemand,
      Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)]
      virtual bool get()
      {
         if ( portSet )
         {
            return false;
         }
         else
         {
            return true;
         }
      }
   }

private:
   String^ MyChannelScheme;

public:
   property String^ ChannelScheme 
   {
      [System::Security::Permissions::SecurityPermissionAttribute
      (System::Security::Permissions::SecurityAction::LinkDemand,
      Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)]
      virtual String^ get()
      {
         return MyChannelScheme;
      }
   }

   property IServerChannelSink^ ChannelSinkChain 
   {
      [System::Security::Permissions::SecurityPermissionAttribute
      (System::Security::Permissions::SecurityAction::LinkDemand,
      Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)]
      virtual IServerChannelSink^ get()
      {
         
         // Null implementation.
         return nullptr;
      }
   }

   [System::Security::Permissions::SecurityPermissionAttribute
   (System::Security::Permissions::SecurityAction::LinkDemand,
   Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)]
   virtual void AddHookChannelUri( String^ /*channelUri*/ )
   {
      // Null implementation.
   }
};
// Implementation of 'IChannelReceiverHook' interface.
/** @attribute SecurityPermission(SecurityAction.Demand,
                    Flags = SecurityPermissionFlag.Infrastructure)
 */
/** @attribute SecurityPermission(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.Infrastructure)
 */
public class MyCustomChannel implements IChannelReceiverHook
{
    private boolean portSet;

    // Constructor for MyCustomChannel.
    public MyCustomChannel(int port) 
    {
        portSet = true;
    } //MyCustomChannel

    // Constructor for MyCustomChannel.
    public MyCustomChannel()
    {
        portSet = false;
    } //MyCustomChannel

    /** @property 
     */
    public boolean get_WantsToListen()
    {
        if (portSet) {
            return false;
        }
        else {
            return true;
        }
    } //get_WantsToListen

    private String myChannelScheme = "http";

    /** @property 
     */
    public String get_ChannelScheme()
    {
        return myChannelScheme;
    } //get_ChannelScheme

    /** @property 
     */
    public IServerChannelSink get_ChannelSinkChain()
    {
        // Null implementation.
        return null;
    } //get_ChannelSinkChain

    public void AddHookChannelUri(String channelUri)
    {
        // Null implementation.
    } //AddHookChannelUri
} //MyCustomChannel 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IChannelReceiverHook メンバ
System.Runtime.Remoting.Channels 名前空間

IChannelReceiverHook プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ ChannelScheme フックするリスナ種類取得します
パブリック プロパティ ChannelSinkChain 現在のチャネル使用しているチャネル シンク チェイン取得します
パブリック プロパティ WantsToListen IChannelReceiverHook を外部リスナ サービスフックする必要があるかどうかを示す Boolean 値を取得します
参照参照

関連項目

IChannelReceiverHook インターフェイス
System.Runtime.Remoting.Channels 名前空間

IChannelReceiverHook メソッド


パブリック メソッドパブリック メソッド

  名前 説明
パブリック メソッド AddHookChannelUri チャネル フック待機する URI追加します
参照参照

関連項目

IChannelReceiverHook インターフェイス
System.Runtime.Remoting.Channels 名前空間

IChannelReceiverHook メンバ



このページでは「.NET Framework クラス ライブラリ リファレンス」からIChannelReceiverHookを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIChannelReceiverHookを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIChannelReceiverHook を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IChannelReceiverHook」の関連用語

IChannelReceiverHookのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IChannelReceiverHookのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS