示例#1
0
        public void OpenFileWithAssociatedApp(FileInfo file)
        {
            var launchContext = CreateContextForOpenFile(file);

            using var runner = ProgramRunner.RunProgram(launchContext);
            runner.Wait();
        }
示例#2
0
        public async Task <string> GetOutputAsync(string fileName, string?args)
        {
            var launchContext = CreateContextForGetOutput(fileName, args);

            using var runner = ProgramRunner.RunProgram(launchContext);
            await runner.WaitAsync();

            return(await runner.GetAllOutputAsync());
        }
示例#3
0
        public string GetOutput(string fileName, string?args)
        {
            var launchContext = CreateContextForGetOutput(fileName, args);

            using var runner = ProgramRunner.RunProgram(launchContext);
            runner.Wait();

            return(runner.GetAllOutput());
        }
示例#4
-14
        public async Task OpenFileWithAssociatedAppAsync(FileInfo file)
        {
            var launchContext = CreateContextForOpenFile(file);

            using var runner = ProgramRunner.RunProgram(launchContext);
            await runner.WaitAsync();
        }