Exemplo n.º 1
0
 public AgentNotification(SystemNodeIdentifier Host, SystemIdentifier System,
                          AgentIdentifier Agent, ServiceAgentState State, IAppMessage Message)
 {
     this.Host    = Host;
     this.System  = System;
     this.Agent   = Agent;
     this.State   = State;
     this.Message = Message;
 }
Exemplo n.º 2
0
 public AgentRuntimeStatus(AgentIdentifier AgentId, ServiceAgentState CurrentState, DateTime?AsOf = null)
 {
     this.AgentId      = AgentId;
     this.CurrentState = CurrentState;
     this.AsOf         = AsOf ?? now();
 }
Exemplo n.º 3
0
 public static IAppMessage InvalidStartState(string AgentName, ServiceAgentState AgentState)
 => warn($"The {AgentName} cannot start while in the {AgentState} state");
Exemplo n.º 4
0
 /// <summary>
 /// Issued to reveal agent state
 /// </summary>
 /// <param name="AgentName">The name of the agent</param>
 /// <param name="AgentState"></param>
 /// <returns></returns>
 public static IAppMessage AgentHasState(string AgentName, ServiceAgentState AgentState)
 => inform("The @AgentName agent is in the @AgentState state", new
 {
     AgentName,
     AgentState
 });
Exemplo n.º 5
0
 public AgentStateTransition(ServiceAgentState SourceState, ServiceAgentState TargetState, object Data = null)
 {
     this.SourceState = SourceState;
     this.TargetState = TargetState;
     this.Data        = Data;
 }