예제 #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();
		}