public ScriptListViewModel() { ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider(); _scriptRegistry = scriptRegistryProvider.GetInstance(); UpdateScriptList(); _scriptRegistry.ScriptsListChanged += OnScriptsCollectionChanged; }
public ScriptViewModel(Script script = null) { ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider(); _scriptRegistry = scriptRegistryProvider.GetInstance(); this.Script = script ?? new Script(); IsNew = script == null; }
public ScriptHandler() { ScriptEnginePoolProvider scriptEnginePoolProvider = new ScriptEnginePoolProvider(); _scriptEnginePool = scriptEnginePoolProvider.GetInstance(); ScriptRegistryProvider scriptRegistryProvider = new ScriptRegistryProvider(); _scriptRegistry = scriptRegistryProvider.GetInstance(); }
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)); }