public Guid CreateNewBatch(string name, bool returnResults = true, bool continueOnError = false) { if (RequestBatches.Count > MaxNumberOfBatches) { // Set last error as no more room. logger.Log(string.Format(CultureInfo.InvariantCulture, "No more batches available"), System.Diagnostics.TraceEventType.Error, new Exception("MAX CURRENT BATCHES EXCEEDED")); return(Guid.Empty); } RequestBatch nBatch = new RequestBatch(name, returnResults, continueOnError); RequestBatches.Add(nBatch.BatchId, nBatch); return(nBatch.BatchId); }