示例#1
0
文件: Reactor.cs 项目: 0xCM/z0
 public static void dispatch(string[] args)
 {
     try
     {
         var parts = ApiRuntimeLoader.parts(Index <PartId> .Empty);
         term.inform(AppMsg.status(text.prop("PartCount", parts.Components.Length)));
         var rng = Rng.@default();
         using var wf = WfAppLoader.load(parts, args).WithSource(rng);
         if (args.Length == 0)
         {
             wf.Status("usage: run <command> [options]");
             var settings = wf.Settings;
             wf.Row(settings.Format());
         }
         else
         {
             wf.Status("Dispatching");
             Reactor.create(wf).Dispatch(args);
         }
     }
     catch (Exception e)
     {
         term.error(e);
     }
 }