Share via


MemoryOwner Constructors

Definition

Overloads

MemoryOwner(ArraySegment<Byte>)

Initializes a new instance of the MemoryOwner class with the specified ArraySegment<T>. Count will be used as the initial value for ValidLength.

MemoryOwner(IMemoryOwner<Byte>, Int32)

Initializes a new instance of the MemoryOwner class with the specified IMemoryOwner<T> and valid length.

MemoryOwner(Byte[], Int32)

Initializes a new instance of the MemoryOwner class with the specified byte[] and valid length.

MemoryOwner(ArraySegment<Byte>)

Initializes a new instance of the MemoryOwner class with the specified ArraySegment<T>. Count will be used as the initial value for ValidLength.

public MemoryOwner (ArraySegment<byte> data);
new System.Fabric.MemoryOwner : ArraySegment<byte> -> System.Fabric.MemoryOwner
Public Sub New (data As ArraySegment(Of Byte))

Parameters

data
ArraySegment<Byte>

The ArraySegment<T> to expose via Memory.

Applies to

MemoryOwner(IMemoryOwner<Byte>, Int32)

Initializes a new instance of the MemoryOwner class with the specified IMemoryOwner<T> and valid length.

public MemoryOwner (System.Buffers.IMemoryOwner<byte> owner, int validLength);
new System.Fabric.MemoryOwner : System.Buffers.IMemoryOwner<byte> * int -> System.Fabric.MemoryOwner
Public Sub New (owner As IMemoryOwner(Of Byte), validLength As Integer)

Parameters

owner
IMemoryOwner<Byte>

The IMemoryOwner<T> to expose via Memory. Must not be null.

validLength
Int32

The initial value for ValidLength. Must be >= 0 and <= owner.Memory.Length.

Applies to

MemoryOwner(Byte[], Int32)

Initializes a new instance of the MemoryOwner class with the specified byte[] and valid length.

public MemoryOwner (byte[] data, int validLength);
new System.Fabric.MemoryOwner : byte[] * int -> System.Fabric.MemoryOwner
Public Sub New (data As Byte(), validLength As Integer)

Parameters

data
Byte[]

The byte[] to expose via Memory. Must not be null.

validLength
Int32

The initial value for ValidLength. Must be >= 0 and <= data.Length.

Applies to