示例#1
0
 public PersistentScriptExecutionMediator(ILoggerFactory loggerFactory, ScriptExecutionStorageSettings storageSettings)
 {
     _scriptExecutionStorage = new ScriptExecutionFileStorage(loggerFactory, storageSettings);
     _scriptExecutionStorage.ScriptResultStored += (sender, args) => {
         _scriptIdToRunspaceClient.TryRemove(args.ScriptId, out _);
     };
     _runspaceClientFactory = new RunspaceClientFactory();
 }
示例#2
0
        public void Dispose()
        {
            var disposableStorage = _scriptExecutionStorage as IDisposable;

            if (disposableStorage != null)
            {
                disposableStorage.Dispose();
                _scriptExecutionStorage = null;
            }
        }