From 4dfdf48e75faa4f758ddb837eaf162a3fd9d378f Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 29 Aug 2023 15:54:59 +0800 Subject: [PATCH] Make `EntityChangeTrackingAttribute` abstract. --- .../Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs | 2 +- .../Volo/Abp/Domain/Repositories/RepositoryHelper.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs index 0bb6ca82e4..23bc6ef851 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/EntityChangeTrackingAttribute.cs @@ -3,7 +3,7 @@ using System; namespace Volo.Abp.Domain.Repositories; [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface)] -public class EntityChangeTrackingAttribute : Attribute +public abstract class EntityChangeTrackingAttribute : Attribute { public bool Enabled { get; set; } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryHelper.cs index 014970c527..2c57dd9640 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryHelper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryHelper.cs @@ -45,8 +45,8 @@ public static class RepositoryHelper .Any(HasEntityChangeTrackingAttribute); } - private static bool HasEntityChangeTrackingAttribute(MemberInfo methodInfo) + private static bool HasEntityChangeTrackingAttribute(MemberInfo memberInfo) { - return methodInfo.IsDefined(typeof(EntityChangeTrackingAttribute), true); + return memberInfo.IsDefined(typeof(EntityChangeTrackingAttribute), true); } }