Skip to content

Commit

Permalink
fix: Fix link creation for System.Buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
vchirikov committed Mar 9, 2020
1 parent 1b55965 commit 2a1f09e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.1.3"></a>
## 1.1.3 (2020-##-##)

### Features

* Add System.Buffers source support

<a name="1.1.2"></a>
## 1.1.2 (2020-03-07)

Expand Down
14 changes: 10 additions & 4 deletions src/GoToDnSpy/NetstandardTypeToAssemblyMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class NamespaceToAssemblyMapper
"System.Diagnostics",
"System.Reflection",
"System.Text",
"System.Buffers",
"System.Threading",
"System.Net",
"System.Numerics",
Expand All @@ -25,6 +24,7 @@ public class NamespaceToAssemblyMapper
"System.IO",
"System.Globalization",
"System.Collections.Generic",
"System.Buffers.Text",
};

private readonly static string[] _coreLibTypes = new string[] {
Expand All @@ -35,13 +35,19 @@ public class NamespaceToAssemblyMapper

internal string Get(string typeNamespace, string typeName)
{
if (_coreLibStartWithNamespaces.Any(x => x.StartsWith(typeNamespace))
|| _coreLibStandAloneNamespaces.Contains(typeNamespace)
|| _coreLibTypes.Any(x => x.StartsWith(typeName)))
if (_coreLibStartWithNamespaces.Any(x => x.StartsWith(typeNamespace, StringComparison.Ordinal))
|| _coreLibStandAloneNamespaces.Contains(typeNamespace, StringComparer.Ordinal)
|| _coreLibTypes.Any(x => x.StartsWith(typeName, StringComparison.Ordinal)))
{
return "System.Private.CoreLib";
}


if(typeNamespace.StartsWith("System.Buffers", StringComparison.Ordinal))
{
return "System.Memory";
}

var result = CheckNamespace(typeNamespace);
if (result != null)
return result;
Expand Down
2 changes: 1 addition & 1 deletion src/GoToDnSpy/source.extension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed partial class Vsix
public const string Name = "GoToDnSpy";
public const string Description = @"Open dnSpy or source.dot.net and select method or type under caret.";
public const string Language = "en-US";
public const string Version = "1.1.2";
public const string Version = "1.1.3";
public const string Author = "Vladimir Chirikov";
public const string Tags = "GoToDnSpy, GoTo, Disasm, ILSpy, ILDisasm, Disassemble, CIL, IL, MSIL, dnSpy, de4dot, dnlib, decompile, Emit";
}
Expand Down
2 changes: 1 addition & 1 deletion src/GoToDnSpy/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="GoToDnSpy" Version="1.1.2" Language="en-US" Publisher="Vladimir Chirikov" />
<Identity Id="GoToDnSpy" Version="1.1.3" Language="en-US" Publisher="Vladimir Chirikov" />
<DisplayName>GoToDnSpy</DisplayName>
<Description xml:space="preserve">Open dnSpy or source.dot.net and select method or type under caret.</Description>
<MoreInfo>https://github.com/vchirikov/GoToDnSpy</MoreInfo>
Expand Down

0 comments on commit 2a1f09e

Please sign in to comment.