Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roslyn analyzer to prevent dispatching messages incorrectly #6866

Open
SeanFeldman opened this issue Sep 23, 2023 · 1 comment
Open

Roslyn analyzer to prevent dispatching messages incorrectly #6866

SeanFeldman opened this issue Sep 23, 2023 · 1 comment

Comments

@SeanFeldman
Copy link
Contributor

Describe the feature.

Is your feature related to a problem? Please describe.

Publishing events and sending commands is validating at run-time. Having an analyzer to detect that during development time would be very helpful.

Describe the requested feature

When encountering one of these scenarios, e.g.

context.Publish(command);
// or
context.Send(event);

Have the Roslyn analyzer generate an error with a fix to the correct operation.

Additional Context

There are potential complications, such as message conventions.

@kbaley
Copy link
Member

kbaley commented Sep 26, 2023

That's a good suggestion for cases when you use the marker interfaces. We'll keep this in mind for a future enhancement. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants