public static (int, string) ExecuteStorageEmulatorCommand(StorageEmulatorCommand command) { var emulatorPath = System.IO.Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Microsoft SDKs", "Azure", "Storage Emulator", "AzureStorageEmulator.exe"); StringBuilder sb = new StringBuilder(); var startIInfo = new ProcessStartInfo { Arguments = command.ToString(), FileName = emulatorPath, UseShellExecute = false, RedirectStandardOutput = true, }; using (var proc = new Process { StartInfo = startIInfo }) { proc.OutputDataReceived += (sender, e) => sb.Append(e.Data); proc.Start(); proc.BeginOutputReadLine(); proc.WaitForExit(); return(proc.ExitCode, sb.ToString()); } }
public static int ExecuteStorageEmulatorCommand(StorageEmulatorCommand command) { var start = new ProcessStartInfo { Arguments = command.ToString(), FileName = @"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" }; var exitCode = ExecuteProcess(start); return(exitCode); }
public static int ExecuteStorageEmulatorCommand(StorageEmulatorCommand command) { var emulatorPath = System.IO.Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Microsoft SDKs", "Azure", "Storage Emulator", "AzureStorageEmulator.exe"); var start = new ProcessStartInfo { Arguments = command.ToString(), FileName = emulatorPath }; var exitCode = ExecuteProcess(start); return(exitCode); }