using System;
namespace Abp.Web.Models
{
///
/// Used to determine how ABP should wrap response on the web layer.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Method)]
public class WrapResultAttribute : Attribute
{
///
/// Wrap result on success.
///
public bool WrapOnSuccess { get; set; }
///
/// Wrap result on error.
///
public bool WrapOnError { get; set; }
///
/// Log errors.
/// Default: true.
///
public bool LogError { get; set; }
///
/// Initializes a new instance of the class.
///
/// Wrap result on success.
/// Wrap result on error.
public WrapResultAttribute(bool wrapOnSuccess = true, bool wrapOnError = true)
{
WrapOnSuccess = wrapOnSuccess;
WrapOnError = wrapOnError;
LogError = true;
}
}
}