Esempio n. 1
0
        public ScriptListViewModel()
        {
            ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider();

            _scriptRegistry = scriptRegistryProvider.GetInstance();

            UpdateScriptList();
            _scriptRegistry.ScriptsListChanged += OnScriptsCollectionChanged;
        }
Esempio n. 2
0
        public ScriptViewModel(Script script = null)
        {
            ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider();

            _scriptRegistry = scriptRegistryProvider.GetInstance();

            this.Script = script ?? new Script();
            IsNew       = script == null;
        }
Esempio n. 3
0
        public ScriptHandler()
        {
            ScriptEnginePoolProvider scriptEnginePoolProvider = new ScriptEnginePoolProvider();

            _scriptEnginePool = scriptEnginePoolProvider.GetInstance();

            ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider();

            _scriptRegistry = scriptRegistryProvider.GetInstance();
        }
Esempio n. 4
0
 public ScriptService(
     [NotNull] ILogger <ScriptService> logger,
     [NotNull] IVersionRepository versionRepository,
     [NotNull] IScriptRegistry scripts,
     [NotNull] IHostApplicationLifetime appLifetime
     )
 {
     this.logger            = logger ?? throw new ArgumentNullException(nameof(logger));
     this.versionRepository = versionRepository ?? throw new ArgumentNullException(nameof(versionRepository));
     this.scripts           = scripts ?? throw new ArgumentNullException(nameof(scripts));
     this.appLifetime       = appLifetime ?? throw new ArgumentNullException(nameof(appLifetime));
 }