protected HexValueFormatter(int byteCount, int formattedLength, HexValuesDisplayFormat format) { Format = format; ByteCount = byteCount; FormattedLength = formattedLength; stringBuilder = new StringBuilder(FormattedLength); }
public SavedValue(HexValuesDisplayFormat valuesFormat, int size, HexCellPosition cellPosition, HexBufferSpan cellBufferSpan) { ValuesFormat = valuesFormat; Data = new byte[size]; TempData = new byte[size]; BufferSpan = cellBufferSpan; Column = cellPosition.Column; // Note that BufferSpan.Length could be less than Data.Length if cell // byte size > 1 and there's not enough bytes at the end of the buffer // for the full cell. Debug.Assert(BufferSpan.Length <= Data.Length); BufferSpan.Buffer.ReadBytes(BufferSpan.Start, Data); }