public int GetNextBatchId() { if ((new[] { "init", "metadata" }).Any(m => m.Equals(Mode)) || !OutputConnection.IsDatabase) { return(1); } return(OutputConnection.NextBatchId(Name)); }