From ca7c88cef61a417b1b96e4bc430c95370363b46f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 16 Sep 2025 22:07:05 -0400 Subject: [PATCH] Add better summaries for things --- .../Wrappers/WrapperBase.cs | 14 ++++++++++++++ .../Wrappers/WrapperBaseT.cs | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/SabreTools.Serialization/Wrappers/WrapperBase.cs b/SabreTools.Serialization/Wrappers/WrapperBase.cs index 047af8dd..8b1d2c2c 100644 --- a/SabreTools.Serialization/Wrappers/WrapperBase.cs +++ b/SabreTools.Serialization/Wrappers/WrapperBase.cs @@ -70,6 +70,7 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Underlying data for the wrapper protected WrapperBase(byte[] data) : this(data, 0, data.Length) { @@ -78,6 +79,8 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Underlying data for the wrapper + /// Offset into the data to use as the window start protected WrapperBase(byte[] data, int offset) : this(data, offset, data.Length - offset) { @@ -86,6 +89,10 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Underlying data for the wrapper + /// Offset into the data to use as the window start + /// Length of the window into the data + /// protected WrapperBase(byte[] data, int offset, int length) { if (offset < 0 || offset >= data.Length) @@ -103,6 +110,7 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Underlying data for the wrapper /// Uses the current stream position as the offset protected WrapperBase(Stream data) : this(data, data.Position, data.Length - data.Position) @@ -112,6 +120,8 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Underlying data for the wrapper + /// Offset into the data to use as the window start protected WrapperBase(Stream data, long offset) : this(data, offset, data.Length - offset) { @@ -120,6 +130,10 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Underlying data for the wrapper + /// Offset into the data to use as the window start + /// Length of the window into the data + /// protected WrapperBase(Stream data, long offset, long length) { if (!data.CanSeek || !data.CanRead) diff --git a/SabreTools.Serialization/Wrappers/WrapperBaseT.cs b/SabreTools.Serialization/Wrappers/WrapperBaseT.cs index 3f4a58cc..ee7fcd6e 100644 --- a/SabreTools.Serialization/Wrappers/WrapperBaseT.cs +++ b/SabreTools.Serialization/Wrappers/WrapperBaseT.cs @@ -22,6 +22,8 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper protected WrapperBase(T model, byte[] data) : this(model, data, 0, data.Length) { @@ -30,6 +32,9 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper + /// Offset into the data to use as the window start protected WrapperBase(T model, byte[] data, int offset) : this(model, data, offset, data.Length - offset) { @@ -38,6 +43,10 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a byte array /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper + /// Offset into the data to use as the window start + /// Length of the window into the data protected WrapperBase(T model, byte[] data, int offset, int length) : base(data, offset, length) { @@ -51,6 +60,8 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper /// Uses the current stream position as the offset protected WrapperBase(T model, Stream data) : this(model, data, data.Position, data.Length - data.Position) @@ -60,6 +71,9 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper + /// Offset into the data to use as the window start protected WrapperBase(T model, Stream data, long offset) : this(model, data, offset, data.Length - offset) { @@ -68,6 +82,10 @@ namespace SabreTools.Serialization.Wrappers /// /// Construct a new instance of the wrapper from a Stream /// + /// Model to be used in the wrapper + /// Underlying data for the wrapper + /// Offset into the data to use as the window start + /// Length of the window into the data protected WrapperBase(T model, Stream data, long offset, long length) : base(data, offset, length) {