Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override async Task
- OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext,
- CancellationToken cancellationToken)
- {
- await turnContext.SendActivityAsync(MessageFactory.Text($"Echo:
- Opening app1..."), cancellationToken);
- var startInfo = new ProcessStartInfo
- {
- FileName = @"D:_Projectsxyzapp1.exe",
- UseShellExecute = false,
- CreateNoWindow = false,
- };
- var process = Process.Start(startInfo);
- var success = process != null && process.WaitForExit(30 * 10000);
- if (!success)
- {
- //process?.Kill();
- throw new ApplicationException("A timeout occurred during
- method execution. The service interface did not finish in a
- timely fashion.");
- }
- var exitCode = process.ExitCode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement