예제 #1
0
 public unsafe bool TryGetArray(out ArraySegment<T> buffer)
 {
     if (!_owner.TryGetArrayInternal(_id, out buffer)) {
         return false;
     }
     buffer = new ArraySegment<T>(buffer.Array, buffer.Offset + _index, _length);
     return true;
 }
예제 #2
0
 public bool TryGetArray(out ArraySegment <T> buffer)
 {
     if (!_owner.TryGetArrayInternal(out buffer))
     {
         return(false);
     }
     buffer = new ArraySegment <T>(buffer.Array, buffer.Offset + _index, _length);
     return(true);
 }