/// <summary> /// Writes an array of <typeparamref name="T"/> into the buffer /// </summary> /// <typeparam name="T">A structure type</typeparam> /// <param name="bufferPosition">The destination offset within the buffer region of the shared memory.</param> /// <param name="buffer">The source buffer</param> /// <param name="index">The start index within <paramref name="buffer"/>.</param> /// <param name="count">The number of elements to write.</param> protected virtual void WriteArray <T>(long bufferPosition, T[] buffer, int index, int count) where T : struct { FastStructure.WriteArray <T>((IntPtr)(BufferStartPtr + bufferPosition), buffer, 0, buffer.Length); }
/// <summary> /// Writes an array of <typeparamref name="T"/> into the buffer /// </summary> /// <typeparam name="T">A structure type</typeparam> /// <param name="buffer">An array of <typeparamref name="T"/> to be written. The length of this array controls the number of elements to be written.</param> /// <param name="bufferPosition">The offset within the buffer region of the shared memory to write to.</param> protected virtual void Write <T>(T[] buffer, long bufferPosition = 0) where T : struct { FastStructure.WriteArray <T>((IntPtr)(BufferStartPtr + bufferPosition), buffer, 0, buffer.Length); //View.WriteArray(BufferOffset + bufferPosition, buffer, 0, buffer.Length); }