Showing 90 of 368 total issues
Method Intercept
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void IInterceptor.Intercept(IInvocation invocation)
{
EnsureArg.IsNotNull(invocation, nameof(invocation));
PreExecute(invocation);
Class AuditDataProvider
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public sealed class AuditDataProvider : Audit.Core.AuditDataProvider
{
private readonly IServiceProvider _serviceProvider;
private readonly EntityAuditingOptions _options;
File AuditAttributesHelper.cs
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
File FileUploadValidators.cs
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.IO;
using FluentAssertions;
using OneBeyond.Studio.Crosscuts.Utilities.FileUploadValidators;
using OneBeyond.Studio.Crosscuts.Utilities.FileUploadValidators.ImageValidators;
Method ExtractIntegrationEventTypes
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static IReadOnlyDictionary<string, List<IntegrationEventType>> ExtractIntegrationEventTypes(
IReadOnlyCollection<Assembly> integrationEventAssemblies)
{
var integrationEventTypes = integrationEventAssemblies
.SelectMany((assembly) => assembly.GetTypes())
Method DispatchAsync
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async Task IPostSaveDomainEventDispatcher.DispatchAsync(
DomainEvent domainEvent,
IReadOnlyDictionary<string, object>? domainEventAmbientContext,
CancellationToken cancellationToken)
{
Method GetRangeExpressionForDate
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Expression GetRangeExpressionForDate(
Expression propertyExpression,
string[] dateValuesAsString)
{
if (dateValuesAsString.Length != 2)
Method DispatchAsync
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async Task IIntegrationEventDispatcher.DispatchAsync(
IntegrationEvent integrationEvent,
CancellationToken cancellationToken)
{
EnsureArg.IsNotNull(integrationEvent, nameof(integrationEvent));
Method ProcessEventAsync
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async Task<object> ProcessEventAsync(
Audit.Core.AuditEvent auditEvent,
CancellationToken cancellationToken)
{
if (auditEvent is not AuditEventEntityFramework efAudit)
Method BuildExpressionTest
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Fact]
public void BuildExpressionTest()
{
var testGuid = Guid.NewGuid();
var today = DateTime.Today.ToString();
Method RunAsync
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task RunAsync(
Func<RaisedDomainEvent, CancellationToken, Task> processAsync,
CancellationToken cancellationToken)
{
EnsureArg.IsNotNull(processAsync, nameof(processAsync));
Method GetRangeExpressionForDateTimeOffset
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Expression GetRangeExpressionForDateTimeOffset(
Expression propertyExpression,
string[] dateTimeOffsetValuesAsString)
{
if (dateTimeOffsetValuesAsString.Length != 2)
Method AddCollectionNavigationChanges
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void AddCollectionNavigationChanges(
IEnumerable<EventEntry> allChanges,
EventEntry currentEntry,
AuditEvent auditEventEntity,
CollectionEntry navigation)
Method GetRangeExpressionForDateOnly
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Expression GetRangeExpressionForDateOnly(
Expression propertyExpression,
string[] dateValuesAsString)
{
if (dateValuesAsString.Length != 2)
Method TestAnonymousTypeGetById
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[TestMethod]
public async Task TestAnonymousTypeGetById()
{
var product1 = new Product("ring", "jewelery", "cartier", 999.99M, "france");
Method RunAsync
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task RunAsync(
Func<byte[], CancellationToken, Task> processAsync,
CancellationToken cancellationToken)
{
EnsureArg.IsNotNull(processAsync, nameof(processAsync));
Method RunAsync
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task RunAsync(
Func<byte[], CancellationToken, Task> processAsync,
CancellationToken cancellationToken)
{
EnsureArg.IsNotNull(processAsync, nameof(processAsync));
Method IsStringFunction
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static bool IsStringFunction(string valueToken, out MethodInfo? function, out string? argument)
{
valueToken = valueToken.Trim();
function = default;
argument = default;
Method TestFileValidatorShouldAcceptImages
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Fact]
public void TestFileValidatorShouldAcceptImages()
{
var validator = new FileValidatorBuilder().AllowImages();
Method TestFileValidatorShouldAcceptSpreadhsheets
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[Fact]
public void TestFileValidatorShouldAcceptSpreadhsheets()
{
var validator = new FileValidatorBuilder().AllowSpreadsheet();