Skip to content

Commit 04e83e1

Browse files
committed
PR Feedback
1 parent 06db46e commit 04e83e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Razor.CohostingShared/RazorAnalyzerAssemblyRedirector.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// Licensed under the MIT license. See License.txt in the project root for license information.
33

44
using System;
5+
using System.Collections.Frozen;
56
using System.Collections.Immutable;
7+
using System.Composition;
68
using System.IO;
79
using System.Reflection;
8-
using System.Composition;
910
using IRazorAnalyzerAssemblyRedirector = Microsoft.CodeAnalysis.ExternalAccess.Razor.RazorAnalyzerAssemblyRedirector.IRazorAnalyzerAssemblyRedirector;
1011

1112
namespace Microsoft.VisualStudio.Razor;
@@ -15,7 +16,7 @@ namespace Microsoft.VisualStudio.Razor;
1516
[Export(typeof(IRazorAnalyzerAssemblyRedirector))]
1617
[method: ImportingConstructor]
1718
#pragma warning restore RS0030 // Do not use banned APIs
18-
internal class RazorAnalyzerAssemblyRedirector() : IRazorAnalyzerAssemblyRedirector
19+
internal sealed class RazorAnalyzerAssemblyRedirector() : IRazorAnalyzerAssemblyRedirector
1920
{
2021
private static readonly ImmutableArray<Type> s_compilerAssemblyTypes = [
2122

@@ -27,7 +28,7 @@ internal class RazorAnalyzerAssemblyRedirector() : IRazorAnalyzerAssemblyRedirec
2728
typeof(ImmutableArray) // System.Collections.Immutable.dll
2829
];
2930

30-
private static readonly ImmutableDictionary<string, string> s_compilerAssemblyMap = s_compilerAssemblyTypes.ToImmutableDictionary(t => t.Assembly.GetName().Name!, t => GetAssemblyLocation(t.Assembly));
31+
private static readonly FrozenDictionary<string, string> s_compilerAssemblyMap = s_compilerAssemblyTypes.ToFrozenDictionary(t => t.Assembly.GetName().Name!, t => GetAssemblyLocation(t.Assembly));
3132

3233
public string? RedirectPath(string fullPath)
3334
{

0 commit comments

Comments
 (0)