-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store WellKnownTypeProvider (from dotnet/roslyn-analyzers) in TagHelp…
…erDescriptorProviderContext
- Loading branch information
Showing
23 changed files
with
477 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Compiler/Microsoft.CodeAnalysis.Razor/src/PublicAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#nullable enable | ||
*REMOVED*~static Microsoft.CodeAnalysis.Razor.TagHelperDescriptorProviderContextExtensions.SetCompilation(this Microsoft.AspNetCore.Razor.Language.TagHelperDescriptorProviderContext context, Microsoft.CodeAnalysis.Compilation compilation) -> void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/Compiler/Microsoft.CodeAnalysis.Razor/src/SymbolVisibility.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.CodeAnalysis.Razor; | ||
|
||
internal enum SymbolVisibility | ||
{ | ||
Public = 0, | ||
Internal = 1, | ||
Private = 2, | ||
Friend = Internal, | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Compiler/Microsoft.CodeAnalysis.Razor/src/SymbolVisibilityExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
|
||
namespace Microsoft.CodeAnalysis.Razor; | ||
|
||
/// <summary> | ||
/// Extensions for <see cref="SymbolVisibility"/>. | ||
/// </summary> | ||
internal static class SymbolVisibilityExtensions | ||
{ | ||
/// <summary> | ||
/// Determines whether <paramref name="typeVisibility"/> is at least as visible as <paramref name="comparisonVisibility"/>. | ||
/// </summary> | ||
/// <param name="typeVisibility">The visibility to compare against.</param> | ||
/// <param name="comparisonVisibility">The visibility to compare with.</param> | ||
/// <returns>True if one can say that <paramref name="typeVisibility"/> is at least as visible as <paramref name="comparisonVisibility"/>.</returns> | ||
/// <remarks> | ||
/// For example, <see cref="SymbolVisibility.Public"/> is at least as visible as <see cref="SymbolVisibility.Internal"/>, but <see cref="SymbolVisibility.Private"/> is not as visible as <see cref="SymbolVisibility.Public"/>. | ||
/// </remarks> | ||
public static bool IsAtLeastAsVisibleAs(this SymbolVisibility typeVisibility, SymbolVisibility comparisonVisibility) | ||
{ | ||
return typeVisibility switch | ||
{ | ||
SymbolVisibility.Public => true, | ||
SymbolVisibility.Internal => comparisonVisibility != SymbolVisibility.Public, | ||
SymbolVisibility.Private => comparisonVisibility == SymbolVisibility.Private, | ||
_ => throw new ArgumentOutOfRangeException(nameof(typeVisibility), typeVisibility, null), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Compiler/Microsoft.CodeAnalysis.Razor/src/WellKnownTypeNames.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.CodeAnalysis.Razor; | ||
|
||
internal static class WellKnownTypeNames | ||
{ | ||
public const string SystemThreadingTasksTask1 = "System.Threading.Tasks.Task`1"; | ||
} |
Oops, something went wrong.