static private CreateClientChannelSinkChain ( IChannelSender sender, string url, object channelDataArray, string &objectUri ) : IMessageSink | ||
sender | IChannelSender | |
url | string | |
channelDataArray | object | |
objectUri | string | |
Résultat | IMessageSink |
internal static IMessageSink CreateClientChannelSinkChain(string url, object remoteChannelData, out string objectUri) { object[] channelDataArray = (object[])remoteChannelData; object syncRoot = ChannelServices.registeredChannels.SyncRoot; lock (syncRoot) { foreach (object obj in ChannelServices.registeredChannels) { IChannel channel = (IChannel)obj; IChannelSender channelSender = channel as IChannelSender; if (channelSender != null) { IMessageSink messageSink = ChannelServices.CreateClientChannelSinkChain(channelSender, url, channelDataArray, out objectUri); if (messageSink != null) { return(messageSink); } } } RemotingConfiguration.LoadDefaultDelayedChannels(); foreach (object obj2 in ChannelServices.delayedClientChannels) { IChannelSender channelSender2 = (IChannelSender)obj2; IMessageSink messageSink2 = ChannelServices.CreateClientChannelSinkChain(channelSender2, url, channelDataArray, out objectUri); if (messageSink2 != null) { ChannelServices.delayedClientChannels.Remove(channelSender2); ChannelServices.RegisterChannel(channelSender2); return(messageSink2); } } } objectUri = null; return(null); }