| Clean Architecture Toolkit for .NET | |||||
|
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications. It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design. |
|
||||
|
| HOME | MODULE OVERVIEW | DEMO | CAT.RESPONSES | |
|||||
Code Reference
» Cat.Responses.Abstractions Assembly » Cat.Responses.Abstractions Namespace » ICatResponse Interface
ICatResponse.Cast Method
| Overloads | |
|---|---|
| Cast<TResponse>() | Converts this response into an ICatResponse<TResponse>, carrying over its type and errors. Only valid when IsFailed is true, since no value is supplied for the succeeded case. |
| Cast<TResponse>(TResponse) | Converts this response into an ICatResponse<TResponse> carrying the given value, keeping this response’s type. |
ICatResponse.Cast<TResponse>() Method
Converts this response into an ICatResponse<TResponse>, carrying over its type and errors.
Only valid when IsFailed is true, since no value is supplied for the succeeded case.
Cat.Responses.Abstractions.ICatResponse<TResponse> Cast<TResponse>();
Type parameters
TResponse
The value type of the resulting response.
Returns
Cat.Responses.Abstractions.ICatResponse<TResponse>
A failed response with the same type and errors.
ICatResponse.Cast<TResponse>(TResponse) Method
Converts this response into an ICatResponse<TResponse> carrying the given value, keeping this response’s type.
Cat.Responses.Abstractions.ICatResponse<TResponse> Cast<TResponse>(TResponse value);
Type parameters
TResponse
The value type of the resulting response.
Parameters
value TResponse
The value to carry on the resulting response. Only used when IsSucceeded is true.
Returns
Cat.Responses.Abstractions.ICatResponse<TResponse>
A response with the same type, carrying value if it succeeded.