(#15) Match Read documentation with Write methods

This commit is contained in:
Oliver Booth 2021-03-03 16:05:57 +00:00
parent 1ca85cc3cd
commit e0b19aff99
1 changed files with 48 additions and 48 deletions

View File

@ -54,23 +54,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two /// Writes a two-byte signed integer to the current stream using the system's default endian encoding, and advances
/// bytes using the default endian encoding. /// the stream position by two bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>A 2-byte signed integer read from the current stream.</returns> /// <returns>An two-byte signed integer read from the stream.</returns>
public static short ReadInt16(this Stream stream) public static short ReadInt16(this Stream stream)
{ {
return stream.ReadInt16(DefaultEndianness); return stream.ReadInt16(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two /// Writes a two-byte signed integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by two bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>A 2-byte signed integer read from the current stream.</returns> /// <returns>An two-byte unsigned integer read from the stream.</returns>
public static short ReadInt16(this Stream stream, Endianness endianness) public static short ReadInt16(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<short>(stream, endianness); var value = ReadInternal<short>(stream, endianness);
@ -78,23 +78,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four /// Writes a four-byte signed integer to the current stream using the system's default endian encoding, and advances
/// bytes using the default endian encoding. /// the stream position by four bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>A 4-byte signed integer read from the current stream.</returns> /// <returns>An four-byte signed integer read from the stream.</returns>
public static int ReadInt32(this Stream stream) public static int ReadInt32(this Stream stream)
{ {
return stream.ReadInt32(DefaultEndianness); return stream.ReadInt32(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four /// Writes a four-byte signed integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by four bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>A 4-byte signed integer read from the current stream.</returns> /// <returns>An four-byte unsigned integer read from the stream.</returns>
public static int ReadInt32(this Stream stream, Endianness endianness) public static int ReadInt32(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<int>(stream, endianness); var value = ReadInternal<int>(stream, endianness);
@ -102,23 +102,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight /// Writes an eight-byte signed integer to the current stream using the system's default endian encoding, and advances
/// bytes using the default endian encoding. /// the stream position by eight bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>An 8-byte signed integer read from the current stream.</returns> /// <returns>An eight-byte signed integer read from the stream.</returns>
public static long ReadInt64(this Stream stream) public static long ReadInt64(this Stream stream)
{ {
return stream.ReadInt64(DefaultEndianness); return stream.ReadInt64(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight /// Writes an eight-byte signed integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by eight bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>An 8-byte signed integer read from the current stream.</returns> /// <returns>An eight-byte unsigned integer read from the stream.</returns>
public static long ReadInt64(this Stream stream, Endianness endianness) public static long ReadInt64(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<long>(stream, endianness); var value = ReadInternal<long>(stream, endianness);
@ -126,23 +126,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads a 2-byte unsigned integer from the current stream and advances the current position of the stream by two /// Writes a two-byte unsigned integer to the current stream using the system's default endian encoding, and advances
/// bytes using the default endian encoding. /// the stream position by two bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>A 2-byte unsigned integer read from the current stream.</returns> /// <returns>An two-byte unsigned integer read from the stream.</returns>
public static ushort ReadUInt16(this Stream stream) public static ushort ReadUInt16(this Stream stream)
{ {
return stream.ReadUInt16(DefaultEndianness); return stream.ReadUInt16(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads a 2-byte unsigned integer from the current stream and advances the current position of the stream by two /// Writes a two-byte unsigned integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by two bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>A 2-byte unsigned integer read from the current stream.</returns> /// <returns>An two-byte unsigned integer read from the stream.</returns>
public static ushort ReadUInt16(this Stream stream, Endianness endianness) public static ushort ReadUInt16(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<ushort>(stream, endianness); var value = ReadInternal<ushort>(stream, endianness);
@ -150,23 +150,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads a 4-byte unsigned integer from the current stream and advances the current position of the stream by four /// Writes a four-byte unsigned integer to the current stream using the system's default endian encoding, and advances
/// bytes using the default endian encoding. /// the stream position by four bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>A 4-byte unsigned integer read from the current stream.</returns> /// <returns>An four-byte unsigned integer read from the stream.</returns>
public static uint ReadUInt32(this Stream stream) public static uint ReadUInt32(this Stream stream)
{ {
return stream.ReadUInt32(DefaultEndianness); return stream.ReadUInt32(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads a 4-byte unsigned integer from the current stream and advances the current position of the stream by four /// Writes a four-byte unsigned integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by four bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>A 4-byte unsigned integer read from the current stream.</returns> /// <returns>An four-byte unsigned integer read from the stream.</returns>
public static uint ReadUInt32(this Stream stream, Endianness endianness) public static uint ReadUInt32(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<uint>(stream, endianness); var value = ReadInternal<uint>(stream, endianness);
@ -174,23 +174,23 @@ namespace X10D.StreamExtensions
} }
/// <summary> /// <summary>
/// Reads an 8-byte unsigned integer from the current stream and advances the current position of the stream by eight /// Writes an eight-byte unsigned integer to the current stream using the system's default endian encoding, and
/// bytes using the default endian encoding. /// advances the stream position by eight bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <returns>An 8-byte unsigned integer read from the current stream.</returns> /// <returns>An eight-byte unsigned integer read from the stream.</returns>
public static ulong ReadUInt64(this Stream stream) public static ulong ReadUInt64(this Stream stream)
{ {
return stream.ReadUInt64(DefaultEndianness); return stream.ReadUInt64(DefaultEndianness);
} }
/// <summary> /// <summary>
/// Reads an 8-byte unsigned integer from the current stream and advances the current position of the stream by eight /// Writes an eight-byte unsigned integer to the current stream using the specified endian encoding, and advances the
/// bytes using a specified endian encoding. /// stream position by eight bytes.
/// </summary> /// </summary>
/// <param name="stream">The stream to read.</param> /// <param name="stream">The stream from which the value should be read.</param>
/// <param name="endianness">The endian encoding to use.</param> /// <param name="endianness">The endian encoding to use.</param>
/// <returns>An 8-byte unsigned integer read from the current stream.</returns> /// <returns>An eight-byte unsigned integer read from the stream.</returns>
public static ulong ReadUInt64(this Stream stream, Endianness endianness) public static ulong ReadUInt64(this Stream stream, Endianness endianness)
{ {
var value = ReadInternal<ulong>(stream, endianness); var value = ReadInternal<ulong>(stream, endianness);