public DataBlock Pooled(int size, DataBlockCallback callback) { byte[] data = new byte[size]; DataBlock block = new Block(data, 0, size); callback?.Invoke(data, 0, size); return(block); }
public DataBlock Pooled(int size, DataBlockCallback callback) { MemoryBlock found = context.Collection.Allocate(size); callback?.Invoke(found.Data, 0, size); return(found); }
public void With(DataBlockCallback callback) { callback.Invoke(data, offset, count); }
public void With(DataBlockCallback callback) { callback.Invoke(data, offset, data.Length - offset); }
public void With(DataBlockCallback callback) { callback.Invoke(new byte[size], 0, size); }
public void With(DataBlockCallback callback) { callback.Invoke(data, offset, length); }
public void With(DataBlockCallback callback) { callback.Invoke(read.Buffer.Data, offset, read.Count - offset); }