Table of Contents

Class MtMemoryStream

Namespace
SharpPluginLoader.Core.IO
Assembly
SharpPluginLoader.Core.dll

Represents a memory stream.

public class MtMemoryStream : MtStream, IDisposable
Inheritance
MtMemoryStream
Implements
Inherited Members

Constructors

MtMemoryStream()

public MtMemoryStream()

MtMemoryStream(nint)

public MtMemoryStream(nint instance)

Parameters

instance nint

Properties

Buffer

The buffer of this memory stream.

public nint Buffer { get; }

Property Value

nint

IsBufferOverflowed

Whether this memory stream is overflowed.

public bool IsBufferOverflowed { get; }

Property Value

bool

Mode

Gets the mode this memory stream was created with.

public MemoryStreamMode Mode { get; }

Property Value

MemoryStreamMode

Methods

Create()

Creates a new expandable memory stream.

public static MtMemoryStream? Create()

Returns

MtMemoryStream

The new memory stream or null if it could not be created.

Create(byte[])

Creates a new memory stream from the specified buffer.

public static MtMemoryStream? Create(byte[] buffer)

Parameters

buffer byte[]

The buffer to use

Returns

MtMemoryStream

The new memory stream or null if it could not be created.

Remarks

Note that the memory stream returned by this method is not expandable. It also does not take ownership of the buffer.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~MtMemoryStream()

protected ~MtMemoryStream()