Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: guardrex <1622880+guardrex@users.noreply.github.com>
|
@ilonatommy @oroztocil @dariatiurina ... Are any of you free for a quick approval here? I'll be chatting with DR soon about how we'll get docs PR approvals. Until then ... hopefully just for a day or two ... I'll need a little help getting docs PRs wrapped up and merged. |
| } | ||
| } | ||
|
|
||
| builder.Append($"%60{arity}"); |
There was a problem hiding this comment.
Does this work for generic methods as well? Isn't the convention there to use two backticks rather than one?
There was a problem hiding this comment.
You might be right about it failing in that case. Copilot generated the method, and I'm just trying to quickly get the tool back online.
I'll check on how the API Browser expects the links for generic methods and get back to you.
|
|
||
| if (result.ItemType == "Constructor") | ||
| { | ||
| result.Link = Regex.Replace(result.DisplayName, @"\(.*\)", ".%23ctor%2A"); |
There was a problem hiding this comment.
Does this produce the correct string for a constructor? Isn't there an extra name in the result? (copilot flagged this before in the PR)
There was a problem hiding this comment.
I think Copilot is incorrect. Consider ControllerBase's ctor. It shows up as ...
Therefore, I don't think it has an extra name in the result. Funny thing is that we have ZERO live ctors cross-linked in our almost 900 articles at this time, so I don't have a live example to check to know 100% for sure.
Correction: We do have live ctors ... my first filter didn't catch them. I've confirmed it: There are no double names in the links. For example ...
<xref:Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.%23ctor%2A?displayProperty=nameWithType>... at ...
... correctly resolves to a cross-link that loads the API Browser to the ctor at ...
There was a problem hiding this comment.
Ok, thanks for the explanation.


Fixes #670
CORSPROXY was being used with an open access link (
https://corsproxy.io/?{ENCODED URL}) to hit up the API docs web API for exactms.assetidvalues to determine the XREF links ...Now, CORSPROXY only allows use of their API/NuGet pkg, which requires the API key to be in the app. This is a Blazor WebAssembly app, so it can't keep a secure key. Therefore, I'm going to just hack up a little Regex here to form the links on the fly. Testing seems ok locally, and we'll see how it goes. Please message me any bugs/errors that the build system throws from XREF links generated by the tool. If that occurs, I'll seek to improve the tool's logic.
UPDATE ... Copilot really went ALL IN with the
ReplaceGenericAritymethod here. 😄 That should deal with the type placeholders for API likeDictionary<TKey, TValue>, which should resolve to a link of<xref:...Dictionary%602>(not%601for a single type). Again, we'll see how things go. Proxying was best because it would get the actual link descriptor from the API docs system without having to jump through hoops. If this manual approach doesn't work out down the road, I'm going to try and find a CORSPROXY alternative.