-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Update F1 keywords for tokens with multiple uses #20799
Copy link
Copy link
Open
Labels
💣 vanQUESTAdded to GH issues that should be removed from Azure DevOpsAdded to GH issues that should be removed from Azure DevOps🔍 Needs ResearchIssues that require investigation from the docs team before implementationIssues that require investigation from the docs team before implementationdotnet-csharp/svcerrors-warnings/subsvcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.okr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Metadata
Metadata
Assignees
Labels
💣 vanQUESTAdded to GH issues that should be removed from Azure DevOpsAdded to GH issues that should be removed from Azure DevOps🔍 Needs ResearchIssues that require investigation from the docs team before implementationIssues that require investigation from the docs team before implementationdotnet-csharp/svcerrors-warnings/subsvcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.okr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Type
Fields
Give feedbackNo fields configured for issues without a type.

A number of C# tokens have different semantics depending on where they appear in the syntax tree. Historically, these tokens have gone to a page for the token, and the reader needs to select a link to the page with the correct content. We can do better. Here are the tokens that have multiple uses, the current page, and the list of uses for that token:
class: goes to class declaration page.default: goes to a landing page to select the use.switchstatementenum: destination describes declaring an enum.enumtypeenum(derived fromSystem.Enum)in: destination is a landing page for user to decide.inas part of aforeachstatement.fromclause in a LINQ query expressionjoinclause in a LINQ query expressioninternal: destination is the page forinternalaccess.internalaccessprotected internalaccessnew: goes to thenewexpression page, with a link to the method modifier.newconstraint on generic type parameterout: landing page for the user to specifyprivate: goes toprivateaccess modifierprivateaccessprivate protectedaccess modifierprotected: goes to the protected access modifierprotectedaccessprotected internalaccessprivate protectedaccessref: goes to the page forrefparameter / argument modifier,refreturn andreflocal. Page has link toref structusage.refparameter / argument modifierrefreturn valuereflocal variable.refstruct declarationstaticpage goes to static modifier on class, field, method, local function, or lambda declarationstaticmodifier.using staticdirective.struct: page goes tostructdeclarations (which includesref structandreadonly struct.structconstraint on a generic type parameter.thispage is forthisreferring to the current instance of a typeusinggoes to a landing page for different uses.usingdirectiveusing staticdirectiveusingstatementpartial: already has separate pages for type and methodpartialtypepartialmethodwhere: already has separate pages for both usageswhereLINQ query expressionwheregeneric constraintThe
readonlymodifier can be used in different contexts, but the meaning is generally the same. It makes sense to keep them on one page.The first step would be to add F1 token meta data for all the correct destination pages. Then, the Visual Studio IDE could update its F1 source to send readers to the updated pages.
/cc @CyrusNajmabadi @davidwengier