From 61aea480a3b7409a31b51edf345de704790bf932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Sep 2016 11:21:42 +0300 Subject: [PATCH] Resolved #721: No need to check if auditing is enabled for registering the interceptor. --- src/Abp/Auditing/AuditingInterceptorRegistrar.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Abp/Auditing/AuditingInterceptorRegistrar.cs b/src/Abp/Auditing/AuditingInterceptorRegistrar.cs index 033459bae4..bae4a45ab3 100644 --- a/src/Abp/Auditing/AuditingInterceptorRegistrar.cs +++ b/src/Abp/Auditing/AuditingInterceptorRegistrar.cs @@ -10,11 +10,6 @@ internal static class AuditingInterceptorRegistrar public static void Initialize(IIocManager iocManager) { var auditingConfiguration = iocManager.Resolve(); - if (!auditingConfiguration.IsEnabled) - { - return; - } - iocManager.IocContainer.Kernel.ComponentRegistered += (key, handler) => { if (ShouldIntercept(auditingConfiguration, handler.ComponentModel.Implementation)) @@ -31,12 +26,12 @@ private static bool ShouldIntercept(IAuditingConfiguration auditingConfiguration return true; } - if (type.IsDefined(typeof(AuditedAttribute), true)) //TODO: true or false? + if (type.IsDefined(typeof(AuditedAttribute), true)) { return true; } - if (type.GetMethods().Any(m => m.IsDefined(typeof(AuditedAttribute), true))) //TODO: true or false? + if (type.GetMethods().Any(m => m.IsDefined(typeof(AuditedAttribute), true))) { return true; }