-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from candy-kingdom/feature/44-cref-fix
Refine `cref` handling
- Loading branch information
Showing
96 changed files
with
922 additions
and
385 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
# [Summary.Caching.CrefCache](../src/Core/Caching/CrefCache.cs#L9) | ||
```cs | ||
public static partial class CrefCache | ||
``` | ||
|
||
A cache of different `cref` conversions. | ||
|
||
## Methods | ||
### [AsCref(string)](../src/Core/Caching/CrefCache.cs#L30) | ||
```cs | ||
public static string AsCref(this string self) | ||
``` | ||
|
||
Converts the given string into the format of `cref` attribute value. | ||
|
||
#### Example | ||
In the following example, the `"Some<T1, T2>"` string | ||
(which represents the name of some type) | ||
is converted into `"Some{T1,T2}"` as if it was a value of a link | ||
(e.g., <see cref="Some{T1,T2}">): | ||
```cs | ||
var a = "Some<T1, T2>"; | ||
var b = a.AsCref(); | ||
<br/> | ||
b.Should().Be("Some{T1,T2}"); | ||
``` | ||
|
||
### [AsRawCref(string)](../src/Core/Caching/CrefCache.cs#L51) | ||
```cs | ||
public static string AsRawCref(this string self) | ||
``` | ||
|
||
Converts the given string into the format of `cref` attribute value | ||
but also removes all generic parameter names. | ||
|
||
#### Example | ||
In the following example, the `"Some<T1, T2>"` string | ||
(which represents the name of some type) | ||
is converted into `"Some{,}"`, the raw form of `cref` that can be used for comparisons | ||
without involving generic type parameter names. | ||
```cs | ||
var a = "Some<T1, T2>"; | ||
var b = a.AsCref(); | ||
<br/> | ||
b.Should().Be("Some{,}"); | ||
``` | ||
|
||
### [FromCref(string)](../src/Core/Caching/CrefCache.cs#L73) | ||
```cs | ||
public static string FromCref(this string self) | ||
``` | ||
|
||
Converts the given string from the format of `cref` attribute value. | ||
|
||
#### Example | ||
In the following example, the `"Some{T1,T2}"` string | ||
(which represents the name of some type in the `cref` format) | ||
is converted into `"Some<T1, T2>` so that it can be displayed somewhere. | ||
```cs | ||
var a = "Some{T1,T2}"; | ||
var b = a.AsCref(); | ||
<br/> | ||
b.Should().Be("Some<T1, T2>"); | ||
``` | ||
|
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# [Summary.DocCommentLink](../src/Core/DocCommentLink.cs#L9) | ||
```cs | ||
public record DocCommentLink(DocMember? Member, string Value) : DocCommentNode | ||
``` | ||
|
||
A [`DocCommentNode`](./Summary.DocCommentNode.md) that represents the link to other member (e.g. `<see cref="SomeMember"/>`). | ||
|
||
## Properties | ||
### [Member](../src/Core/DocCommentLink.cs#L9) | ||
```cs | ||
public DocMember? Member { get; } | ||
``` | ||
|
||
The doc member the link references to. | ||
|
||
### [Value](../src/Core/DocCommentLink.cs#L9) | ||
```cs | ||
public string Value { get; } | ||
``` | ||
|
||
The name of the member the link links to. | ||
|
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.