public void GetOwnedArray_ShouldAllocateSimpleOwner_WhenSizeIs(int equalTo) { using (var array = _policy.GetOwnedArray <byte>(equalTo)) { Assert.False(array.Memory.IsEmpty); Assert.Equal(equalTo, array.Memory.Length); } }
public IWriter Get(int length) => new MemoryWriter(_policy.GetOwnedArray <byte>(length), _sizing, length);