Skip to content

Identify, correct confusion of enumeration types and properties that return them  #3093

Open
@rpetrusha

Description

@rpetrusha

Identify, correct confusion of enumeration types and properties that return them

One of the patterns that we've noticed in the enumeration documentation is a confusion of the enumeration type and the member that returns that enumeration type. For example:

If the DayOfWeek property is set to DayOfWeek.Sunday, then...

should instead be something like:

If the DateTime.DayOfWeek or DateTimeOffset.DayOfWeek property is set to DayOfWeek.Sunday...

It would be nice to identify and correct these. They can be found using a literal string search and a regular expression:

  1. In each .xml file in the dotnet/dotnet-api-docs repo, look for the string <BaseTypeName>System.Enum</BaseTypeName>, which identifies an enumeration type.

  2. In each file for an enumeration type, use a regular expression to identify this pattern. The enumeration type's DocId would be one capturing group (<TypeSignature Language="DocId" Value="T:fully-qualified-type-name" />), while a second would be the fully qualified type name.

  3. That first capturing group would be matched later in the file by a regex pattern like \k<docid>.+?\<F:\k<fullname>\.\w+\>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Runtimehelp wantedGood for community contributors to help [up-for-grabs]

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions