Showing 21 of 167 total issues
Method Initialize
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void Initialize(IFileContextScopedOptions options, IEntityType entityType, object keyValueFactory)
{
_options = options;
_entityType = entityType;
_propertyKeys = entityType.GetProperties().Select(p => p.GetColumnName()).ToArray();
Method ExecuteTransaction
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public virtual int ExecuteTransaction(
IList<IUpdateEntry> entries,
IDiagnosticsLogger<DbLoggerCategory.Update> updateLogger)
{
var rowsAffected = 0;
Method GetOrCreate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
public static object Deserialize(this string input, Type type)
{
if (string.IsNullOrEmpty(input))
{
return type.GetDefaultValue();
Method AddEntityFrameworkFileContextDatabase
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
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
Open
[NotNull] this DbContextOptionsBuilder optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method WithCustomOptions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public virtual FileContextOptionsExtension WithCustomOptions(string databaseName, string location, string password, Type storeManagerType, Type serializerType, Type fileManagerType)
Method UseFileContextDatabase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[NotNull] this DbContextOptionsBuilder optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method UseFileContextDatabase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method UseFileContextDatabase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[NotNull] this DbContextOptionsBuilder optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method UseFileContextDatabase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method UseFileContextDatabase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[NotNull] this DbContextOptionsBuilder<TContext> optionsBuilder,
string databaseName = "",
string location = null,
string password = null,
[CanBeNull] FileContextDatabaseRoot databaseRoot = null,
Method CreateFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static Func<IFileContextTable> CreateFactory<TKey>(IKey key, IEntityType entityType, bool sensitiveLoggingEnabled, IFileContextScopedOptions options, IServiceProvider serviceProvider)
Avoid too many return
statements within this method. Open
Open
return _inMemoryStore.GetIntegerValueGenerator<sbyte>(property);
Avoid too many return
statements within this method. Open
Open
return arr.ToArray();
Avoid too many return
statements within this method. Open
Open
return Enum.Parse(type, input);
Avoid too many return
statements within this method. Open
Open
return _inMemoryStore.GetIntegerValueGenerator<ulong>(property);
Avoid too many return
statements within this method. Open
Open
return _inMemoryStore.GetIntegerValueGenerator<uint>(property);
Avoid too many return
statements within this method. Open
Open
return _inMemoryStore.GetIntegerValueGenerator<ushort>(property);