Пример #1
0
 public TexoEngine Build(ITexoFactory <object, string> factory, IViewService view)
 {
     commandFactory = factory ?? throw new ArgumentNullException(nameof(factory));
     Initiliase();
     SetViewService(view);
     runtime = new RuntimeCoordinatorService(
         environment, evaluator, commandManagement,
         resultProcessing, usedView, actionManagement,
         history, intellisense, didYouMean, fallback, logger);
     InitialiseActions();
     return(new TexoEngine(runtime, usedView, actions, setting, logger));
 }
Пример #2
0
 internal TexoEngine(
     IRuntimeCoordinatorService runtime,
     IViewService view,
     IActionFactoryRegister actionRegister,
     ISettingService setting,
     ILogService logger)
 {
     this.runtime        = runtime ?? throw new ArgumentNullException(nameof(runtime));
     this.setting        = setting ?? throw new ArgumentNullException(nameof(setting));
     this.actionRegister = actionRegister ?? throw new ArgumentNullException(nameof(actionRegister));
     this.view           = view;
     this.logger         = logger;
 }