Ejemplo n.º 1
0
 /// <summary>
 /// Get the analyzer config document in this project with the specified document Id.
 /// </summary>
 public AnalyzerConfigDocument?GetAnalyzerConfigDocument(DocumentId documentId) =>
 ImmutableHashMapExtensions.GetOrAdd(
     ref _idToAnalyzerConfigDocumentMap,
     documentId,
     s_tryCreateAnalyzerConfigDocumentFunction,
     this
     );
Ejemplo n.º 2
0
 /// <summary>
 /// Get the additional document in this project with the specified document Id.
 /// </summary>
 public TextDocument?GetAdditionalDocument(DocumentId documentId) =>
 ImmutableHashMapExtensions.GetOrAdd(
     ref _idToAdditionalDocumentMap,
     documentId,
     s_tryCreateAdditionalDocumentFunction,
     this
     );
Ejemplo n.º 3
0
        public AnalyzerConfigDocument?GetAnalyzerConfigDocument(DocumentId documentId)
        {
            if (!ContainsAnalyzerConfigDocument(documentId))
            {
                return(null);
            }

            return(ImmutableHashMapExtensions.GetOrAdd(ref _idToAnalyzerConfigDocumentMap, documentId, s_createAnalyzerConfigDocumentFunction, this));
        }
Ejemplo n.º 4
0
        public TextDocument?GetAdditionalDocument(DocumentId documentId)
        {
            if (!ContainsAdditionalDocument(documentId))
            {
                return(null);
            }

            return(ImmutableHashMapExtensions.GetOrAdd(ref _idToAdditionalDocumentMap, documentId, s_createAdditionalDocumentFunction, this));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Get the document in this project with the specified document Id.
        /// </summary>
        public Document GetDocument(DocumentId documentId)
        {
            if (!ContainsDocument(documentId))
            {
                return(null);
            }

            return(ImmutableHashMapExtensions.GetOrAdd(ref _idToDocumentMap, documentId, s_createDocumentFunction, this));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Gets the project in this solution with the specified project ID.
        ///
        /// If the id is not an id of a project that is part of this solution the method returns null.
        /// </summary>
        public Project GetProject(ProjectId projectId)
        {
            // ContainsProject checks projectId being null
            if (this.ContainsProject(projectId))
            {
                return(ImmutableHashMapExtensions.GetOrAdd(ref _projectIdToProjectMap, projectId, s_createProjectFunction, this));
            }

            return(null);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Gets the project in this solution with the specified project ID.
        ///
        /// If the id is not an id of a project that is part of this solution the method returns null.
        /// </summary>
        public Project GetProject(ProjectId projectId)
        {
            if (projectId == null)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (this.ContainsProject(projectId))
            {
                return(ImmutableHashMapExtensions.GetOrAdd(ref _projectIdToProjectMap, projectId, s_createProjectFunction, this));
            }

            return(null);
        }