onebeyond/onebeyond-studio-core

View on GitHub

Showing 90 of 368 total issues

Method CreateEntity has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static TableEntity CreateEntity(AuditEvent auditEntityEvent, JToken changes, bool expandValuesInTableColumns)
    {
        EnsureArg.IsNotNull(auditEntityEvent, nameof(auditEntityEvent));

        // Need to turn the identity into a string key (if is an int, pad to 10 digits)

    Method Build has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static Expression<Func<T, bool>>? Build(
            IReadOnlyDictionary<string, IReadOnlyCollection<string>> query,
            CombineTypes combineType = CombineTypes.AND)
        {
            EnsureArg.IsNotNull(query, nameof(query));

      Method GetEqualsExpressionForType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private static Expression GetEqualsExpressionForType(
              Expression propertyExpression,
              ConstantExpression someValue)
          {
              switch (propertyExpression.Type.IsEnum ? "Enum" : propertyExpression.Type.Name)

        Method EnsurePropertiesOverrideFuncAttrCache has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static Dictionary<string, AuditPropertyValueProviderAttribute> EnsurePropertiesOverrideFuncAttrCache(Type type)
            {
                if (!_propertiesOverrideFuncAttrCache.ContainsKey(type))
                {
                    var overrideProps = new Dictionary<string, AuditPropertyValueProviderAttribute>();

          Method ComplexReplacementCase has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              [Fact]
              public void ComplexReplacementCase()
              {
                  ITemplateRenderer renderer = new HandleBarsTemplateRenderer();
          
          
          Severity: Minor
          Found in src/OneBeyond.Studio.Crosscuts.Tests/HandleBarsTemplateTests.cs - About 1 hr to fix

            Method IsNumeric has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static bool IsNumeric(this Type type)
                {
                    EnsureArg.IsNotNull(type, nameof(type));
            
                    switch (Type.GetTypeCode(type))
            Severity: Minor
            Found in src/OneBeyond.Studio.Crosscuts/Reflection/TypeExtensions.cs - About 1 hr to fix

              Method Execute has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected override T Execute<T>(ISyncExecution<T> execution)
                  {
                      using (var saveChangesCall = InterceptSaveChangesCall(execution))
                      {
                          var entityDomainEvents = default(EntityDomainEventList);

                Method Throwing_When_Existing_Queue_With_Sessions_Accessed_Without_SessionId_In_Options has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    [TestMethod]
                    public async Task Throwing_When_Existing_Queue_With_Sessions_Accessed_Without_SessionId_In_Options()
                    {
                        if (_connectionString.IsNullOrEmpty())
                        {

                  Method MissingVariablesShouldBeRemoved has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      [Fact]
                      public void MissingVariablesShouldBeRemoved()
                      {
                          ITemplateRenderer renderer = new HandleBarsTemplateRenderer();
                  
                  
                  Severity: Minor
                  Found in src/OneBeyond.Studio.Crosscuts.Tests/HandleBarsTemplateTests.cs - About 1 hr to fix

                    Method ToEntityProperty has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static object ToEntityProperty(this JToken value)
                        {
                            switch (value.Type)
                            {
                                case JTokenType.Boolean:

                      Method AddManyToManyNavigationChanges has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              IEnumerable<EventEntry> allChanges,
                              AuditEvent auditEventEntity,
                              CollectionEntry navigation,
                              string navigationName,
                              Type navigationType,

                        Method ReadJson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public override TEnum ReadJson(JsonReader reader, Type objectType, TEnum existingValue, bool hasExistingValue, JsonSerializer serializer)

                          Method ListAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  Expression<Func<TEntity, TResultDto>> projection,
                                  Expression<Func<TEntity, bool>>? filter = null,
                                  Paging? paging = null,
                                  IReadOnlyCollection<Sorting<TEntity>>? sortings = null,
                                  CancellationToken cancellationToken = default)
                          Severity: Minor
                          Found in src/OneBeyond.Studio.DataAccess.EFCore/Repositories/BaseRORepository.cs - About 35 mins to fix

                            Method ReadJson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public override TEnum ReadJson(JsonReader reader, Type objectType, TEnum? existingValue, bool hasExistingValue, JsonSerializer serializer)

                              Method ListAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      Expression<Func<TEntity, TResultDto>> projection,
                                      Expression<Func<TEntity, bool>>? filter = default,
                                      Paging? paging = default,
                                      IReadOnlyCollection<Sorting<TEntity>>? sortings = default,
                                      CancellationToken cancellationToken = default);

                                Method ReadJson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        JsonReader reader,
                                        Type objectType,
                                        TimeZoneInfo? existingValue,
                                        bool hasExistingValue,
                                        JsonSerializer serializer)
                                Severity: Minor
                                Found in src/OneBeyond.Studio.Crosscuts/Json/IanaTimeZoneInfoJsonConverter.cs - About 35 mins to fix

                                  Method ListAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          Expression<Func<TEntity, bool>>? filter = default,
                                          Includes<TEntity>? includes = default,
                                          Paging? paging = default,
                                          IReadOnlyCollection<Sorting<TEntity>>? sortings = default,
                                          CancellationToken cancellationToken = default);

                                    Method GetEventsByIdAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            TEntityId id,
                                            DateTimeOffset? dateFrom = null,
                                            DateTimeOffset? dateTo = null,
                                            Paging paging = null,
                                            CancellationToken cancellationToken = default)

                                      Method ListAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              Expression<Func<TEntity, bool>>? preFilter,
                                              Expression<Func<TResultDto, bool>>? filter = default,
                                              Paging? paging = default,
                                              IReadOnlyCollection<Sorting<TResultDto>>? sortings = default,
                                              CancellationToken cancellationToken = default);

                                        Method ListAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                Expression<Func<TEntity, bool>>? preFilter,
                                                Expression<Func<TResultDto, bool>>? filter = null,
                                                Paging? paging = null,
                                                IReadOnlyCollection<Sorting<TResultDto>>? sortings = null,
                                                CancellationToken cancellationToken = default)
                                        Severity: Minor
                                        Found in src/OneBeyond.Studio.DataAccess.EFCore/Repositories/BaseRORepository.cs - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language