From f20a6f0d433024591d20ec20d248d304868ded9f Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 21 Feb 2020 19:07:39 +0800 Subject: [PATCH] Merge null check expressions. --- .../Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs index ceff8c5029..10bc9545d7 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs @@ -65,13 +65,8 @@ namespace Volo.Abp.AspNetCore.Auditing } var endpoint = httpContext.GetEndpoint(); - if (endpoint == null) - { - return false; - } - - var actionDescriptor = endpoint.Metadata.GetMetadata(); - if (actionDescriptor != null && !(actionDescriptor is ControllerActionDescriptor)) + var actionDescriptor = endpoint?.Metadata.GetMetadata(); + if (!(actionDescriptor is ControllerActionDescriptor)) { return false; }