public HostPhase(ICollectionFactory collectionFactory, IThreadingProxy threadingProxy, HostSessionFactory hostSessionFactory, HostContext hostContext, IListenerSocket listenerSocket) { this.threadingProxy = threadingProxy; this.hostSessionFactory = hostSessionFactory; this.hostContext = hostContext; this.listenerSocket = listenerSocket; this.cancellationTokenSource = threadingProxy.CreateCancellationTokenSource(); this.listenerThread = threadingProxy.CreateThread(ListenerThreadEntryPoint, new ThreadCreationOptions { IsBackground = true }); sessions = collectionFactory.CreateConcurrentSet <HostSession>(); }
public CourierAnnouncerImpl( IThreadingProxy threadingProxy, ManageableCourierEndpoint localEndpoint, OutboundEnvelopeManager outboundEnvelopeManager) { this.threadingProxy = threadingProxy; this.localEndpoint = localEndpoint; this.outboundEnvelopeManager = outboundEnvelopeManager; this.thread = threadingProxy.CreateThread(ThreadStart, new ThreadCreationOptions() { IsBackground = true }); this.cancellationTokenSource = threadingProxy.CreateCancellationTokenSource(); }