UnitOfWorkHelper.cs 559 B

12345678910111213141516171819
  1. using System.Reflection;
  2. namespace Abp.Domain.Uow
  3. {
  4. /// <summary>
  5. /// A helper class to simplify unit of work process.
  6. /// </summary>
  7. internal static class UnitOfWorkHelper
  8. {
  9. /// <summary>
  10. /// Returns true if given method has UnitOfWorkAttribute attribute.
  11. /// </summary>
  12. /// <param name="memberInfo">Method info to check</param>
  13. public static bool HasUnitOfWorkAttribute(MemberInfo memberInfo)
  14. {
  15. return memberInfo.IsDefined(typeof(UnitOfWorkAttribute), true);
  16. }
  17. }
  18. }