View on GitHub
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<TResponse> Interface

ICatResponse<TResponse>.Cast<TTargetResponse>(Func<TResponse,TTargetResponse>) Method

Converts this response’s value to another type, keeping its type and errors.

Cat.Responses.Abstractions.ICatResponse<TTargetResponse> Cast<TTargetResponse>(System.Func<TResponse,TTargetResponse> convertValue);

Type parameters

TTargetResponse

The value type of the resulting response.

Parameters

convertValue System.Func<TResponse,TTargetResponse>

Converts Value to TTargetResponse. Only invoked when the response succeeded.

Returns

Cat.Responses.Abstractions.ICatResponse<TTargetResponse>
A response of the same type, carrying the converted value if it succeeded.