Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 5
0
 public void AddFile(string path, SccProjectFile sccProjectFile)
 {
     _fileMap.Add(path, sccProjectFile);
 }
Ejemplo n.º 6
0
 public bool TryGetFile(string fileName, out SccProjectFile file)
 {
     return(_fileMap.TryGetValue(fileName, out file));
 }