System.Runtime.Remoting.Channels.RegisteredChannelList.IsReceiver C# (CSharp) Method

IsReceiver() private method

private IsReceiver ( int index ) : bool
index int
return bool
        internal bool IsReceiver(int index)
        {
            return _channels[index].IsReceiver();
        } // IsReceiver        

Usage Example

 internal static string FindFirstHttpUrlForObject(string objectUri)
 {
     if (objectUri != null)
     {
         RegisteredChannelList list = s_registeredChannels;
         int count = list.Count;
         for (int i = 0; i < count; i++)
         {
             if (list.IsReceiver(i))
             {
                 IChannelReceiver channel  = (IChannelReceiver)list.GetChannel(i);
                 string           fullName = channel.GetType().FullName;
                 if ((string.CompareOrdinal(fullName, "System.Runtime.Remoting.Channels.Http.HttpChannel") == 0) || (string.CompareOrdinal(fullName, "System.Runtime.Remoting.Channels.Http.HttpServerChannel") == 0))
                 {
                     string[] urlsForUri = channel.GetUrlsForUri(objectUri);
                     if ((urlsForUri != null) && (urlsForUri.Length > 0))
                     {
                         return(urlsForUri[0]);
                     }
                 }
             }
         }
     }
     return(null);
 }
All Usage Examples Of System.Runtime.Remoting.Channels.RegisteredChannelList::IsReceiver