Re-add some Legacy ITagHelperResolver infrastructure.

- This is required until the TagHelperProjectSystem is completed.
This commit is contained in:
N. Taylor Mullen 2017-11-14 16:49:35 -08:00
parent 44b4bf6bc6
commit 520876e55d
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Razor;
namespace Microsoft.VisualStudio.LanguageServices.Razor
{
// ----------------------------------------------------------------------------------------------------
// NOTE: This is only here for VisualStudio binary compatibility. This type should not be used; instead
// use the Microsoft.CodeAnalysis.Razor variant from Microsoft.CodeAnalysis.Razor.Workspaces
// ----------------------------------------------------------------------------------------------------
public interface ITagHelperResolver
{
Task<TagHelperResolutionResult> GetTagHelpersAsync(Project project);
}
}

View File

@ -0,0 +1,24 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Razor;
namespace Microsoft.VisualStudio.LanguageServices.Razor
{
// ----------------------------------------------------------------------------------------------------
// NOTE: This is only here for VisualStudio binary compatibility. This type should not be used; instead
// use TagHelperResolver.
// ----------------------------------------------------------------------------------------------------
[Export(typeof(ITagHelperResolver))]
internal class LegacyTagHelperResolver : DefaultTagHelperResolver, ITagHelperResolver
{
[ImportingConstructor]
public LegacyTagHelperResolver(
[Import(typeof(VisualStudioWorkspace))] Workspace workspace)
: base(workspace.Services.GetRequiredService<ErrorReporter>(), workspace)
{
}
}
}