Ejemplo n.º 1
0
 public void Start(EventBasedStartInfo startInfo)
 {
     AIBreadcrumbs.StartupTrail.Drop("Starting event assistant: " + this.Instance.Name);
     this.State = AssistantCollectionEntry.AssistantState.Starting;
     this.Instance.OnStart(startInfo);
     this.State = AssistantCollectionEntry.AssistantState.Started;
     AIBreadcrumbs.StartupTrail.Drop("Finished starting " + this.Instance.Name);
     base.TracePfd("PFD AIS {0} Start request for {1} ", new object[]
     {
         24983,
         this.Instance
     });
 }
Ejemplo n.º 2
0
 public void Shutdown()
 {
     if (this.State == AssistantCollectionEntry.AssistantState.Started)
     {
         base.TracePfd("PFD AIS {0} Shutdown requested for assistant {1}", new object[]
         {
             16791,
             this.Instance
         });
         this.State = AssistantCollectionEntry.AssistantState.Stopping;
         AIBreadcrumbs.ShutdownTrail.Drop("Shutting down event assistant: " + this.Instance.Name);
         this.Instance.OnShutdown();
         this.State = AssistantCollectionEntry.AssistantState.Stopped;
         AIBreadcrumbs.ShutdownTrail.Drop("Finished shutting down " + this.Instance.Name);
         return;
     }
     ExTraceGlobals.EventBasedAssistantCollectionTracer.TraceDebug <LocalizedString, AssistantCollectionEntry.AssistantState>((long)this.GetHashCode(), "Entry for {0}: Shutdown requested for this assistant while current state was {1}.", this.Instance.Name, this.State);
 }