public void CopyFrom(ChannelData other) { if (Ref == null) { Ref = other.Ref; } if (Id == null) { Id = other.Id; } if (Type == null) { Type = other.Type; } if (DelayLoadAsClientChannel == null) { DelayLoadAsClientChannel = other.DelayLoadAsClientChannel; } if (other._customProperties != null) { foreach (DictionaryEntry entry in other._customProperties) { if (!CustomProperties.ContainsKey(entry.Key)) { CustomProperties [entry.Key] = entry.Value; } } } if (_serverProviders == null && other._serverProviders != null) { foreach (ProviderData prov in other._serverProviders) { ProviderData np = new ProviderData(); np.CopyFrom(prov); ServerProviders.Add(np); } } if (_clientProviders == null && other._clientProviders != null) { foreach (ProviderData prov in other._clientProviders) { ProviderData np = new ProviderData(); np.CopyFrom(prov); ClientProviders.Add(np); } } }
public void CopyFrom(ChannelData other) { if (this.Ref == null) { this.Ref = other.Ref; } if (this.Id == null) { this.Id = other.Id; } if (this.Type == null) { this.Type = other.Type; } if (this.DelayLoadAsClientChannel == null) { this.DelayLoadAsClientChannel = other.DelayLoadAsClientChannel; } if (other._customProperties != null) { foreach (object obj in other._customProperties) { DictionaryEntry dictionaryEntry = (DictionaryEntry)obj; if (!this.CustomProperties.ContainsKey(dictionaryEntry.Key)) { this.CustomProperties[dictionaryEntry.Key] = dictionaryEntry.Value; } } } if (this._serverProviders == null && other._serverProviders != null) { foreach (object obj2 in other._serverProviders) { ProviderData other2 = (ProviderData)obj2; ProviderData providerData = new ProviderData(); providerData.CopyFrom(other2); this.ServerProviders.Add(providerData); } } if (this._clientProviders == null && other._clientProviders != null) { foreach (object obj3 in other._clientProviders) { ProviderData other3 = (ProviderData)obj3; ProviderData providerData2 = new ProviderData(); providerData2.CopyFrom(other3); this.ClientProviders.Add(providerData2); } } }
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); } } } }
public void CopyFrom (ChannelData other) { if (Ref == null) Ref = other.Ref; if (Id == null) Id = other.Id; if (Type == null) Type = other.Type; if (DelayLoadAsClientChannel == null) DelayLoadAsClientChannel = other.DelayLoadAsClientChannel; if (other._customProperties != null) { foreach (DictionaryEntry entry in other._customProperties) if (!CustomProperties.ContainsKey (entry.Key)) CustomProperties [entry.Key] = entry.Value; } if (_serverProviders == null && other._serverProviders != null) { foreach (ProviderData prov in other._serverProviders) { ProviderData np = new ProviderData(); np.CopyFrom (prov); ServerProviders.Add (np); } } if (_clientProviders == null && other._clientProviders != null) { foreach (ProviderData prov in other._clientProviders) { ProviderData np = new ProviderData(); np.CopyFrom (prov); ClientProviders.Add (np); } } }