public void Run() { CliLog.WriteLine(CliLog.ColorWhite, "|", CliLog.ColorGreen, "START ", CliLog.ColorMagenta, "DATA-SOURCE"); CliLog.WriteLine(CliLog.ColorWhite, "|"); //json.name = json.name.ToLower(); if (!IsValid()) { return; } CliLog.WriteLine(CliLog.ColorWhite, "|", CliLog.ColorRed, "Creating", CliLog.ColorGreen, " Data Source: ", CliLog.ColorCyan, $"{DataSourceName}"); CliLog.WriteLine(CliLog.ColorWhite, "| "); CliLog.Write(CliLog.ColorWhite, "| "); var wait = new Thread(ThreadWork.Dot); wait.Start(); RegisterDataSource(); wait.Abort(); CliLog.WriteLine(); CliLog.WriteLine(CliLog.ColorWhite, "| "); CliLog.WriteLine(CliLog.ColorWhite, "|", CliLog.ColorRed, "Created", CliLog.ColorGreen, " Data Source: ", CliLog.ColorCyan, $"{DataSourceName}"); CliLog.WriteLine(CliLog.ColorWhite, "|"); CliLog.WriteLine(CliLog.ColorWhite, "|", CliLog.ColorGreen, "END ", CliLog.ColorMagenta, "DATA-SOURCE"); }
public static void Dot() { while (true) { CliLog.Write(CliLog.ColorWhite, "."); Thread.Sleep(1000); } }
public static void SolutionPackagerDots() { CliLog.Write(CliLog.ColorWhite, "|", CliLog.ColorGreen, "Exporting "); while (true) { CliLog.Write(CliLog.ColorWhite, "."); Thread.Sleep(1000); } }
private void RunProxyType() { var path = "\"" + GetParentFolder(currentDirectory) + $@"\packages\Microsoft.CrmSdk.CoreTools.{arguments.Version}\content\bin\coretools\CrmSvcUtil.exe" + "\""; CliLog.Write(CliLog.ColorWhite, "|", CliLog.ColorGreen, "Executing", CliLog.ColorCyan, " CrmSvcUtil"); if (json.entities == "*" || json.entities.ToLower() == "all") { CliLog.WriteLine(ConsoleColor.Green, " with ", ConsoleColor.Cyan, "all entities"); } else { CliLog.WriteLine(ConsoleColor.Green, " with entities filter: ", ConsoleColor.Cyan, json.entities); } CliLog.WriteLine(); CliLog.WriteLine(CliLog.ColorWhite, " " + path + " " + CreateCommandArgsLog()); CliLog.WriteLine(); var process = new Process { StartInfo = new ProcessStartInfo(path) { Arguments = CreateCommandArgs(), UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardError = true, CreateNoWindow = true } }; if (json.entities != null && json.entities.Length > 0) { if (json.entities != "*" && json.entities.ToLower() != "all") { process.StartInfo.EnvironmentVariables.Add(ENVIRONMENT_ENTITIES, string.Join(",", json.entities)); } } process.Start(); while (!process.StandardOutput.EndOfStream) { CliLog.WriteLine(CliLog.ColorWhite, "|"); var line = process.StandardOutput.ReadLine(); CliLog.WriteLine(CliLog.ColorWhite, "|", CliLog.ColorWhite, line); } process.WaitForExit(); }