/// <summary> /// Creates a new <see cref="SimpleMemory"/> instance from the specified data and its /// <see cref="SimpleMemoryAccessor"/> at the same time. /// </summary> /// <param name="data">The data to be put into the <see cref="SimpleMemory"/>.</param> /// <param name="accessor">The accessor of the return value.</param> /// <returns>The <see cref="SimpleMemory"/> containing the data.</returns> public static SimpleMemory Create(Memory <byte> data, out SimpleMemoryAccessor accessor) { var memory = new SimpleMemory(data, 0); accessor = new SimpleMemoryAccessor(memory); return(memory); }
public SimpleMemoryAccessor(SimpleMemory simpleMemory) { _simpleMemory = simpleMemory; }