Class CarrotResponse<TRequest, TResponse>
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
TRequestThe type of the original request.
TResponseThe type of the response.
- Inheritance
-
CarrotResponse<TRequest, TResponse>
- Implements
- 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
statusCodeintThe 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
contentTResponseThe response of the request.
requestTRequestThe 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