Expose ProjectWorkspaceState on ProjectSnapshot.

- There are too many components that need this property directly to compare two different project snapshots. Should have exposed this to begin with.
- Also found that `ProjectWorkspaceState` was incorrectly marked public, changed it to internal.
This commit is contained in:
N. Taylor Mullen 2019-02-22 16:02:54 -08:00
Родитель 7e1b7b44a1
Коммит 5d9f45c87d
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
@ -42,6 +41,8 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
public override IReadOnlyList<TagHelperDescriptor> TagHelpers => State.TagHelpers;
public override ProjectWorkspaceState ProjectWorkspaceState => State.ProjectWorkspaceState;
public override DocumentSnapshot GetDocument(string filePath)
{
lock (_lock)

Просмотреть файл

@ -18,6 +18,8 @@ namespace Microsoft.CodeAnalysis.Razor.ProjectSystem
public virtual IReadOnlyList<TagHelperDescriptor> TagHelpers { get; }
public virtual ProjectWorkspaceState ProjectWorkspaceState { get; }
public abstract RazorProjectEngine GetProjectEngine();
public abstract DocumentSnapshot GetDocument(string filePath);