Using CSharpFunctionalExtensions, how can I create a Result type, that has an Error type, but no specific success type? (as there is already Result.IsSuccess, which is sufficient for me).
I tried this, however that looses the information about the Error generic type parameter:
private Result Validate()
{
if(false)
{
return Result.Failure<Error>(new Error
{
Code = "ERROR_CODE",
Message = "ERROR_MESSAGE"
});
}
return Result.Success();
}