public MainFormController(ICCTrayMultiConfiguration configuration, ISynchronizeInvoke owner, MainForm mainForm) { this.mainForm = mainForm; this.configuration = configuration; serverMonitors = configuration.GetServerMonitors(); for (int i = 0; i < serverMonitors.Length; i++) { serverMonitors[i] = new SynchronizedServerMonitor(serverMonitors[i], owner); } aggregatedServerMonitor = new AggregatingServerMonitor(serverMonitors); queueIconProvider = new ResourceIntegrationQueueIconProvider(); projectMonitors = configuration.GetProjectStatusMonitors(serverMonitors); execRunners = new BuildTransitionExecRunner[projectMonitors.Length]; for (int i = 0; i < projectMonitors.Length; i++) { execRunners[i] = new BuildTransitionExecRunner(projectMonitors[i], configuration.Execs); projectMonitors[i] = new SynchronizedProjectMonitor(projectMonitors[i], owner); } aggregatedProjectMonitor = new AggregatingProjectMonitor(projectMonitors); projectStateIconProvider = new ConfigurableProjectStateIconProvider(configuration.Icons); projectStateIconAdaptor = new ProjectStateIconAdaptor(aggregatedProjectMonitor, projectStateIconProvider); soundPlayer = new BuildTransitionSoundPlayer(aggregatedProjectMonitor, new AudioPlayer(), configuration.Audio); LampController lampController = new LampController(configuration.X10,null); x10Controller = new X10Controller(aggregatedProjectMonitor,new DateTimeProvider(),configuration.X10,lampController); growlController = new GrowlController(aggregatedProjectMonitor, configuration.Growl); #if !DISABLE_COM IBalloonMessageProvider balloonMessageProvider = new ConfigurableBalloonMessageProvider(configuration.BalloonMessages); speakerForTheDead = new SpeakingProjectMonitor(aggregatedProjectMonitor, balloonMessageProvider, configuration.Speech); #endif }
public DefaultServer( ClusterId clusterId, IClusterClock clusterClock, #pragma warning disable CS0618 // Type or member is obsolete ClusterConnectionMode clusterConnectionMode, ConnectionModeSwitch connectionModeSwitch, #pragma warning restore CS0618 // Type or member is obsolete bool?directConnection, ServerSettings settings, EndPoint endPoint, IConnectionPoolFactory connectionPoolFactory, IServerMonitorFactory monitorFactory, IEventSubscriber eventSubscriber, ServerApi serverApi) : base( clusterId, clusterClock, clusterConnectionMode, connectionModeSwitch, directConnection, settings, endPoint, connectionPoolFactory, eventSubscriber, serverApi) { _monitor = Ensure.IsNotNull(monitorFactory, nameof(monitorFactory)).Create(ServerId, endPoint); _baseDescription = _currentDescription = new ServerDescription(ServerId, endPoint, reasonChanged: "ServerInitialDescription", heartbeatInterval: settings.HeartbeatInterval); }
public MainFormController(ICCTrayMultiConfiguration configuration, ISynchronizeInvoke owner, MainForm mainForm) { this.mainForm = mainForm; this.configuration = configuration; serverMonitors = configuration.GetServerMonitors(); for (int i = 0; i < serverMonitors.Length; i++) { serverMonitors[i] = new SynchronizedServerMonitor(serverMonitors[i], owner); } aggregatedServerMonitor = new AggregatingServerMonitor(serverMonitors); queueIconProvider = new ResourceIntegrationQueueIconProvider(); projectMonitors = configuration.GetProjectStatusMonitors(serverMonitors); for (int i = 0; i < projectMonitors.Length; i++) { projectMonitors[i] = new SynchronizedProjectMonitor(projectMonitors[i], owner); } aggregatedProjectMonitor = new AggregatingProjectMonitor(projectMonitors); projectStateIconProvider = new ConfigurableProjectStateIconProvider(configuration.Icons); projectStateIconAdaptor = new ProjectStateIconAdaptor(aggregatedProjectMonitor, projectStateIconProvider); soundPlayer = new BuildTransitionSoundPlayer(aggregatedProjectMonitor, new AudioPlayer(), configuration.Audio); execRunner = new BuildTransitionExecRunner(aggregatedProjectMonitor, configuration.Execs); LampController lampController = new LampController(configuration.X10, null); x10Controller = new X10Controller(aggregatedProjectMonitor, new DateTimeProvider(), configuration.X10, lampController); growlController = new GrowlController(aggregatedProjectMonitor, configuration.Growl); #if !DISABLE_COM IBalloonMessageProvider balloonMessageProvider = new ConfigurableBalloonMessageProvider(configuration.BalloonMessages); speakerForTheDead = new SpeakingProjectMonitor(aggregatedProjectMonitor, balloonMessageProvider, configuration.Speech); #endif }
public StrategyRunnerBackgroundService(IServerMonitor serverMonitor, IStrategyRunnerActionBlock strategyRunnerActionBlock, ILoggerFactory loggerFactory) { this.serverMonitor = serverMonitor; this.strategyRunnerActionBlock = strategyRunnerActionBlock; logger = loggerFactory.CreateLogger <StrategyRunnerBackgroundService>(); }
public MonitorService(IServiceProvider serviceProvider, IOptions <ServerOptions> options, IServerMonitor serverMonitor, ILogger <MonitorService> logger) { ServiceProvider = serviceProvider; _logger = logger; _options = options.Value; _serverMonitor = serverMonitor; }
public ServerManager(IServerMonitor serverMonitor, IBatchNotification <ServerNotification> serverBatchNotificationPublisher, ITradeStrategyCacheManager tradeStrategyCacheManager, StrategyNotificationHub strategyNotificationHub, ServerNotificationHub serverNotificationHub) { ServerMonitor = serverMonitor; this.serverBatchNotificationPublisher = serverBatchNotificationPublisher; this.tradeStrategyCacheManager = tradeStrategyCacheManager; this.strategyNotificationHub = strategyNotificationHub; this.serverNotificationHub = serverNotificationHub; disposables = new List <IDisposable>(); ObserverTradeStrategyCacheManager(); ObserverStrategyNotificationHub(); ObserverServerNotificationHub(); }
public void Setup() { _clusterId = new ClusterId(); _clusterConnectionMode = ClusterConnectionMode.Standalone; _connectionPool = Substitute.For<IConnectionPool>(); _connectionPoolFactory = Substitute.For<IConnectionPoolFactory>(); _connectionPoolFactory.CreateConnectionPool(null, null) .ReturnsForAnyArgs(_connectionPool); _endPoint = new DnsEndPoint("localhost", 27017); _serverMonitor = Substitute.For<IServerMonitor>(); _serverMonitorFactory = Substitute.For<IServerMonitorFactory>(); _serverMonitorFactory.Create(null, null).ReturnsForAnyArgs(_serverMonitor); _capturedEvents = new EventCapturer(); _settings = new ServerSettings(heartbeatInterval: Timeout.InfiniteTimeSpan); _subject = new Server(_clusterId, _clusterConnectionMode, _settings, _endPoint, _connectionPoolFactory, _serverMonitorFactory, _capturedEvents); }
public void Setup() { _clusterId = new ClusterId(); _clusterConnectionMode = ClusterConnectionMode.Standalone; _connectionPool = Substitute.For <IConnectionPool>(); _connectionPoolFactory = Substitute.For <IConnectionPoolFactory>(); _connectionPoolFactory.CreateConnectionPool(null, null) .ReturnsForAnyArgs(_connectionPool); _endPoint = new DnsEndPoint("localhost", 27017); _serverMonitor = Substitute.For <IServerMonitor>(); _serverMonitorFactory = Substitute.For <IServerMonitorFactory>(); _serverMonitorFactory.Create(null, null).ReturnsForAnyArgs(_serverMonitor); _capturedEvents = new EventCapturer(); _settings = new ServerSettings(heartbeatInterval: Timeout.InfiniteTimeSpan); _subject = new Server(_clusterId, _clusterConnectionMode, _settings, _endPoint, _connectionPoolFactory, _serverMonitorFactory, _capturedEvents); }
// constructors public Server(ClusterId clusterId, ClusterConnectionMode clusterConnectionMode, ServerSettings settings, EndPoint endPoint, IConnectionPoolFactory connectionPoolFactory, IServerMonitorFactory serverMonitorFactory, IEventSubscriber eventSubscriber) { Ensure.IsNotNull(clusterId, nameof(clusterId)); _clusterConnectionMode = clusterConnectionMode; _settings = Ensure.IsNotNull(settings, nameof(settings)); _endPoint = Ensure.IsNotNull(endPoint, nameof(endPoint)); Ensure.IsNotNull(connectionPoolFactory, nameof(connectionPoolFactory)); Ensure.IsNotNull(serverMonitorFactory, nameof(serverMonitorFactory)); Ensure.IsNotNull(eventSubscriber, nameof(eventSubscriber)); _serverId = new ServerId(clusterId, endPoint); _connectionPool = connectionPoolFactory.CreateConnectionPool(_serverId, endPoint); _state = new InterlockedInt32(State.Initial); _monitor = serverMonitorFactory.Create(_serverId, _endPoint); eventSubscriber.TryGetEventHandler(out _openingEventHandler); eventSubscriber.TryGetEventHandler(out _openedEventHandler); eventSubscriber.TryGetEventHandler(out _closingEventHandler); eventSubscriber.TryGetEventHandler(out _closedEventHandler); eventSubscriber.TryGetEventHandler(out _descriptionChangedEventHandler); }
public MonitorServerPolledEventArgs( IServerMonitor serverMonitor ) { ServerMonitor = serverMonitor; }
private ServerMonitoringService(TimeSpan interval, IServerMonitor serverMonitor) : base(interval) { this._serverMonitor = serverMonitor; }
public ServerNotificationPublisherContext(IServerMonitor serverMonitor, ServerNotificationHub notificationHub) { this.notificationHub = notificationHub; this.serverMonitor = serverMonitor; }
public ServerNotificationHub(ConnectionManager connectionManager, ChannelManager channelManager, IServerMonitor serverMonitor) : base(connectionManager, channelManager) { this.serverMonitor = serverMonitor; }
public MonitorServerPolledEventArgs(IServerMonitor serverMonitor) { ServerMonitor = serverMonitor; }