Class ResponseSubscription<TRequest, TResponse>
Represents a subscription to a CarrotMQ response CarrotResponse<TRequest, TResponse>
public class ResponseSubscription<TRequest, TResponse> where TRequest : _IRequest<TRequest, TResponse> where TResponse : class
Type Parameters
TRequestThe type of the original request that generated this response.
TResponseThe type of the response.
- Inheritance
-
ResponseSubscription<TRequest, TResponse>
- Inherited Members
Remarks
You can register this subscription with AddResponseSubscription<TRequest, TResponse>() when configuring the DI.
Constructors
ResponseSubscription(ILogger<ResponseSubscription<TRequest, TResponse>>)
public ResponseSubscription(ILogger<ResponseSubscription<TRequest, TResponse>> logger)
Parameters
loggerILogger<ResponseSubscription<TRequest, TResponse>>
Fields
ResponseReceived
An event handler that is invoked when a CarrotMQ response of type CarrotResponse<TRequest, TResponse>> is received.
public AsyncEventHandler<ResponseSubscriptionEventArgs<TRequest, TResponse>>? ResponseReceived
Field Value
- AsyncEventHandler<ResponseSubscriptionEventArgs<TRequest, TResponse>>