OnProcessorsLifeCycleChangedEventArg.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Edge.Core.Processor.Dispatcher
  6. {
  7. public class OnProcessorsLifeCycleChangedEventArg
  8. {
  9. /// <summary>
  10. ///
  11. /// </summary>
  12. /// <param name="operationResults"></param>
  13. /// <param name="lifeCycleName"></param>
  14. /// <param name="reason">any descriptive info for help understand why this operation happened.</param>
  15. public OnProcessorsLifeCycleChangedEventArg(
  16. IEnumerable<ProcessorLifeCycleOperationResult> operationResults, string lifeCycleName, string reason)
  17. {
  18. this.OperationResults = operationResults;// operationResults.Select(r => ProcessorLifeCycleOperationResultDto.From(r));
  19. this.LifeCycleName = lifeCycleName;
  20. this.Reason = reason;
  21. this.TimeStamp = DateTime.Now;
  22. }
  23. public DateTime TimeStamp { get; set; }
  24. public string LifeCycleName { get; private set; }
  25. public string Reason { get; private set; }
  26. /// <summary>
  27. /// </summary>
  28. public IEnumerable<ProcessorLifeCycleOperationResult> OperationResults { get; private set; }
  29. }
  30. public class OnProcessorsInstantiatedEventArg : System.EventArgs
  31. {
  32. public OnProcessorsInstantiatedEventArg(
  33. IEnumerable<ProcessorInstanceOperatingResult> operationResults)
  34. {
  35. this.OperationResults = operationResults;
  36. }
  37. public IEnumerable<ProcessorInstanceOperatingResult> OperationResults { get; private set; }
  38. }
  39. }