public SccProjectFileReference(IVisualGitServiceProvider context, SccProjectData project, SccProjectFile file) { if (context == null) throw new ArgumentNullException("context"); else if (project == null) throw new ArgumentNullException("project"); _context = context; _project = project; _file = file; _refCount = 1; // One should only create a reference if one needs one file.AddReference(this); }
internal SccProjectFile GetFile(string path) { SccProjectFile projectFile; if (!TryGetFile(path, out projectFile)) { AddFile(path, projectFile = new SccProjectFile(this, path)); AddedToSolution(path); } return(projectFile); }
internal void RemoveFile(SccProjectFile file) { Debug.Assert(_fileMap[file.FullPath] == file); _fileMap.Remove(file.FullPath); PendingChanges.Refresh(file.FullPath); }
internal SccProjectFile GetFile(string path) { SccProjectFile projectFile; if (!_fileMap.TryGetValue(path, out projectFile)) _fileMap.Add(path, projectFile = new SccProjectFile(Context, path)); return projectFile; }
public void AddFile(string path, SccProjectFile sccProjectFile) { _fileMap.Add(path, sccProjectFile); }
public bool TryGetFile(string fileName, out SccProjectFile file) { return(_fileMap.TryGetValue(fileName, out file)); }