DontWrapResultAttribute.cs 714 B

123456789101112131415161718192021
  1. using System;
  2. namespace Abp.Web.Models
  3. {
  4. /// <summary>
  5. /// A shortcut for <see cref="WrapResultAttribute"/> to disable wrapping by default.
  6. /// It sets false to <see cref="WrapResultAttribute.WrapOnSuccess"/> and <see cref="WrapResultAttribute.WrapOnError"/> properties.
  7. /// </summary>
  8. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Method)]
  9. public class DontWrapResultAttribute : WrapResultAttribute
  10. {
  11. /// <summary>
  12. /// Initializes a new instance of the <see cref="DontWrapResultAttribute"/> class.
  13. /// </summary>
  14. public DontWrapResultAttribute()
  15. : base(false, false)
  16. {
  17. }
  18. }
  19. }