Browse Source

Merge null check expressions.

pull/2880/head
maliming 7 years ago
parent
commit
f20a6f0d43
  1. 9
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs

9
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs

@ -65,13 +65,8 @@ namespace Volo.Abp.AspNetCore.Auditing
} }
var endpoint = httpContext.GetEndpoint(); var endpoint = httpContext.GetEndpoint();
if (endpoint == null) var actionDescriptor = endpoint?.Metadata.GetMetadata<ActionDescriptor>();
{ if (!(actionDescriptor is ControllerActionDescriptor))
return false;
}
var actionDescriptor = endpoint.Metadata.GetMetadata<ActionDescriptor>();
if (actionDescriptor != null && !(actionDescriptor is ControllerActionDescriptor))
{ {
return false; return false;
} }

Loading…
Cancel
Save