Files
spark/src/cs/Bts.Collections/BlockTransactionMetadata.cs
T
John Colvin 2f7e75fec0 refactor: Break up Bts.Spark.Core into a few diff projs
This is in anticipation of decoupling BlueOrb from Spark.

* Bts.Collections
* Bts.Core
* Bts.Disposables
* Bts.Numerics
2026-03-03 15:06:06 +00:00

26 lines
870 B
C#

#nullable enable
namespace Spark.Core.Collections;
/// <summary>
/// Represents a unit of change that can be applied to a list. The only difference
/// between this struct and <see cref="BlockTrasaction{T}"/>, is that this has the
/// number of values to insert, while the latter has the actual list of values.
/// </summary>
public struct BlockTransactionMetadata {
public int SourceIndex;
public int DestIndex;
public int NumInserted;
public int NumRemoved;
public int CummulativeOffset;
public BlockTransactionMetadata(int sourceIndex, int destIndex, int numInserted, int numRemoved, int cummulativeOffset) {
SourceIndex = sourceIndex;
DestIndex = destIndex;
NumInserted = numInserted;
NumRemoved = numRemoved;
CummulativeOffset = cummulativeOffset;
}
public readonly int Offset => NumInserted - NumRemoved;
}