/src/LinFu.AOP.Interfaces/IExceptionHandlerInfo.cs

http://github.com/philiplaureano/LinFu · C# · 37 lines · 11 code · 4 blank · 22 comment · 0 complexity · 51b7dd70ed9e5cd9f1aefa2b09a590d2 MD5 · raw file

  1. using System;
  2. namespace LinFu.AOP.Interfaces
  3. {
  4. /// <summary>
  5. /// Represents a type that describes the context of a thrown exception.
  6. /// </summary>
  7. public interface IExceptionHandlerInfo
  8. {
  9. /// <summary>
  10. /// Gets the value indicating the thrown exception.
  11. /// </summary>
  12. /// <value>The thrown exception.</value>
  13. Exception Exception { get; }
  14. /// <summary>
  15. /// Gets the value indicating the <see cref="IInvocationInfo" /> instance that describes the context of the method
  16. /// that threw the exception.
  17. /// </summary>
  18. /// <value>The <see cref="IInvocationInfo" /> instance.</value>
  19. IInvocationInfo InvocationInfo { get; }
  20. /// <summary>
  21. /// Gets or sets the value indicating the return value that will be used in place of the original return value if
  22. /// the exception is intercepted by an <see cref="IExceptionHandler" /> instance.
  23. /// </summary>
  24. /// <value>The method return value.</value>
  25. object ReturnValue { get; set; }
  26. /// <summary>
  27. /// Gets or sets the value indicating whether or not the exception should be rethrown after
  28. /// the <see cref="IExceptionHandler" /> handles the given exception.
  29. /// </summary>
  30. /// <value>This should be <c>true</c> if the exception should be rethrown, otherwise, it must be <c>false</c>.</value>
  31. bool ShouldSkipRethrow { get; set; }
  32. }
  33. }