Esempio n. 1
0
 public EntryPoint(ILoggerFactory loggerFactory, DataService dataService, SelectionService selectionService,
                   IPythonService pythonService)
 {
     _logger           = loggerFactory.GetLogger("CLI");
     _dataService      = dataService;
     _selectionService = selectionService;
     _pythonService    = pythonService;
 }
Esempio n. 2
0
        /// <summary>
        /// creates a new <see cref="ScriptCompiler"/>
        /// </summary>
        /// <param name="logger">access to logging</param>
        /// <param name="parser">parser used to parse scripts</param>
        /// <param name="cache">access to object cache</param>
        /// <param name="methodprovider">provides managed method hosts to scripts</param>
        /// <param name="scriptservice">used to load scripts if not found in cache</param>
        /// <param name="archive">archive used to load revisions</param>
        /// <param name="importservice">access to javascript imports</param>
        /// <param name="pythonservice">access to python script logic</param>
        /// <param name="luaservice">used to execute lua code</param>
        public ScriptCompiler(ILogger <ScriptCompiler> logger, IScriptParser parser, ICacheService cache, IMethodProviderService methodprovider, IScriptService scriptservice, IArchiveService archive, IScriptImportService importservice, IPythonService pythonservice, ILuaService luaservice)
        {
            this.parser        = parser;
            this.cache         = cache;
            this.scriptservice = scriptservice;
            this.archive       = archive;
            this.importservice = importservice;
            this.pythonservice = pythonservice;
            this.luaservice    = luaservice;
            this.logger        = logger;

            if (parser != null)
            {
                parser.Extensions.AddExtensions(typeof(Math));
                parser.Extensions.AddExtensions <ScriptEnumerations>();
                parser.ImportProvider = methodprovider;
            }

            ReactInitializer.Initialize();
        }
Esempio n. 3
0
 /// <summary>
 /// creates a new <see cref="PythonScript"/>
 /// </summary>
 /// <param name="pythonservice">service used to interpret and execute script</param>
 /// <param name="code">python code to execute</param>
 public PythonScript(IPythonService pythonservice, string code)
 {
     this.pythonservice = pythonservice;
     script             = pythonservice.Parse(code);
 }
 public OperationController(IDrawService drawService, IPythonService pythonService, IOperationService operationService)
 {
     _drawService      = drawService;
     _pythonService    = pythonService;
     _operationService = operationService;
 }
Esempio n. 5
0
 public DataService(ILoggerFactory loggerFactory, ScWorkContext dbContext, IPythonService pythonService)
 {
     _logger        = loggerFactory.GetLogger("Data");
     _dbContext     = dbContext;
     _pythonService = pythonService;
 }