private bool ReparseCommandLineIfChanged_NoLock(string commandLine) { var checksum = Checksum.Create(commandLine); if (_commandLineChecksum == checksum) { return(false); } _commandLineChecksum = checksum; // Dispose the existing stored command-line and then persist the new one so we can // recover it later. Only bother persisting things if we have a non-empty string. _commandLineStorage?.Dispose(); _commandLineStorage = null; if (commandLine.Length > 0) { _commandLineStorage = _temporaryStorageService.CreateTemporaryStreamStorage(); _commandLineStorage.WriteString(commandLine); } ReparseCommandLine_NoLock(commandLine); return(true); }
public void Cleanup() { if (_storage != null) { _storage.Dispose(); } }
private bool ReparseCommandLineIfChanged_NoLock(ImmutableArray <string> arguments) { var checksum = Checksum.Create(arguments); if (_commandLineChecksum == checksum) { return(false); } _commandLineChecksum = checksum; // Dispose the existing stored command-line and then persist the new one so we can // recover it later. Only bother persisting things if we have a non-empty string. _commandLineStorage?.Dispose(); _commandLineStorage = null; if (!arguments.IsEmpty) { _commandLineStorage = _temporaryStorageService.CreateTemporaryStreamStorage(); _commandLineStorage.WriteAllLines(arguments); } ReparseCommandLine_NoLock(arguments); return(true); }