internal static void RegisterChannels(ArrayList channels, bool onlyDelayed) { foreach (ChannelData channel in channels) { if (onlyDelayed && channel.DelayLoadAsClientChannel != "true") { continue; } if (defaultDelayedConfigRead && channel.DelayLoadAsClientChannel == "true") { continue; } if (channel.Ref != null) { ChannelData template = (ChannelData)channelTemplates [channel.Ref]; if (template == null) { throw new RemotingException("Channel template '" + channel.Ref + "' not found"); } channel.CopyFrom(template); } foreach (ProviderData prov in channel.ServerProviders) { if (prov.Ref != null) { ProviderData template = (ProviderData)serverProviderTemplates [prov.Ref]; if (template == null) { throw new RemotingException("Provider template '" + prov.Ref + "' not found"); } prov.CopyFrom(template); } } foreach (ProviderData prov in channel.ClientProviders) { if (prov.Ref != null) { ProviderData template = (ProviderData)clientProviderTemplates [prov.Ref]; if (template == null) { throw new RemotingException("Provider template '" + prov.Ref + "' not found"); } prov.CopyFrom(template); } } #if !DISABLE_REMOTING ChannelServices.RegisterChannelConfig(channel); #endif } }
internal static void RegisterChannels(ArrayList channels, bool onlyDelayed) { foreach (object obj in channels) { ChannelData channelData = (ChannelData)obj; if (!onlyDelayed || !(channelData.DelayLoadAsClientChannel != "true")) { if (!RemotingConfiguration.defaultDelayedConfigRead || !(channelData.DelayLoadAsClientChannel == "true")) { if (channelData.Ref != null) { ChannelData channelData2 = (ChannelData)RemotingConfiguration.channelTemplates[channelData.Ref]; if (channelData2 == null) { throw new RemotingException("Channel template '" + channelData.Ref + "' not found"); } channelData.CopyFrom(channelData2); } foreach (object obj2 in channelData.ServerProviders) { ProviderData providerData = (ProviderData)obj2; if (providerData.Ref != null) { ProviderData providerData2 = (ProviderData)RemotingConfiguration.serverProviderTemplates[providerData.Ref]; if (providerData2 == null) { throw new RemotingException("Provider template '" + providerData.Ref + "' not found"); } providerData.CopyFrom(providerData2); } } foreach (object obj3 in channelData.ClientProviders) { ProviderData providerData3 = (ProviderData)obj3; if (providerData3.Ref != null) { ProviderData providerData4 = (ProviderData)RemotingConfiguration.clientProviderTemplates[providerData3.Ref]; if (providerData4 == null) { throw new RemotingException("Provider template '" + providerData3.Ref + "' not found"); } providerData3.CopyFrom(providerData4); } } ChannelServices.RegisterChannelConfig(channelData); } } } }