morrisjdev/FileContextCore

View on GitHub

Showing 21 of 167 total issues

Method Initialize has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void Initialize(IFileContextScopedOptions options, IEntityType entityType, object keyValueFactory)
        {
            _options = options;
            _entityType = entityType;
            _propertyKeys = entityType.GetProperties().Select(p => p.GetColumnName()).ToArray();
Severity: Major
Found in FileContextCore/StoreManager/EXCELStoreManager.cs - About 2 hrs to fix

    Method ExecuteTransaction has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public virtual int ExecuteTransaction(
                IList<IUpdateEntry> entries,
                IDiagnosticsLogger<DbLoggerCategory.Update> updateLogger)
            {
                var rowsAffected = 0;
    Severity: Minor
    Found in FileContextCore/Storage/Internal/FileContextStore.cs - About 1 hr to fix

      Method GetOrCreate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private ValueGenerator GetOrCreate(IProperty property)
              {
                  Check.NotNull(property, nameof(property));
      
                  var type = property.ClrType.UnwrapNullableType().UnwrapEnumType();

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

                public static object Deserialize(this string input, Type type)
                {
                    if (string.IsNullOrEmpty(input))
                    {
                        return type.GetDefaultValue();
        Severity: Minor
        Found in FileContextCore/Serializer/SerializerHelper.cs - About 1 hr to fix

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

                  public static IServiceCollection AddEntityFrameworkFileContextDatabase([NotNull] this IServiceCollection serviceCollection)
                  {
                      Check.NotNull(serviceCollection, nameof(serviceCollection));
          
                      var builder = new EntityFrameworkServicesBuilder(serviceCollection)

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

                        protected override Expression VisitBinary(BinaryExpression binaryExpression)
                        {
                            if (binaryExpression.NodeType == ExpressionType.Assign
                                && binaryExpression.Left is ParameterExpression parameterExpression
                                && parameterExpression.Type == typeof(MaterializationContext))

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

                          [NotNull] this DbContextOptionsBuilder optionsBuilder,
                          string databaseName = "",
                          string location = null,
                          string password = null,
                          [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
              Severity: Minor
              Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                        public virtual FileContextOptionsExtension WithCustomOptions(string databaseName, string location, string password, Type storeManagerType, Type serializerType, Type fileManagerType)
                Severity: Minor
                Found in FileContextCore/Infrastructure/Internal/FileContextOptionsExtension.cs - About 45 mins to fix

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

                              [NotNull] this DbContextOptionsBuilder optionsBuilder,
                              string databaseName = "",
                              string location = null,
                              string password = null,
                              [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
                  Severity: Minor
                  Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                                [NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
                                string databaseName = "",
                                string location = null,
                                string password = null,
                                [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
                    Severity: Minor
                    Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                                  [NotNull] this DbContextOptionsBuilder optionsBuilder,
                                  string databaseName = "",
                                  string location = null,
                                  string password = null,
                                  [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
                      Severity: Minor
                      Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                                    [NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
                                    string databaseName = "",
                                    string location = null,
                                    string password = null,
                                    [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
                        Severity: Minor
                        Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                                      [NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
                                      string databaseName = "",
                                      string location = null,
                                      string password = null,
                                      [CanBeNull] FileContextDatabaseRoot databaseRoot = null,
                          Severity: Minor
                          Found in FileContextCore/Extensions/FileContextDbContextOptionsExtensions.cs - About 45 mins to fix

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

                                    private static Func<IFileContextTable> CreateFactory<TKey>(IKey key, IEntityType entityType, bool sensitiveLoggingEnabled, IFileContextScopedOptions options, IServiceProvider serviceProvider)
                            Severity: Minor
                            Found in FileContextCore/Storage/Internal/FileContextTableFactory.cs - About 35 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return _inMemoryStore.GetIntegerValueGenerator<sbyte>(property);

                                Avoid too many return statements within this method.
                                Open

                                                return arr.ToArray();
                                Severity: Major
                                Found in FileContextCore/Serializer/SerializerHelper.cs - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return Enum.Parse(type, input);
                                  Severity: Major
                                  Found in FileContextCore/Serializer/SerializerHelper.cs - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return _inMemoryStore.GetIntegerValueGenerator<ulong>(property);

                                      Avoid too many return statements within this method.
                                      Open

                                                      return _inMemoryStore.GetIntegerValueGenerator<uint>(property);

                                        Avoid too many return statements within this method.
                                        Open

                                                        return _inMemoryStore.GetIntegerValueGenerator<ushort>(property);
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language