Re-add some Legacy ITagHelperResolver infrastructure.
- This is required until the TagHelperProjectSystem is completed.
This commit is contained in:
parent
44b4bf6bc6
commit
520876e55d
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue