} // RegisteredChannels internal static IMessageSink CreateMessageSink(String url, Object data, out String objectURI) { BCLDebug.Trace("REMOTE", "ChannelServices::CreateMessageSink for url " + url + "\n"); IMessageSink msgSink = null; objectURI = null; RegisteredChannelList regChnlList = s_registeredChannels; int count = regChnlList.Count; for (int i = 0; i < count; i++) { if (regChnlList.IsSender(i)) { IChannelSender chnl = (IChannelSender)regChnlList.GetChannel(i); msgSink = chnl.CreateMessageSink(url, data, out objectURI); if (msgSink != null) { break; } } } // If the object uri has not been set, set it to the url as // default value if (null == objectURI) { objectURI = url; } return(msgSink); } // CreateMessageSink
internal static IMessageSink CreateMessageSink(string url, object data, out string objectURI) { IMessageSink messageSink = (IMessageSink)null; objectURI = (string)null; RegisteredChannelList registeredChannelList = ChannelServices.s_registeredChannels; int count = registeredChannelList.Count; for (int index = 0; index < count; ++index) { if (registeredChannelList.IsSender(index)) { messageSink = ((IChannelSender)registeredChannelList.GetChannel(index)).CreateMessageSink(url, data, out objectURI); if (messageSink != null) { break; } } } if (objectURI == null) { objectURI = url; } return(messageSink); }
internal static IMessageSink CreateMessageSink(string url, object data, out string objectURI) { IMessageSink sink = null; objectURI = null; RegisteredChannelList list = s_registeredChannels; int count = list.Count; for (int i = 0; i < count; i++) { if (list.IsSender(i)) { sink = ((IChannelSender)list.GetChannel(i)).CreateMessageSink(url, data, out objectURI); if (sink != null) { break; } } } if (objectURI == null) { objectURI = url; } return(sink); }