示例#1
0
 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);
 }
示例#2
0
		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();
		}