示例#1
0
 private static async Task <int> LoadAndRunProgramAsync(IProgram program)
 {
     using (var loader = new ProgramLoader(program))
     {
         return(await loader.LoadAndRunAsync().ConfigureAwait(false));
     }
 }
示例#2
0
 private static async Task <int> LoadAndRunProgramAsync(
     string programPath,
     IEnumerable <string> programArgs,
     string workingDir)
 {
     using (var loader = new ProgramLoader(programPath, programArgs, workingDir))
     {
         return(await loader.LoadAndRunAsync().ConfigureAwait(false));
     }
 }