private void RegisterServiceHostDEA(DistributedConfiguration distributedConfiguration) { _distributedEventAggregatorServiceHost = new DIServiceHost(typeof (DistributedEventAggregator), _windsorContainer); _distributedEventAggregatorServiceHost.AddServiceEndpoint ( typeof (IDistributedEventAggregator), new NetTcpBinding(), distributedConfiguration.LocalURI ); _distributedEventAggregatorServiceHost.Open(); }
public void Install(DistributedConfiguration distributedConfiguration, string loggerConfiguration) { RegisterLogging(loggerConfiguration); if (distributedConfiguration == null) { // use nomad specific installer for that _windsorContainer.Install( new NomadEventAggregatorInstaller(), new NomadServiceLocatorInstaller(), new ModuleLoaderInstaller() ); } else { // use nomad specific installer for that _windsorContainer.Install( new NomadDistributedDeliverySubsystemsInstaller(distributedConfiguration), new NomadDistributedEventAggregatorInstaller(), new NomadServiceLocatorInstaller(), new ModuleLoaderInstaller() ); // TODO: make registering resolver with container later var dea = (DistributedEventAggregator) _windsorContainer.Resolve<IEventAggregator>(NomadDistributedEventAggregatorInstaller.ON_SITE_NAME); _resolver = new ResolverFactory(distributedConfiguration); dea.RemoteDistributedEventAggregator = _resolver.Resolve(); // run service RegisterServiceHostDEA(distributedConfiguration); } }