public void EnsureStorage(Solution solution, AbstractPersistentStorage storage) { if (Storage != null || solution.Id != SolutionId) { return; } // hold onto the primary solution when it is used the first time. Storage = storage; storage.AddRefUnsafe(); }
private void RegisterPrimarySolutionStorageIfNeeded(Solution solution, AbstractPersistentStorage storage) { if (_primarySolutionStorage != null || solution.Id != _primarySolutionId) { return; } // hold onto the primary solution when it is used the first time. _primarySolutionStorage = storage; storage.AddRefUnsafe(); }
public bool TryGetStorage( string solutionFilePath, string workingFolderPath, out AbstractPersistentStorage storage) { storage = null; if (Storage == null) { return(false); } if (Storage.SolutionFilePath != solutionFilePath || Storage.WorkingFolderPath != workingFolderPath) { return(false); } storage = Storage; storage.AddRefUnsafe(); return(true); }