onebeyond/onebeyond-studio-core

View on GitHub

Showing 90 of 368 total issues

Method Intercept has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    void IInterceptor.Intercept(IInvocation invocation)
    {
        EnsureArg.IsNotNull(invocation, nameof(invocation));

        PreExecute(invocation);
Severity: Major
Found in src/OneBeyond.Studio.Crosscuts/DynamicProxy/InterceptorBase.cs - About 2 hrs to fix

    Class AuditDataProvider has 22 methods (exceeds 20 allowed). Consider refactoring.
    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

      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

        using System;
        using System.IO;
        using FluentAssertions;
        using OneBeyond.Studio.Crosscuts.Utilities.FileUploadValidators;
        using OneBeyond.Studio.Crosscuts.Utilities.FileUploadValidators.ImageValidators;
        Severity: Minor
        Found in src/OneBeyond.Studio.Crosscuts.Tests/FileUploadValidators.cs - About 2 hrs to fix

          Method ExtractIntegrationEventTypes has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          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

                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

                  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

                    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

                      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

                        [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

                          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

                            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

                              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

                                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

                                  [TestMethod]
                                  public async Task TestAnonymousTypeGetById()
                                  {
                                      var product1 = new Product("ring", "jewelery", "cartier", 999.99M, "france");
                              
                              
                              Severity: Minor
                              Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/AnonymousTypesTests.cs - About 1 hr to fix

                                Method RunAsync has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                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

                                      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

                                        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

                                          [Fact]
                                          public void TestFileValidatorShouldAcceptImages()
                                          {
                                              var validator = new FileValidatorBuilder().AllowImages();
                                      
                                      
                                      Severity: Minor
                                      Found in src/OneBeyond.Studio.Crosscuts.Tests/FileUploadValidators.cs - About 1 hr to fix

                                        Method TestFileValidatorShouldAcceptSpreadhsheets has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            [Fact]
                                            public void TestFileValidatorShouldAcceptSpreadhsheets()
                                            {
                                                var validator = new FileValidatorBuilder().AllowSpreadsheet();
                                        
                                        
                                        Severity: Minor
                                        Found in src/OneBeyond.Studio.Crosscuts.Tests/FileUploadValidators.cs - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language