IChannelReceiverHook.AddHookChannelUri メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IChannelReceiverHook.AddHookChannelUri メソッドの意味・解説 

IChannelReceiverHook.AddHookChannelUri メソッド

チャネル フック待機する URI追加します

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

Sub AddHookChannelUri ( _
    channelUri As String _
)
Dim instance As IChannelReceiverHook
Dim channelUri As String

instance.AddHookChannelUri(channelUri)
void AddHookChannelUri (
    string channelUri
)
void AddHookChannelUri (
    String^ channelUri
)
void AddHookChannelUri (
    String channelUri
)
function AddHookChannelUri (
    channelUri : String
)

パラメータ

channelUri

チャネル フック待機する URI

例外例外
解説解説
使用例使用例
Class CustomChannel
   Inherits BaseChannelWithProperties
   Implements IChannelReceiverHook, IChannelReceiver, IChannel,
 IChannelSender

   Public Sub AddHookChannelUri(ByVal
 channelUri As String) _
                        Implements IChannelReceiverHook.AddHookChannelUri

      If Not (channelUri Is
 Nothing) Then
         Dim uris As String()
 = dataStore.ChannelUris

         ' This implementation only allows one URI to be hooked in.
         If uris Is Nothing
 Then
            Dim newUris(1) As String
            newUris(0) = channelUri
            dataStore.ChannelUris = newUris
            wantsListen = False
         Else
            Dim msg As String
            msg = "This channel is already listening for data,
 and " + _
                  "can't be hooked into at this stage."
            Throw New System.Runtime.Remoting.RemotingException(msg)
         End If
      End If
   End Sub

   ' The rest of CustomChannel's implementation.
class CustomChannel : BaseChannelWithProperties, IChannelReceiverHook
,
                      IChannelReceiver, IChannel, IChannelSender {

   public void AddHookChannelUri(string
 channelUri) {

      if (channelUri != null) {
         string [] uris = dataStore.ChannelUris;
             
         // This implementation only allows one URI to be hooked in.
         if (uris == null) {
            string [] newUris = new string[1];
            newUris[0] = channelUri;
            dataStore.ChannelUris = newUris;
            wantsToListen = false;
         } else {
            string msg = "This channel is already listening
 for " +
               "data, and can't be hooked into at this stage.";
            throw new System.Runtime.Remoting.RemotingException(msg);
         }
      }
   }
   // The rest of CustomChannel's implementation.
ref class CustomChannel: public BaseChannelWithProperties,
 public IChannelReceiverHook, public IChannelReceiver,
 public IChannel, public IChannelSender
{
public:
   virtual void AddHookChannelUri( String^ channelUri )
   {
      if ( channelUri != nullptr )
      {
         array<String^>^uris = dataStore->ChannelUris;

         // This implementation only allows one URI to be hooked in.
         if ( uris == nullptr )
         {
            array<String^>^newUris = gcnew array<String^>(1);
            newUris[ 0 ] = channelUri;
            dataStore->ChannelUris = newUris;
            wantsToListen = false;
         }
         else
         {
            String^ msg = "This channel is already listening for
 data, and can't be hooked into at this stage.";
            throw gcnew System::Runtime::Remoting::RemotingException( msg );
         }
      }
   }

   // The rest of CustomChannel's implementation.
/** @attribute SecurityPermission(SecurityAction.Demand,
   Flags = SecurityPermissionFlag.Infrastructure)
 */
/** @attribute SecurityPermission(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.Infrastructure)
*/
class CustomChannel extends  BaseChannelWithProperties
    implements  IChannelReceiverHook,IChannelReceiver,IChannel,IChannelSender
{
    public void AddHookChannelUri(String channelUri)
    {
        if (channelUri != null) {
            String uris[] = dataStore.get_ChannelUris();

            // This implementation only allows one URI to be hooked
 in.
            if (uris == null) {
                String newUris[] = new String[1];
                newUris.set_Item(0, channelUri);
                dataStore.set_ChannelUris(newUris);
                wantsToListen = false;
            }
            else {
                try {
                    String msg = "This channel is already listening for
 " 
                        + "data, and can't be hooked into at this
 stage.";
                }
                catch (System.Runtime.Remoting.RemotingException
 srrre) {
                }
            }
        }
    } //AddHookChannelUri
// The rest of CustomChannel's implementation.
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IChannelReceiverHook インターフェイス
IChannelReceiverHook メンバ
System.Runtime.Remoting.Channels 名前空間


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

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

辞書ショートカット

すべての辞書の索引

IChannelReceiverHook.AddHookChannelUri メソッドのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS