onebeyond/onebeyond-studio-core

View on GitHub

Showing 90 of 368 total issues

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

    private static Expression GetRangeExpressionForNumeric(
        Expression propertyExpression,
        string[] numericValuesAsString)
    {
        if (numericValuesAsString.Length != 2)

    Method BuildModel has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected override void BuildModel(ModelBuilder modelBuilder)
            {
    #pragma warning disable 612, 618
                modelBuilder
                    .HasDefaultSchema("audit")

      Method BuildTargetModel has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              protected override void BuildTargetModel(ModelBuilder modelBuilder)
              {
      #pragma warning disable 612, 618
                  modelBuilder
                      .HasDefaultSchema("audit")

        Method CompileDataAccessFunction has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static Action<TAggregateRoot> CompileDataAccessFunction(DataAccessPolicy<TAggregateRoot>? dataAccessPolicy)
            {
                var isDataAccessAllowed1 = dataAccessPolicy?.CanBeAccessedCriteria?.Compile();
                var isDataAccessAllowed2 = dataAccessPolicy?.CanBeAccessedFunction;
                if (isDataAccessAllowed1 is null

          Method Throws_when_override_scope_disposing_is_broken has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              [TestMethod]
              public void Throws_when_override_scope_disposing_is_broken()
              {
                  // Arrange
                  var containerBuilder = new ContainerBuilder();

            Method AddAuthorizationRequirementHandlers has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static ContainerBuilder AddAuthorizationRequirementHandlers(
                    this ContainerBuilder containerBuilder,
                    AuthorizationOptions authorizationOptions,
                    params Assembly[] handlerAssemblies)
                {

              Method EvaluateFilterItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static List<Expression> EvaluateFilterItems(
                      IReadOnlyCollection<FilterItem> filterItems,
                      ParameterExpression parameterExpression)
                  {
                      var expressions = new List<Expression>(filterItems.Count);

                Method TestAggregateRootUpdateMultipleEntitiesWithValidation has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    [TestMethod]
                    public async Task TestAggregateRootUpdateMultipleEntitiesWithValidation()
                    {
                        var vendorVasyaId = default(Guid);
                        var vendorPetyaId = default(Guid);
                Severity: Minor
                Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/AggregateRootTests.cs - About 1 hr to fix

                  Method TestRequirementHandlingSucceedsWhenHandlerDependsOnCommand has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      [TestMethod]
                      public async Task TestRequirementHandlingSucceedsWhenHandlerDependsOnCommand()
                      {
                          using (var serviceScope = ServiceProvider.CreateScope())
                          {

                    Method AddManyToManyNavigationChanges has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private void AddManyToManyNavigationChanges(
                            IEnumerable<EventEntry> allChanges,
                            AuditEvent auditEventEntity,
                            CollectionEntry navigation,
                            string navigationName,

                      Method Returns_context_based_on_override_scope has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          [TestMethod]
                          public void Returns_context_based_on_override_scope()
                          {
                              // Arrange
                              var containerBuilder = new ContainerBuilder();

                        Method ExecuteAsync has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected async override Task ExecuteAsync(CancellationToken stoppingToken)
                            {
                                Logger.LogInformation(
                                    "Start relaying domain events from {RaisedDomainEventReceiverCount} domain event receiver(s)",
                                    _raisedDomainEventReceivers.Count);
                        Severity: Minor
                        Found in src/OneBeyond.Studio.Hosting/DomainEvents/DomainEventRelayBase.cs - About 1 hr to fix

                          Method RunAsync has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public Task RunAsync(
                                  Func<IntegrationEvent, CancellationToken, Task> processAsync,
                                  CancellationToken cancellationToken)
                              {
                                  EnsureArg.IsNotNull(processAsync, nameof(processAsync));

                            Method GetRangeExpression has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private static Expression GetRangeExpression(
                                    Expression valueExpresion,
                                    Expression? gteValueExpression,
                                    Expression? lteValueExpression)
                                {

                              Method AddMediatorRequestHandlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static ContainerBuilder AddMediatorRequestHandlers(
                                      this ContainerBuilder containerBuilder,
                                      params Assembly[] requestHandlersAssemblies)
                                  {
                                      EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));

                                Method Handle has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public virtual async Task<PagedList<TResultDto>> Handle(
                                        TQuery query,
                                        CancellationToken cancellationToken)
                                    {
                                        EnsureArg.IsNotNull(query, nameof(query));

                                  Method TestIncludesTraitsWhereClauseDetection has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      [TestMethod]
                                      public void TestIncludesTraitsWhereClauseDetection()
                                      {
                                          var includes = new Includes<PurchaseOrder>()
                                              .Include((purchaseOrder) => purchaseOrder.Lines)

                                    Method EnsurePropertiesOverrideAttrCache has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private static Dictionary<string, AuditPropertyValueAttribute> EnsurePropertiesOverrideAttrCache(Type type)
                                        {
                                            if (!_propertiesOverrideAttrCache.ContainsKey(type))
                                            {
                                                var overrideProps = new Dictionary<string, AuditPropertyValueAttribute>();

                                      Method TestAggregateRootCreateMultipleEntitiesWithValidation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          [TestMethod]
                                          public async Task TestAggregateRootCreateMultipleEntitiesWithValidation()
                                          {
                                              var vendorVasyaId = default(Guid);
                                              var vendorPetyaId = default(Guid);
                                      Severity: Minor
                                      Found in src/OneBeyond.Studio.DataAccess.EFCore.Tests/AggregateRootTests.cs - About 1 hr to fix

                                        Method RunAsync has 27 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));
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language