Roslyn Analyzer
MassTransit has a code analyzer which detects and provides code fixes which can be helpful to identify potential issues.
Message Initializers
Message Initializers are used to initialize a message without having to create a backing class.
The analyzer supports methods that accept an object
values argument, including:
ISendEndpoint.Send<T>(object values)
IPublishEndpoint.Publish<T>(object values)
ConsumeContext.RespondAsync<T>(object values)
ConsumeContext CancellationToken
The analyzer is similar to CA2016, but it is able to recognize when CancellationToken
is present from ConsumeContext
or any its implementation.
Table of Contents