protected IDistributedEventAggregator CreateDEA(string url) { var channel = new ChannelFactory <IDistributedEventAggregator>(new NetTcpBinding(), new EndpointAddress(url)); IDistributedEventAggregator idea = channel.CreateChannel(); _usedIdeAs.Add(idea); _usedChannels.Add(channel); return(idea); }
public IList <IDistributedEventAggregator> Resolve() { IList <IDistributedEventAggregator> deas = new List <IDistributedEventAggregator>(); foreach (var url in DistributedConfiguration.URLs) { IDistributedEventAggregator dea = CreateDEA(url); deas.Add(dea); } return(deas); }