mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-23 07:14:57 +00:00
Add initial position to wrapper, currently unused
This commit is contained in:
@@ -51,6 +51,12 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// </summary>
|
||||
private readonly object _streamDataLock = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initial position of the data source
|
||||
/// </summary>
|
||||
/// <remarks>Populated for both <see cref="DataSource.ByteArray"/> and <see cref="DataSource.Stream"/></remarks>
|
||||
protected long _initialPosition = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Source byte array data
|
||||
/// </summary>
|
||||
@@ -108,6 +114,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
|
||||
Model = model;
|
||||
_dataSource = DataSource.ByteArray;
|
||||
_initialPosition = offset;
|
||||
_byteArrayData = data;
|
||||
_byteArrayOffset = offset;
|
||||
}
|
||||
@@ -126,6 +133,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
|
||||
Model = model;
|
||||
_dataSource = DataSource.Stream;
|
||||
_initialPosition = data.Position;
|
||||
_streamData = data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user