/// <summary> /// Writes the content of a buffer into a LargeObject. /// </summary> /// <param name="buffer">The buffer.</param> /// <param name="largeObject">The large object.</param> /// <param name="rpu">The rpu.</param> /// <param name="caller">The calling object.</param> /// <remarks>Documented by Dev02, 2008-08-08</remarks> private void BufferToLargeObject(byte[] buffer, LargeObject largeObject, StatusMessageReportProgress rpu, object caller) { largeObject.Seek(0); int offset = 0; int size = buffer.Length; StatusMessageEventArgs args = new StatusMessageEventArgs(StatusMessageType.CreateMediaProgress, buffer.Length); while (offset < size) { largeObject.Write(buffer, offset, Math.Min(chunkSize, size - offset)); offset += chunkSize; args.Progress = offset; if (rpu != null) rpu(args, caller); } }
/// <summary> /// Writes the content of a buffer into a LargeObject. /// </summary> /// <param name="buffer">The buffer.</param> /// <param name="largeObject">The large object.</param> /// <remarks>Documented by Dev02, 2008-08-08</remarks> private void BufferToLargeObject(byte[] buffer, LargeObject largeObject) { largeObject.Seek(0); int offset = 0; int size = buffer.Length; while (offset < size) { largeObject.Write(buffer, offset, Math.Min(chunkSize, size - offset)); offset += chunkSize; } }