[This is preliminary documentation and is subject to change.]

The UnmanagedMemoryStream type exposes the following members.

Constructors

  NameDescription
UnmanagedMemoryStreamOverloaded.

Methods

  NameDescription
BeginRead
Begins an asynchronous read operation.
(Inherited from Stream.)
BeginWrite
Begins an asynchronous write operation.
(Inherited from Stream.)
Close
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
(Inherited from Stream.)
CreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
CreateWaitHandle Obsolete.
Allocates a WaitHandle object.
(Inherited from Stream.)
DisposeOverloaded.
EndRead
Waits for the pending asynchronous read to complete.
(Inherited from Stream.)
EndWrite
Ends an asynchronous write operation.
(Inherited from Stream.)
Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize
Releases the memory associated with the stream, if any.
(Overrides Object..::.Finalize()()().)
Flush
"Flush" the contents of the stream. This operation does nothing.
(Overrides Stream..::.Flush()()().)
GetHashCode
Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
InitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
MemberwiseCloneOverloaded.
Read
Read count bytes from the current position in the stream, and place them into the buffer starting at the given offset. The position will be updated to the point after the last byte read.
(Overrides Stream..::.Read(array<Byte>[]()[], Int32, Int32).)
ReadByte
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
(Inherited from Stream.)
Reserve
Reserve a certain amount of space in the buffer, to minimize the need for reallocations if you already know how much space will be needed.
Seek
Seek to a specific position in the stream.
(Overrides Stream..::.Seek(Int64, SeekOrigin).)
SetLength
Set the length of the stream. If the new length of the stream is larger than the old length, the contents of the stream from the old length to the new length are undefined.
(Overrides Stream..::.SetLength(Int64).)
ToString
Returns a String that represents the current Object.
(Inherited from Object.)
Write
Write data into unmanaged memory. If the write would continue past the end of the memory stream, the memory stream is expanded.
(Overrides Stream..::.Write(array<Byte>[]()[], Int32, Int32).)
WriteByte
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Inherited from Stream.)

Fields

  NameDescription
DefaultMemoryFromMPI
Whether memory comes from the MPI allocation routines by default.

Properties

  NameDescription
Buffer
Retrieve a pointer to the unmanaged memory buffer. Since this buffer is pointing into unmanaged memory, it does not need to be pinned.
CanRead
Whether the stream can be read from. Always true.
(Overrides Stream..::.CanRead.)
CanSeek
Whether one can seek in the stream. Always true.
(Overrides Stream..::.CanSeek.)
CanTimeout
Gets a value that determines whether the current stream can time out.
(Inherited from Stream.)
CanWrite
Whether on can write to the stream. Always true.
(Overrides Stream..::.CanWrite.)
Capacity
The amount of space in the unmanaged memory buffer. This can be larger than the length of the stream. If you know how many bytes will be written to the stream, you might want to set the capacity (either via this property or through Reserve(Int64)) large enough to avoid resizing the stream multiple times.
Length
The length of the stream, in bytes.
(Overrides Stream..::.Length.)
Position
Reports or sets the position in the stream.
(Overrides Stream..::.Position.)
ReadTimeout
Gets or sets a value that determines how long the stream will attempt to read before timing out.
(Inherited from Stream.)
WriteTimeout
Gets or sets a value that determines how long the stream will attempt to write before timing out.
(Inherited from Stream.)

See Also