Example #1
0
        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);
        }
Example #2
0
        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);
        }