diff --git a/SabreTools.Serialization/Wrappers/DataSource.cs b/SabreTools.Serialization/Wrappers/DataSource.cs index d17fce9c..7bbe73ea 100644 --- a/SabreTools.Serialization/Wrappers/DataSource.cs +++ b/SabreTools.Serialization/Wrappers/DataSource.cs @@ -70,25 +70,6 @@ namespace SabreTools.Serialization.Wrappers #region Data - /// - /// Get the ending offset of the source - /// - /// Value greater than 0 for a valid end of file, -1 on error - public long GetEndOffset() - { - // Validate the data souece - if (!IsValid()) - return -1; - - // Return the effective endpoint - return _dataSourceType switch - { - DataSourceType.ByteArray => _byteArrayData!.Length - _initialPosition, - DataSourceType.Stream => _streamData!.Length - _initialPosition, - _ => -1, - }; - } - /// /// Get the filename from the source, if possible /// @@ -156,7 +137,7 @@ namespace SabreTools.Serialization.Wrappers return false; // If we have an invalid position - if (position < 0 || position >= GetEndOffset()) + if (position < 0 || position >= GetLength()) return false; return _dataSourceType switch