public static void Write(HexBuffer buffer, HexPosition position, byte[] data) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } if (data == null || data.Length == 0) { return; } buffer.Replace(position, data); }
protected void UpdateValue() { if (disable_UpdateValue) return; if (DataFieldVM.HasError) return; var newData = GetDataAsByteArray(); Debug2.Assert(!(newData is null) && newData.LongLength == Span.Length); var origData = buffer.ReadBytes(Span.Start, newData.LongLength); if (Equals(newData, origData)) return; buffer.Replace(Span.Start, newData); OnUpdateValue(); }