You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem statement in that linked section above covers exactly what I'm running into.
UID's generated for various classes or methods can be incredibly long, but the length of these IDs isn't what I'm concerned about. I'm more concerned about the fragility of these IDs when they have so many subtle parts baked in.
generates the UID: MyNamespace.MyClass.DoStuff``1(``0,System.Collections.Generic.IEnumerable{System.Nullable{System.Int32}},System.Boolean)
If a developer a month later refactors and determines the nullable int is no longer appropriate and changes the int? to just int above, the UID subtly changes to: MyNamespace.MyClass.DoStuff``1(``0,System.Collections.Generic.IEnumerable{System.Int32},System.Boolean)
While this outcome makes sense, we changed the signature, the developer may not have realized that they just broke a few references in some articles in some other files just because they dropped a ?.
Docfx allows us to make custom UIDs for articles that we can then reference elsewhere easily. Because we only define custom UIDs for articles we want to globally link to, if someone wanted to change that ID, they know they need to update references too.
I'm looking for the exact same thing with referencing code. It would be great to be able to add a documentation comment above methods or classes such as
Then I can reference that method in my articles with much greater confidence by tossing in the <xref:TheDoStuffMethod> and have much less concern of simple, daily changes breaking it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The Docfx documentation here:
https://dotnet.github.io/docfx/spec/metadata_format_spec.html#13-alias
indicates that aliases can be used, yet I cannot find anywhere else that references them or guides me on how to use them.
The problem statement in that linked section above covers exactly what I'm running into.
UID's generated for various classes or methods can be incredibly long, but the length of these IDs isn't what I'm concerned about. I'm more concerned about the fragility of these IDs when they have so many subtle parts baked in.
For example, the following method:
generates the UID:
MyNamespace.MyClass.DoStuff``1(``0,System.Collections.Generic.IEnumerable{System.Nullable{System.Int32}},System.Boolean)
If a developer a month later refactors and determines the nullable int is no longer appropriate and changes the
int?
to justint
above, the UID subtly changes to:MyNamespace.MyClass.DoStuff``1(``0,System.Collections.Generic.IEnumerable{System.Int32},System.Boolean)
While this outcome makes sense, we changed the signature, the developer may not have realized that they just broke a few references in some articles in some other files just because they dropped a
?
.Docfx allows us to make custom UIDs for articles that we can then reference elsewhere easily. Because we only define custom UIDs for articles we want to globally link to, if someone wanted to change that ID, they know they need to update references too.
I'm looking for the exact same thing with referencing code. It would be great to be able to add a documentation comment above methods or classes such as
Then I can reference that method in my articles with much greater confidence by tossing in the
<xref:TheDoStuffMethod>
and have much less concern of simple, daily changes breaking it.Does anything close to this exist?
Beta Was this translation helpful? Give feedback.
All reactions