-
Notifications
You must be signed in to change notification settings - Fork 0
Fix invalid C# syntax and dead links for ref/out/in parameters in rendered docs #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,50 @@ | ||
| namespace ApiMark.DotNet.Fixtures; | ||
|
|
||
| /// <summary>Fixture reference type used as the target of <c>ref</c>/<c>out</c>/<c>in</c> parameters in <see cref="ByRefParameterClass"/>.</summary> | ||
| public class ByRefTargetClass | ||
| { | ||
| /// <summary>Gets or sets a sample value.</summary> | ||
| public int Value { get; set; } | ||
| } | ||
|
|
||
| /// <summary>Fixture class for testing <c>ref</c>/<c>out</c>/<c>in</c> parameter rendering in signatures and links.</summary> | ||
| /// <remarks> | ||
| /// Used to verify that byref parameters render the correct C# keyword (<c>out</c>/<c>in</c>/<c>ref</c>) | ||
| /// and that the underlying type name — not Cecil's byref-suffixed name — is used for both the | ||
| /// displayed type and any generated documentation link. | ||
| /// </remarks> | ||
| public class ByRefParameterClass | ||
| { | ||
| /// <summary>Attempts to resolve a value by name.</summary> | ||
| /// <param name="name">The name to resolve.</param> | ||
| /// <param name="value">The resolved value.</param> | ||
| /// <returns><c>true</c> if resolved; otherwise, <c>false</c>.</returns> | ||
| public bool TryResolve(string name, out ByRefTargetClass value) | ||
| { | ||
| value = new ByRefTargetClass(); | ||
| return name.Length > 0; | ||
| } | ||
|
|
||
| /// <summary>Increments the given value in place.</summary> | ||
| /// <param name="value">The value to increment.</param> | ||
| public void Increment(ref ByRefTargetClass value) | ||
| { | ||
| _ = value; | ||
| } | ||
|
|
||
| /// <summary>Inspects the given value without modifying it.</summary> | ||
| /// <param name="value">The value to inspect.</param> | ||
| public void Inspect(in ByRefTargetClass value) | ||
| { | ||
| _ = value; | ||
| } | ||
|
|
||
| /// <summary>Returns a reference to the backing field's element.</summary> | ||
| /// <returns>A reference to the stored value.</returns> | ||
| public ref ByRefTargetClass GetByRef() | ||
| { | ||
| return ref _stored; | ||
| } | ||
|
|
||
| private ByRefTargetClass _stored = new(); | ||
|
Check warning on line 49 in test/ApiMark.DotNet.Fixtures/ByRefParameterClass.cs
|
||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.