private static void Main(string[] args) { Console.Title = Message.Program_Main_Title; var c = Console.ForegroundColor; try { if (!ParseArgs(args)) { Arguments.PrintHelp(); Console.Read(); return; } var bcm = new BulkCopyManager(); bcm.BulkCopyProgress += bcm_BulkCopyProgress; var response = bcm.BulkCopy(Request); Log("--------------------------------------------------"); Log("Start Time:" + response.StartTime); Log("End Time:" + response.EndTime); Log("Total Changes:" + response.ChangesTotal); Log("Total Applied:" + response.ChangesApplied); Log("Total Failed:" + response.ChangesFailed); Log("--------------------------------------------------"); if (response.Status != null && response.Status.Count > 0) { Log("The following heaps are skipped"); Dictionary <string, string> skip; if (response.Status.TryGetValue("Skipped", out skip)) { foreach (var item in skip) { Log(item.Key + "--" + item.Value); } } } Log("--------------------------------------------------"); Log("Bulk copy completed."); } catch (Exception e) { Console.ForegroundColor = ConsoleColor.Red; Log("Bulk copy failed."); Log(e.ToString()); } Console.ForegroundColor = c; Log("Please press [Enter] to exit."); Console.ReadLine(); }
private static void Main(string[] args) { Console.Title = Message.Program_Main_Title; var c = Console.ForegroundColor; try { if (!ParseArgs(args)) { Arguments.PrintHelp(); Console.Read(); return; } var bcm = new BulkCopyManager(); bcm.BulkCopyProgress += bcm_BulkCopyProgress; var response = bcm.BulkCopy(Request); Log("--------------------------------------------------"); Log("Start Time:" + response.StartTime); Log("End Time:" + response.EndTime); Log("Total Changes:" + response.ChangesTotal); Log("Total Applied:" + response.ChangesApplied); Log("Total Failed:" + response.ChangesFailed); Log("--------------------------------------------------"); if (response.Status != null && response.Status.Count > 0) { Log("The following heaps are skipped"); Dictionary<string, string> skip; if (response.Status.TryGetValue("Skipped", out skip)) { foreach (var item in skip) { Log(item.Key + "--" + item.Value); } } } Log("--------------------------------------------------"); Log("Bulk copy completed."); } catch (Exception e) { Console.ForegroundColor = ConsoleColor.Red; Log("Bulk copy failed."); Log(e.ToString()); } Console.ForegroundColor = c; Log("Please press [Enter] to exit."); Console.ReadLine(); }