public void MoveIn8PageAligned(short bar, long barOffset, int numToRead, byte[] inData, int offset) { if (Buffer8.ContainsKey(barOffset)) { byte[] contents = Buffer8[barOffset]; Array.Copy(contents, 0, inData, offset, Math.Min(contents.Length - offset, numToRead)); } }
public byte[] MoveIn8(short bar, long barOffset, int numBytesToRead) { byte[] result = new byte[numBytesToRead]; if (Buffer8.ContainsKey(barOffset)) { byte[] contents = Buffer8[barOffset]; Array.Copy(contents, result, Math.Min(contents.Length, numBytesToRead)); } return(result); }