IPsProcessProvider.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Quadarax.Foundation.Core.Data;
  2. namespace qdr.fnd.core.pqueue.Process
  3. {
  4. public interface IPsProcessProvider : IDisposable
  5. {
  6. /// <summary>
  7. /// Collection (dictionary) of running arguments for the process.
  8. /// </summary>
  9. IDictionary<string, TypedArgument> Arguments { get; }
  10. /// <summary>
  11. /// Flag signalizes if the process is running.
  12. /// </summary>
  13. bool IsRunning { get; }
  14. /// <summary>
  15. /// Working/processing item identifier. Points to <see cref="PsQueueItem.Id"/>."/>
  16. /// </summary>
  17. string ItemId { get; }
  18. /// <summary>
  19. /// Validates the process arguments. Throws <see cref="PsProcessProviderException"/> if validation fails.
  20. /// </summary>
  21. void Validate();
  22. /// <summary>
  23. /// Starts the process. Throws <see cref="PsProcessProviderException"/> if the process is already running.
  24. /// </summary>
  25. void Start();
  26. /// <summary>
  27. /// Stops the process. Throws <see cref="PsProcessProviderException"/> if the process is not running.
  28. /// </summary>
  29. void Stop();
  30. /// <summary>
  31. /// Waits till <see cref="IsRunning"/> is false."/>
  32. /// </summary>
  33. void WaitToDone();
  34. }
  35. }