public PersistentScriptExecutionMediator(ILoggerFactory loggerFactory, ScriptExecutionStorageSettings storageSettings) { _scriptExecutionStorage = new ScriptExecutionFileStorage(loggerFactory, storageSettings); _scriptExecutionStorage.ScriptResultStored += (sender, args) => { _scriptIdToRunspaceClient.TryRemove(args.ScriptId, out _); }; _runspaceClientFactory = new RunspaceClientFactory(); }
public void Dispose() { var disposableStorage = _scriptExecutionStorage as IDisposable; if (disposableStorage != null) { disposableStorage.Dispose(); _scriptExecutionStorage = null; } }