/// <summary> /// Creates an instance of <see cref="BlobUpdateField"/> /// </summary> /// <param name="bitOffset">The offset of the first bit describing this updatefield in the <see cref="UpdateMask"/>.</param> /// <param name="byteCount">The amount of bytes this blob spans.</param> /// <param name="context">The parsing context.</param> public BlobUpdateField(int bitOffset, int byteCount, ParsingContext context) : base(bitOffset, ((byteCount + 3) & ~3) / 4, // Compute the amount of bits (align up to u32 boundary) context, () => HistoryFactory.Create(() => new byte[byteCount])) { _currentValue = new byte[byteCount]; }
public GuidUpdateField(int bitOffset, ParsingContext context) : base(bitOffset, GetSize(context), context, () => HistoryFactory.Create(context.Helper.GuidResolver.CreateGUID)) { _context = context; }
public RawUpdateField(int bitOffset, ParsingContext context) : base(bitOffset, 1, context, () => HistoryFactory.Create(() => new T[Unsafe.SizeOf <uint>() / Unsafe.SizeOf <T>()])) { }
public ShortsUpdateField(int bitOffset, ParsingContext context) : base(bitOffset, 1, context, () => HistoryFactory.Create(() => new short[2])) { }