Initial sync
This commit is contained in:
9
Test/StreamMark.cs
Executable file
9
Test/StreamMark.cs
Executable file
@@ -0,0 +1,9 @@
|
||||
namespace Nbt.Test;
|
||||
|
||||
public readonly struct StreamMark(Stream stream) : IDisposable
|
||||
{
|
||||
private readonly Stream _stream = stream;
|
||||
private readonly long _pos = stream.Position;
|
||||
|
||||
public void Dispose() => _stream.Position = _pos;
|
||||
}
|
||||
Reference in New Issue
Block a user