/// <summary> /// Perform bulk operations on a database. /// This function receives an array of Operation structures /// and performs the necessary calls to Insert, Erase /// and Find. The Result field within each operation is populated /// with the result status of each operation and should be checked by the caller. /// </summary> /// <param name="txn">The optional Transaction passed to ups_db_insert, ups_db_erase and ups_db_find.</param> /// <param name="operations">The operations to perform.</param> /// <param name="flags">Optional flags for this operation.</param> public void BulkOperations(Transaction txn, Operation[] operations, int flags) { int st; lock (this) { st = NativeMethods.BulkOperations(handle, (txn != null ? txn.Handle : IntPtr.Zero), operations, flags); } if (st != 0) { throw new DatabaseException(st); } }