Skip to content

Commit

Permalink
Added Span Write methods to EndianMemoryStream
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin113D committed Feb 8, 2023
1 parent 48bf758 commit 3605146
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Reloaded.Memory/PublicAPI/net5.0/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ Reloaded.Memory.Streams.Writers.EndianMemoryStream.EndianMemoryStream(Reloaded.M
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Stream.get -> Reloaded.Memory.Streams.ExtendedMemoryStream
Reloaded.Memory.Streams.Writers.EndianMemoryStream.ToArray() -> byte[]
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(byte[] data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.ReadOnlySpan<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.Span<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.~EndianMemoryStream() -> void
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream.LittleEndianMemoryStream(Reloaded.Memory.Streams.ExtendedMemoryStream stream) -> void
Expand Down
2 changes: 2 additions & 0 deletions Source/Reloaded.Memory/PublicAPI/net6.0/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ Reloaded.Memory.Streams.Writers.EndianMemoryStream.EndianMemoryStream(Reloaded.M
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Stream.get -> Reloaded.Memory.Streams.ExtendedMemoryStream
Reloaded.Memory.Streams.Writers.EndianMemoryStream.ToArray() -> byte[]
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(byte[] data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.ReadOnlySpan<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.Span<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.~EndianMemoryStream() -> void
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream.LittleEndianMemoryStream(Reloaded.Memory.Streams.ExtendedMemoryStream stream) -> void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ Reloaded.Memory.Streams.Writers.EndianMemoryStream.EndianMemoryStream(Reloaded.M
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Stream.get -> Reloaded.Memory.Streams.ExtendedMemoryStream
Reloaded.Memory.Streams.Writers.EndianMemoryStream.ToArray() -> byte[]
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(byte[] data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.ReadOnlySpan<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.Span<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.~EndianMemoryStream() -> void
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream.LittleEndianMemoryStream(Reloaded.Memory.Streams.ExtendedMemoryStream stream) -> void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ Reloaded.Memory.Streams.Writers.EndianMemoryStream.EndianMemoryStream(Reloaded.M
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Stream.get -> Reloaded.Memory.Streams.ExtendedMemoryStream
Reloaded.Memory.Streams.Writers.EndianMemoryStream.ToArray() -> byte[]
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(byte[] data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.ReadOnlySpan<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.Write(System.Span<byte> data) -> void
Reloaded.Memory.Streams.Writers.EndianMemoryStream.~EndianMemoryStream() -> void
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream
Reloaded.Memory.Streams.Writers.LittleEndianMemoryStream.LittleEndianMemoryStream(Reloaded.Memory.Streams.ExtendedMemoryStream stream) -> void
Expand Down
10 changes: 10 additions & 0 deletions Source/Reloaded.Memory/Streams/Writers/EndianMemoryStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ public void Dispose()
/// </summary>
public void Write(byte[] data) => Stream.Write(data);

/// <summary>
/// Appends bytes onto the given <see cref="MemoryStream"/> and advances the position.
/// </summary>
public void Write(Span<byte> data) => Stream.Write(data);

/// <summary>
/// Appends bytes onto the given <see cref="MemoryStream"/> and advances the position.
/// </summary>
public void Write(ReadOnlySpan<byte> data) => Stream.Write(data);

/// <summary>
/// Appends an unmanaged structure onto the <see cref="MemoryStream"/> and advances the position.
/// </summary>
Expand Down

0 comments on commit 3605146

Please sign in to comment.