Skip to content

Provide analyzer + code fix for turning sync command to async and viceversa #38

Description

@kzu

The command class is annotated with a marker interface that determines if the command is synchronous or asynchronous. This marker interface needs to be kept in sync with the command handler, which must use either ICommandHandler or IAsyncCommandHandler and there's a type constraint on that interface as well to ensure both align.

This makes it cumbersome to turn a sync implementation into async by just changing the command handler interface being implemented from ICommandHandler<T> to IAsyncCommandHandler<T>, since we need to also go to the command T and change the interface there. Since it's the handler the one that drives the implementation/invocation style required of the command, it would be convenient to have an analyzer + codefix that can automatically change the command's interface if we change the implementation (handler) one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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