/// <summary> /// Sends any items in the bulk buffer to the API and then closes the bulk service. Results are returned as objects of type T. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="hasErrors">Identifies if the API returned any errors</param> /// <param name="enableTimeAudit">Log how long each operation takes</param> /// <param name="sleepTime">Seconds to wait between each API call</param> /// <returns></returns> public async Task <Tuple <List <T>, bool> > Close <T>(bool enableTimeAudit = false, int sleepTime = 0) { Tuple <List <T>, bool> result = null; if (APIBulkCallCount > 0) { result = await Commit <T>(enableTimeAudit, sleepTime); } ClarizenAPI.CancelBulkService(); return(result); }
/// <summary> /// Sends any items in the bulk buffer to the API and then closes the bulk service. /// </summary> /// <param name="enableTimeAudit">Log how long each operation takes</param> /// <param name="sleepTime">Seconds to wait between each API call</param> /// <returns></returns> public async Task <bool> Close(bool enableTimeAudit = false, int sleepTime = 0) { bool result = true; if (APIBulkCallCount > 0) { result = await Commit(enableTimeAudit, sleepTime); } ClarizenAPI.CancelBulkService(); return(result); }