Skip to content

Commit

Permalink
Rename ResultDto<TResult> to ResultDto<TValue>
Browse files Browse the repository at this point in the history
  • Loading branch information
YudAtC2i committed Jan 13, 2022
1 parent eac709f commit abda49d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CSharpFunctionalExtensions/Result/Dto/ResultDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public ResultDto() { }
public static ResultDto Success() => new();
public static ResultDto Failure(string errorMessage) => new(errorMessage);

public static ResultDto<TResult> Success<TResult>(TResult result) => new(result, null);
public static ResultDto<TResult> Failure<TResult>(string errorMessage) => new(default!, errorMessage);
public static ResultDto<TValue> Success<TValue>(TValue result) => new(result, null);
public static ResultDto<TValue> Failure<TValue>(string errorMessage) => new(default!, errorMessage);
}

internal record ResultDto<TResult>(TResult Result, string? ErrorMessage)
internal record ResultDto<TValue>(TValue Result, string? ErrorMessage)
{
[JsonIgnore]
public bool IsSuccess => ErrorMessage is null;
Expand Down

0 comments on commit abda49d

Please sign in to comment.