MemoryOwner Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- validLength
- Int32
The initial value for ValidLength. Must be >= 0 and <= data.Length.