Operator implicit operator
implicit operator T(ApiResponse<T>)
Implicitly converts the ApiResponse<T> to its value if the response was successful.
public static implicit operator T(ApiResponse<T> response)
Parameters
response
ApiResponse<T>The API response.
Returns
- T
The value contained in the response.
Exceptions
- InvalidCastException
Thrown if the response was not successful or the value is null.