-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SuccessfulResult static property #14
Conversation
Remora.Results/Result.cs
Outdated
/// The <see cref="Inner"/> property is also set to null. | ||
/// </para> | ||
/// </remarks> | ||
public static IResult SuccessfulResult { get; } = FromSuccess(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd shorten this to Success
since it's a static property and it'll always be called with a reference to the Result
type.
Consider adding a matching property to the typed result struct as well for symmetry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortened, added a matching property to the typed result aswell.
…prop, add props to ResultOfT
This PR adds a
SuccessfulResult
static property toResult
much likeValueTask
's /Task
'sCompletedTask
property with a cached boxed instance of a successful result.