Exemplo n.º 1
0
        public void AddProject(string path)
        {
            var projectPath = ProjectPathHelper.NormalizeProjectDirectoryPath(path);

            if (projectPath != null)
            {
                _needRefresh = _projects.Add(path);
            }
        }
Exemplo n.º 2
0
        public Project ReadProject(string projectPath, ProjectReaderSettings settings)
        {
            projectPath = ProjectPathHelper.NormalizeProjectFilePath(projectPath);

            var name = Path.GetFileName(Path.GetDirectoryName(projectPath));

            using (var stream = new FileStream(projectPath, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                return(ReadProject(stream, name, projectPath, settings));
            }
        }
Exemplo n.º 3
0
        private FileModelEntry <Project> GetProjectCore(string projectDirectory)
        {
            var normalizedPath = ProjectPathHelper.NormalizeProjectDirectoryPath(projectDirectory);

            if (normalizedPath == null)
            {
                return(null);
            }

            return(_projectsCache.AddOrUpdate(
                       normalizedPath,
                       key => AddProjectEntry(key, null),
                       (key, oldEntry) => AddProjectEntry(key, oldEntry)));
        }
Exemplo n.º 4
0
        private LockFile GetLockFile(string projectDirectory)
        {
            var normalizedPath = ProjectPathHelper.NormalizeProjectDirectoryPath(projectDirectory);

            if (normalizedPath == null)
            {
                return(null);
            }

            return(_lockFileCache.AddOrUpdate(
                       normalizedPath,
                       key => AddLockFileEntry(key, null),
                       (key, oldEntry) => AddLockFileEntry(key, oldEntry)).Model);
        }
Exemplo n.º 5
0
        public ProjectContextCollection GetProjectContextCollection(string projectPath)
        {
            var normalizedPath = ProjectPathHelper.NormalizeProjectDirectoryPath(projectPath);

            if (normalizedPath == null)
            {
                return(null);
            }

            return(_projectContextsCache.AddOrUpdate(
                       normalizedPath,
                       key => AddProjectContextEntry(key, null),
                       (key, oldEntry) => AddProjectContextEntry(key, oldEntry)));
        }