Table of Contents

Class CarrotResponse<TRequest, TResponse>

Namespace
CarrotMQ.Core
Assembly
CarrotMQ.Core.dll

Response of a call sent over CarrotClient with the response object Content wrapped inside

public class CarrotResponse<TRequest, TResponse> : CarrotResponse, _IRequest<CarrotResponse<TRequest, TResponse>, NoResponse>, _IMessage<CarrotResponse<TRequest, TResponse>, NoResponse> where TRequest : _IRequest<TRequest, TResponse> where TResponse : class

Type Parameters

TRequest

The type of the original request.

TResponse

The type of the response.

Inheritance
CarrotResponse<TRequest, TResponse>
Implements
_IRequest<CarrotResponse<TRequest, TResponse>, NoResponse>
_IMessage<CarrotResponse<TRequest, TResponse>, NoResponse>
Inherited Members

Constructors

CarrotResponse()

Initializes a new instance of the CarrotResponse<TRequest, TResponse> class.

public CarrotResponse()

CarrotResponse(int)

Initializes a new instance of the CarrotResponse<TRequest, TResponse> class with the specified status code.

public CarrotResponse(int statusCode)

Parameters

statusCode int

The status code of the response.

CarrotResponse(TResponse?, TRequest?)

Initializes a new instance of the CarrotResponse<TRequest, TResponse> class with the specified response and original request.

public CarrotResponse(TResponse? content, TRequest? request)

Parameters

content TResponse

The response of the request.

request TRequest

The original request which generated this response.

Properties

Content

The content of the response.

public TResponse? Content { get; set; }

Property Value

TResponse

Request

The original request which generated this response

public TRequest? Request { get; set; }

Property Value

TRequest