StatusInfoCollection IManagedAppBase.CollectStatus() { var status = m_AppStatus; if (status == null) { status = new StatusInfoCollection(); status.Name = Name; status.Tag = Name; status.StartedTime = StartedTime; m_AppStatus = status; } UpdateStatus(status); Task.Factory.StartNew(() => OnStatusCollected(status)).ContinueWith(t => { Logger.LogAggregateException("Exception happend in OnStatusCollected.", t.Exception); }, TaskContinuationOptions.OnlyOnFaulted); return(status); }
/// <summary> /// Called when [status collected]. /// </summary> /// <param name="status">The app status.</param> protected virtual void OnStatusCollected(StatusInfoCollection status) { }
protected virtual void UpdateStatus(StatusInfoCollection status) { status[StatusInfoKeys.IsRunning] = (State == ServerState.Running); }
public AppServerStatus(AppServerMetadata metadata, StatusInfoCollection dataCollection) { Metadata = metadata; DataCollection = dataCollection; }