public void UpdateDBStatus() { switch (pendingOp) { case DatabaseOp.DOO_Insert: IsValid = true; IsDeleted = false; break; case DatabaseOp.DOO_Update: IsValid = true; break; case DatabaseOp.DOO_Delete: IsValid = false; IsDeleted = true; break; } pendingOp = DatabaseOp.DOO_None; }
/// <summary> /// Packs this <see cref="DatabaseOp"/> into its BapsNet representation /// </summary> /// <param name="op">The opcode to pack.</param> /// <returns> /// The bit-pattern of <see cref="op"/> in a packed BapsNet command word, /// less its group code. /// </returns> public static ushort ToWordBits(this DatabaseOp op) { return(Op((byte)op)); }