當前位置: 首頁>>代碼示例>>C#>>正文


C# ProjectSystem.AbstractProject類代碼示例

本文整理匯總了C#中Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject的典型用法代碼示例。如果您正苦於以下問題:C# AbstractProject類的具體用法?C# AbstractProject怎麽用?C# AbstractProject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractProject類屬於Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem命名空間,在下文中一共展示了AbstractProject類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AbstractContainedLanguage

        public AbstractContainedLanguage(
            AbstractProject project)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            this.Project = project;
        }
開發者ID:RoryVL,項目名稱:roslyn,代碼行數:10,代碼來源:AbstractContainedLanguage.cs

示例2: AddProject

        public void AddProject(AbstractProject project)
        {
            var provider = (IProjectCodeModelProvider)project;
            var fcms = provider.ProjectCodeModel.GetCachedFileCodeModelInstances();

            foreach (var fcm in fcms)
            {
                var globalNodeKeys = fcm.Object.GetCurrentNodeKeys();

                _nodeKeysMap.Add(fcm, globalNodeKeys);
            }
        }
開發者ID:furesoft,項目名稱:roslyn,代碼行數:12,代碼來源:NodeKeyValidation.cs

示例3: AddProject

        public void AddProject(AbstractProject project)
        {
            var provider = (IProjectCodeModelProvider)project;
            IEnumerable<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>> fcms = provider.ProjectCodeModel.GetFileCodeModelInstances();

            foreach (var fcm in fcms)
            {
                var globalNodeKeys = fcm.Object.GetCurrentNodeKeys();

                _nodeKeysMap.Add(fcm, globalNodeKeys);
            }
        }
開發者ID:ehsansajjad465,項目名稱:roslyn,代碼行數:12,代碼來源:NodeKeyValidation.cs

示例4: VsReadOnlyDocumentTracker

        public VsReadOnlyDocumentTracker(IEditAndContinueWorkspaceService encService, IVsEditorAdaptersFactoryService adapters, AbstractProject vsProject)
            : base(assertIsForeground: true)
        {
            Debug.Assert(encService.DebuggingSession != null);

            _encService = encService;
            _adapters = adapters;
            _workspace = encService.DebuggingSession.InitialSolution.Workspace;
            _vsProject = vsProject;

            _workspace.DocumentOpened += OnDocumentOpened;
            UpdateWorkspaceDocuments();
        }
開發者ID:GeertVL,項目名稱:roslyn,代碼行數:13,代碼來源:VsReadOnlyDocumentTracker.cs

示例5: AddToPushListIfNeeded

            private void AddToPushListIfNeeded(AbstractProject project, List<AbstractProject> inOrderToPush, HashSet<AbstractProject> visited)
            {
                if (_pushedProjects.Contains(project))
                {
                    return;
                }

                if (!visited.Add(project))
                {
                    return;
                }

                foreach (var projectReference in project.GetCurrentProjectReferences())
                {
                    AddToPushListIfNeeded(_tracker._projectMap[projectReference.ProjectId], inOrderToPush, visited);
                }

                inOrderToPush.Add(project);
            }
開發者ID:SoumikMukherjeeDOTNET,項目名稱:roslyn,代碼行數:19,代碼來源:VisualStudioProjectTracker.WorkspaceHostState.cs

示例6: AddToPushListIfNeeded

            private void AddToPushListIfNeeded(AbstractProject project, List<AbstractProject> inOrderToPush, HashSet<AbstractProject> visited)
            {
                AssertIsForeground();                
                Contract.ThrowIfFalse(_tracker.ContainsProject(project));

                // Bail out if any of the following is true:
                //  1. We have already started pushing changes for this project OR
                //  2. We have already visited this project in a prior recursive call                
                if (_pushedProjects.Contains(project) || !visited.Add(project))
                {
                    return;
                }

                foreach (var projectReference in project.GetCurrentProjectReferences())
                {
                    AddToPushListIfNeeded(_tracker.GetProject(projectReference.ProjectId), inOrderToPush, visited);
                }

                inOrderToPush.Add(project);
            }
開發者ID:TyOverby,項目名稱:roslyn,代碼行數:20,代碼來源:VisualStudioProjectTracker.WorkspaceHostState.cs

示例7: TryGetProjectByBinPath

        /// <summary>
        /// Attempts to get single project by given output binary filePath.
        /// </summary>
        /// <remarks>This method may be called on a background thread.</remarks>
        internal bool TryGetProjectByBinPath(string filePath, out AbstractProject project)
        {
            lock (_gate)
            {
                project = null;
                if (_projectsByBinPath.TryGetValue(filePath, out var projects))
                {
                    // If for some reason we have more than one referencing project, it's ambiguous so bail
                    if (projects.Length == 1)
                    {
                        project = projects[0];
                        return true;
                    }
                }

                return false;
            }
        }
開發者ID:GuilhermeSa,項目名稱:roslyn,代碼行數:22,代碼來源:VisualStudioProjectTracker.cs

示例8: UpdateProjectBinPath_Foreground

        internal void UpdateProjectBinPath_Foreground(AbstractProject project, string oldBinPathOpt, string newBinPathOpt)
        {
            // UpdateProjectBinPath is defensively executed on the foreground thread as it calls back into referencing projects to perform metadata to P2P reference conversions.
            AssertIsForeground();

            if (oldBinPathOpt != null)
            {
                UpdateReferencesForBinPathChange(oldBinPathOpt, () => RemoveProjectByBinPath(oldBinPathOpt, project));
            }

            if (newBinPathOpt != null)
            {
                UpdateReferencesForBinPathChange(newBinPathOpt, () => AddProjectByBinPath(newBinPathOpt, project));
            }
        }
開發者ID:GuilhermeSa,項目名稱:roslyn,代碼行數:15,代碼來源:VisualStudioProjectTracker.cs

示例9: UpdateProjectBinPath

 /// <summary>
 /// Updates the project tracker and referencing projects for binary output path change for the given project.
 /// If invoked on the foreground thread, the update is executed right away.
 /// Otherwise, update is scheduled on foreground task scheduler.
 /// </summary>
 /// <remarks>This method may be called on a background thread.</remarks>
 internal void UpdateProjectBinPath(AbstractProject project, string oldBinPathOpt, string newBinPathOpt)
 {
     ExecuteOrScheduleForegroundAffinitizedAction(() => UpdateProjectBinPath_Foreground(project, oldBinPathOpt, newBinPathOpt));
 }
開發者ID:GuilhermeSa,項目名稱:roslyn,代碼行數:10,代碼來源:VisualStudioProjectTracker.cs

示例10: RemoveProject

        /// <summary>
        /// Remove a project from the workspace.
        /// </summary>
        internal void RemoveProject(AbstractProject project)
        {
            Contract.ThrowIfFalse(_projectMap.Remove(project.Id));

            UpdateProjectBinPath(project, project.TryGetBinOutputPath(), null);

            if (project.PushingChangesToWorkspaceHosts)
            {
                NotifyWorkspaceHosts(host => host.OnProjectRemoved(project.Id));
            }
        }
開發者ID:nemec,項目名稱:roslyn,代碼行數:14,代碼來源:VisualStudioProjectTracker.cs

示例11: StartPushingToWorkspaceAndNotifyOfOpenDocuments

        private static void StartPushingToWorkspaceAndNotifyOfOpenDocuments(AbstractProject project)
        {
            project.AssertIsForeground();

            // If a document is opened in a project but we haven't started pushing yet, we want to stop doing lazy
            // loading for this project and get it up to date so the user gets a fast experience there. If the file
            // was presented as open to us right away, then we'll never do this in OnDocumentOpened, so we should do
            // it here. It's important to do this after everything else happens in this method, so we don't get
            // strange ordering issues. It's still possible that this won't actually push changes if the workspace
            // host isn't ready to receive events yet.
            project.ProjectTracker.StartPushingToWorkspaceAndNotifyOfOpenDocuments(SpecializedCollections.SingletonEnumerable(project));
        }
開發者ID:XieShuquan,項目名稱:roslyn,代碼行數:12,代碼來源:AbstractProject.cs

示例12: TryCreateXamlDocument

        private bool TryCreateXamlDocument(AbstractProject project, string filePath, out IVisualStudioHostDocument vsDocument)
        {
            vsDocument = _vsWorkspace.ProjectTracker.DocumentProvider.TryGetDocumentForFile(
                project, filePath, SourceCodeKind.Regular,
                tb => tb.ContentType.IsOfType(ContentTypeNames.XamlContentType),
                _ => SpecializedCollections.EmptyReadOnlyList<string>());

            return vsDocument != null;
        }
開發者ID:XieShuquan,項目名稱:roslyn,代碼行數:9,代碼來源:XamlTextViewCreationListener.cs

示例13: ContainsProject

 internal bool ContainsProject(AbstractProject project)
 {
     lock (_gate)
     {
         return _projectMap.ContainsKey(project.Id);
     }
 }
開發者ID:XieShuquan,項目名稱:roslyn,代碼行數:7,代碼來源:VisualStudioProjectTracker.cs

示例14: CodeModelProjectCache

 internal CodeModelProjectCache(AbstractProject project, IServiceProvider serviceProvider, HostLanguageServices languageServices, VisualStudioWorkspace workspace)
 {
     _project = project;
     _state = new CodeModelState(serviceProvider, languageServices, workspace);
 }
開發者ID:jkotas,項目名稱:roslyn,代碼行數:5,代碼來源:CodeModelProjectCache.cs

示例15: AbstractProjectCodeModel

 public AbstractProjectCodeModel(AbstractProject project, VisualStudioWorkspace visualStudioWorkspace, IServiceProvider serviceProvider)
 {
     _vsProject = project;
     _visualStudioWorkspace = visualStudioWorkspace;
     _serviceProvider = serviceProvider;
 }
開發者ID:Rickinio,項目名稱:roslyn,代碼行數:6,代碼來源:AbstractProjectCodeModel.cs


注:本文中的Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。