Skip to content

[C# APIView] Static reaction types are incorrectly flagged as needing an enum #10049

Description

@azure-sdk-automation

Bad code snippet:

public static class ReactionTypes {

This APIView comment is misrepresenting the code by claiming that known value sets must use an enum (or readonly struct if extensible). The architect noted that this guidance is out-of-date, and that using string literals/static value-holder classes is valid in many .NET types.

Good code snippet:

public static class ReactionTypes
{
    public const string Like = "like";
    public const string Love = "love";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions