Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public AppServerStatus(AppServerMetadata metadata, StatusInfoCollection dataCollection)
 {
     Metadata       = metadata;
     DataCollection = dataCollection;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Called when [status collected].
 /// </summary>
 /// <param name="status">The app status.</param>
 protected virtual void OnStatusCollected(StatusInfoCollection status)
 {
 }
Exemplo n.º 4
0
 protected virtual void UpdateStatus(StatusInfoCollection status)
 {
     status[StatusInfoKeys.IsRunning] = (State == ServerState.Running);
 }