Add a pointer constructor back to StreamWrapper

This commit is contained in:
js6pak committed 2022-10-10 17:34:44 +02:00
1 parent da217c1627
commit 615f6b20e1
1 file changed
+6
@@ -21,6 +21,12 @@ public static class StreamExtensions
{ {
private readonly Stream _stream; private readonly Stream _stream;
/// <inheritdoc />
public StreamWrapper(IntPtr pointer) : base(pointer)
{
throw new NotSupportedException("This shouldn't ever be called because StreamWrapper is injected from managed side");
}
/// <inheritdoc /> /// <inheritdoc />
public StreamWrapper(Stream stream) : base(ClassInjector.DerivedConstructorPointer<StreamWrapper>()) public StreamWrapper(Stream stream) : base(ClassInjector.DerivedConstructorPointer<StreamWrapper>())
{ {