Merge pull request #42 from georgeduckett/master

Make TypeNameHelper public, rather than internal
This commit is contained in:
Ben Adams
2018-02-22 17:18:00 +00:00
committed by GitHub

View File

@@ -4,12 +4,12 @@
using System.Collections.Generic;
using System.Text;
namespace System.Diagnostics.Internal
namespace System.Diagnostics
{
// Adapted from https://github.com/aspnet/Common/blob/dev/shared/Microsoft.Extensions.TypeNameHelper.Sources/TypeNameHelper.cs
internal class TypeNameHelper
public class TypeNameHelper
{
private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
public static readonly Dictionary<Type, string> BuiltInTypeNames = new Dictionary<Type, string>
{
{ typeof(void), "void" },
{ typeof(bool), "bool" },
@@ -70,7 +70,7 @@ namespace System.Diagnostics.Internal
{
ProcessArrayType(builder, type, options);
}
else if (_builtInTypeNames.TryGetValue(type, out var builtInName))
else if (BuiltInTypeNames.TryGetValue(type, out var builtInName))
{
builder.Append(builtInName);
}