Skip to content

Commit

Permalink
rename variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMagnan committed Mar 23, 2020
1 parent 36e6242 commit 1b74113
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Main/Source/NMemory.Shared/Tables/IdentityField.cs
Expand Up @@ -53,7 +53,7 @@ internal IdentityField(IdentitySpecification<TEntity> identitySpecification)
this.identityGetter = this.identitySpecification.IdentityColumn.Compile();
}

internal void InitializeBasedOnData(IEnumerable<TEntity> initialEntities, bool isBeginAt1 = false)
internal void InitializeBasedOnData(IEnumerable<TEntity> initialEntities, bool forceMinValue = false)
{
long? currentNextIdentity = null;

Expand All @@ -72,7 +72,7 @@ internal void InitializeBasedOnData(IEnumerable<TEntity> initialEntities, bool i
if (currentNextIdentity.HasValue)
{
var nextValue = currentNextIdentity.Value + this.identitySpecification.Increment;
this.nextIdentity = nextValue > 0 ? nextValue : isBeginAt1 ? 1 : nextValue;
this.nextIdentity = nextValue > 0 ? nextValue : forceMinValue ? 1 : nextValue;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Main/Source/NMemory.Shared/Tables/Table`2.cs
Expand Up @@ -696,11 +696,11 @@ protected virtual void GenerateIdentityFieldValue(TEntity entity)
}
}

protected void CalculateIdentityFeed(bool isBeginAt1 = false)
protected void CalculateIdentityFeed(bool forceMinValue = false)
{
if (this.identityField != null)
{
this.identityField.InitializeBasedOnData(this.primaryKeyIndex.SelectAll(), isBeginAt1);
this.identityField.InitializeBasedOnData(this.primaryKeyIndex.SelectAll(), forceMinValue);
}
}

Expand Down

0 comments on commit 1b74113

Please sign in to comment.