blob: 4e8dcc8dd909ed6e5fbcabcaa6acbbd482614eec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
using System;
namespace CsvHelper.DocsGenerator
{
public class LinkGenerator
{
public string GenerateLink(Type type)
{
if (type.Namespace.StartsWith("CsvHelper"))
{
return $"[{type.Name}](/api/{type.Namespace}/{type.Name})";
}
var fullName = $"{type.Namespace}.{type.Name}";
return $"[{type.Name}](https://docs.microsoft.com/en-us/dotnet/api/{fullName.ToLower()})";
}
}
}
|