本文整理汇总了C#中Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject类的典型用法代码示例。如果您正苦于以下问题:C# AbstractProject类的具体用法?C# AbstractProject怎么用?C# AbstractProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractProject类属于Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem命名空间,在下文中一共展示了AbstractProject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: RemoveProject
internal void RemoveProject(AbstractProject project)
{
// If we've already told this host about it, then we need to remove it. Otherwise, this host has no
// further work to do.
if (_pushedProjects.Remove(project))
{
this.Host.OnProjectRemoved(project.Id);
}
}
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:9,代码来源:VisualStudioProjectTracker.WorkspaceHostState.cs
示例17: VsENCRebuildableProjectImpl
internal VsENCRebuildableProjectImpl(AbstractProject project)
{
_vsProject = project;
_encService = _vsProject.VisualStudioWorkspace.Services.GetService<IEditAndContinueWorkspaceService>();
_trackingService = _vsProject.VisualStudioWorkspace.Services.GetService<IActiveStatementTrackingService>();
_notifications = _vsProject.VisualStudioWorkspace.Services.GetService<INotificationService>();
_debugEncNotify = (IDebugEncNotify)project.ServiceProvider.GetService(typeof(ShellInterop.SVsShellDebugger));
var componentModel = (IComponentModel)project.ServiceProvider.GetService(typeof(SComponentModel));
_diagnosticProvider = componentModel.GetService<EditAndContinueDiagnosticUpdateSource>();
_editorAdaptersFactoryService = componentModel.GetService<IVsEditorAdaptersFactoryService>();
Debug.Assert(_encService != null);
Debug.Assert(_trackingService != null);
Debug.Assert(_diagnosticProvider != null);
Debug.Assert(_editorAdaptersFactoryService != null);
}
开发者ID:AnthonyDGreen,项目名称:roslyn,代码行数:19,代码来源:VsENCRebuildableProjectImpl.cs
示例18: AbstractProjectCodeModel
public AbstractProjectCodeModel(AbstractProject project, VisualStudioWorkspaceImpl visualStudioWorkspace, IServiceProvider serviceProvider)
{
VSProject = project;
VisualStudioWorkspace = visualStudioWorkspace;
ServiceProvider = serviceProvider;
}
开发者ID:XieShuquan,项目名称:roslyn,代码行数:6,代码来源:AbstractProjectCodeModel.cs
示例19: UpdateProjectBinPath
internal void UpdateProjectBinPath(AbstractProject project, string oldBinPathOpt, string newBinPathOpt)
{
if (oldBinPathOpt != null)
{
UpdateReferencesForBinPathChange(oldBinPathOpt, () => _projectsByBinPath.MultiRemove(oldBinPathOpt, project));
}
if (newBinPathOpt != null)
{
UpdateReferencesForBinPathChange(newBinPathOpt, () => _projectsByBinPath.MultiAdd(newBinPathOpt, project));
}
}
开发者ID:nemec,项目名称:roslyn,代码行数:12,代码来源:VisualStudioProjectTracker.cs
示例20: AddProjectByBinPath
internal void AddProjectByBinPath(string filePath, AbstractProject project)
{
lock (_gate)
{
if (!_projectsByBinPath.TryGetValue(filePath, out var projects))
{
projects = ImmutableArray<AbstractProject>.Empty;
}
_projectsByBinPath[filePath] = projects.Add(project);
}
}
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:12,代码来源:VisualStudioProjectTracker.cs
注:本文中的Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论