private void OnStateChanged(IPlatformModule sender, PlatformModuleState newState) { lock (_lock) { DelayRefreshTimer(); CheckUpDownTime(); CleanHistory(); MetricsUpdatedEvent(this, new ModuleMetricUpdateEventArgs(Availability, Performance, Quality, OverallEquipmentEfficiency)); } }
public PlatformModuleDTO(Int64 id, PlatformModuleState state, String name, Boolean isEnabled, Int32 adsPort, String pathRootController, Int32 maxCapacity, String subState, List <PlatformItemDTO> platformItems, Int32 type) { Id = id; State = state; Name = name; IsEnabled = isEnabled; AdsPort = adsPort; PathRootController = pathRootController; MaxCapacity = maxCapacity; SubState = subState; PlatformItems = platformItems; Type = type; }
internal protected void RaiseModuleStateChangedEvent() { // callbacks will be raised in any case even if the state hasn't changed. to update WCF clients. if (EventRaiser != null) { EventRaiser.Raise(ref ModuleStateChangedCallback, this.ToDTO()); } if (State != _oldModuleState) { var handle = ModuleStateChangedEvent; if (handle != null) { handle(this, State); } _oldModuleState = State; } }
private void OnModuleStateChangedEvent(IPlatformModule module, PlatformModuleState newState) { RouteForcing.RecalculateRoute(); }
private void PlatformModuleModuleStateChangedEvent(IPlatformModule sender, PlatformModuleState newState) { _eventRaiser.Raise(ref _platformModuleStateChanged, ((PlatformModule)sender).ToDTO()); }