diff --git a/Core/Utilities/Interceptors/AspectInterceptorSelector.cs b/Core/Utilities/Interceptors/AspectInterceptorSelector.cs index 23c7c87..8c23347 100644 --- a/Core/Utilities/Interceptors/AspectInterceptorSelector.cs +++ b/Core/Utilities/Interceptors/AspectInterceptorSelector.cs @@ -15,9 +15,9 @@ public IInterceptor[] SelectInterceptors(Type type, MethodInfo method, IIntercep { var classAttributes = type.GetCustomAttributes (true).ToList(); - var methodAttributes = type.GetMethod(method.Name) + var methodAttributes = type.GetMethod(method.Name)? .GetCustomAttributes(true); - classAttributes.AddRange(methodAttributes); + if(methodAttributes != null) classAttributes.AddRange(methodAttributes); classAttributes.Add(new ExceptionLogAspect(typeof(FileLogger))); return classAttributes.OrderBy(x => x.Priority).ToArray();