Move RazorCompletionFactsService to CodeAnalysis.Workspaces.Razor.
- Also updated workspaces test project to also compile for netcoreapp2.2.
This commit is contained in:
parent
b20921741c
commit
2b1bdb7342
|
|
@ -1,17 +1,15 @@
|
|||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Composition;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
using Microsoft.AspNetCore.Razor.Language.Legacy;
|
||||
using Microsoft.AspNetCore.Razor.Language.Syntax;
|
||||
|
||||
namespace Microsoft.VisualStudio.Editor.Razor
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
[System.Composition.Shared]
|
||||
[Shared]
|
||||
[Export(typeof(RazorCompletionFactsService))]
|
||||
internal class DefaultRazorCompletionFactsService : RazorCompletionFactsService
|
||||
{
|
||||
|
|
@ -84,7 +82,7 @@ namespace Microsoft.VisualStudio.Editor.Razor
|
|||
}
|
||||
|
||||
// Internal for testing
|
||||
internal static bool IsDirectiveCompletableToken(SyntaxToken token)
|
||||
internal static bool IsDirectiveCompletableToken(AspNetCore.Razor.Language.Syntax.SyntaxToken token)
|
||||
{
|
||||
return token.Kind == SyntaxKind.Identifier ||
|
||||
// Marker symbol
|
||||
|
|
@ -4,9 +4,9 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
|
||||
namespace Microsoft.VisualStudio.Editor.Razor
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
public abstract class RazorCompletionFactsService
|
||||
internal abstract class RazorCompletionFactsService
|
||||
{
|
||||
public abstract IReadOnlyList<RazorCompletionItem> GetCompletionItems(RazorSyntaxTree syntaxTree, SourceSpan location);
|
||||
}
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualStudio.Editor.Razor
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
public sealed class RazorCompletionItem
|
||||
internal sealed class RazorCompletionItem
|
||||
{
|
||||
public RazorCompletionItem(
|
||||
string displayText,
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.VisualStudio.Editor.Razor
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
public enum RazorCompletionItemKind
|
||||
internal enum RazorCompletionItemKind
|
||||
{
|
||||
Directive
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Razor.Language;
|
|||
using Microsoft.AspNetCore.Razor.Language.Legacy;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Completion;
|
||||
using Microsoft.CodeAnalysis.Razor;
|
||||
using Microsoft.CodeAnalysis.Tags;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net46;$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFrameworks>net46;netcoreapp2.2;$(StandardTestTfms)</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Razor.Language.Syntax;
|
|||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.VisualStudio.Editor.Razor
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
public class DefaultRazorCompletionFactsServiceTest
|
||||
{
|
||||
|
|
@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Razor.Language;
|
|||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Completion;
|
||||
using Microsoft.CodeAnalysis.Options;
|
||||
using Microsoft.CodeAnalysis.Razor;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion;
|
||||
using Microsoft.VisualStudio.Text;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Razor.Language;
|
||||
using Microsoft.AspNetCore.Razor.Language.Extensions;
|
||||
using Microsoft.AspNetCore.Razor.Language.Legacy;
|
||||
using Microsoft.CodeAnalysis.Razor;
|
||||
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion;
|
||||
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data;
|
||||
using Microsoft.VisualStudio.Text;
|
||||
|
|
|
|||
Loading…
Reference in New Issue