-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[closes gh-58] Added tests for Roslyn 2.0 and fixed the logic accordi…
…ngly.
- Loading branch information
Showing
35 changed files
with
320 additions
and
41 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
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
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
26 changes: 21 additions & 5 deletions
26
MirrorSharp.Common/Internal/Reflection/SignatureHelpParameterData.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
25 changes: 25 additions & 0 deletions
25
MirrorSharp.Common/Internal/Reflection/TaggedTextExtensions.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,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Immutable; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Threading.Tasks; | ||
using AshMind.Extensions; | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace MirrorSharp.Internal.Reflection { | ||
internal static class TaggedTextExtensions { | ||
private static readonly Lazy<Func<SymbolDisplayPartKind, string>> _getTag = new Lazy<Func<SymbolDisplayPartKind, string>>( | ||
() => RoslynTypes.SymbolDisplayPartKindTags | ||
.GetMethod("GetTag", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static) | ||
.CreateDelegate<Func<SymbolDisplayPartKind, string>>() | ||
); | ||
|
||
public static ImmutableArray<TaggedText> ToTaggedText(this IEnumerable<SymbolDisplayPart> displayParts) { | ||
if (displayParts == null) | ||
return ImmutableArray<TaggedText>.Empty; | ||
|
||
return displayParts.Select(d => new TaggedText(_getTag.Value(d.Kind), d.ToString())).ToImmutableArray(); | ||
} | ||
} | ||
} |
Oops, something went wrong.