Enable IntelliSense for new component parameters.
- Added a `FilePathComparison` object since not all string methods allow a comparer.
- Updated `RazorDirectiveCompletionProvider` to also understand `.razor` files. This is an edge case scenario where users have disabled modern completion and are using Razor components (you need a reg key to disable the modern completion or MS needs to disable it).
- Tested this in VS by referencing the latest Razor SDK (preview 3) from NuGet and then replacing the Razor design time targets in VS to be the ones from the preview 3 package.
- Added workspace project state change detector tests.
dotnet/aspnetcore-tooling#8064
\n\nCommit migrated from 6a83ed13fc
This commit is contained in:
parent
1657080589
commit
b3d727b631
|
|
@ -0,0 +1,30 @@
|
|||
// 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.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.CodeAnalysis.Razor
|
||||
{
|
||||
internal static class FilePathComparison
|
||||
{
|
||||
private static StringComparison? _instance;
|
||||
|
||||
public static StringComparison Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
_instance = StringComparison.Ordinal;
|
||||
}
|
||||
else if (_instance == null)
|
||||
{
|
||||
_instance = StringComparison.OrdinalIgnoreCase;
|
||||
}
|
||||
|
||||
return _instance.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue