IResult.cs 952 B

1234567891011121314151617181920212223242526272829303132
  1. namespace Caliburn.Micro.Core {
  2. using System;
  3. /// <summary>
  4. /// Allows custom code to execute after the return of a action.
  5. /// </summary>
  6. public interface IResult {
  7. /// <summary>
  8. /// Executes the result using the specified context.
  9. /// </summary>
  10. /// <param name="context">The context.</param>
  11. void Execute(CoroutineExecutionContext context);
  12. /// <summary>
  13. /// Occurs when execution has completed.
  14. /// </summary>
  15. event EventHandler<ResultCompletionEventArgs> Completed;
  16. }
  17. /// <summary>
  18. /// Allows custom code to execute after the return of a action.
  19. /// </summary>
  20. /// <typeparam name="TResult">The type of the result.</typeparam>
  21. public interface IResult<out TResult> : IResult
  22. {
  23. /// <summary>
  24. /// Gets the result of the asynchronous operation.
  25. /// </summary>
  26. TResult Result { get; }
  27. }
  28. }