예제 #1
0
 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);
     }
 }
예제 #2
0
 public IWriter Get(int length) => new MemoryWriter(_policy.GetOwnedArray <byte>(length), _sizing, length);