Class Result
Class representing the result of attempting to run an effect
public class Result
- Inheritance
-
Result
- Inherited Members
- Extension Methods
Constructors
Result(State, int, value?)
public Result(State status, int code, value? value = null)
Parameters
Result(State, int, string)
public Result(State status, int code, string value)
Parameters
Result(int, value?)
public Result(int code, value? value = null)
Parameters
code
intvalue
value
Properties
Code
Status-code (typically HTTP)
public int Code { get; }
Property Value
Continuation
Continuations (typically for setting data)
public IEnumerable<Request>? Continuation { get; }
Property Value
Remarks
This does not include the general effect continuation (ok, fail, timeout), which is manually handled by runtime
Status
The status of the operation
public State Status { get; }
Property Value
Value
The value resulting from the operation
public value? Value { get; }
Property Value
- value
Methods
Fail(value?, HttpStatusCode)
public static Result Fail(value? t, HttpStatusCode code)
Parameters
t
valuecode
HttpStatusCode
Returns
Fail(HttpRequestException, string)
public static Result Fail(HttpRequestException ex, string url)
Parameters
ex
HttpRequestExceptionurl
string
Returns
Fail(string, int)
public static Result Fail(string error, int code)
Parameters
Returns
Ok(value?, int)
public static Result Ok(value? t, int code)
Parameters
t
valuecode
int
Returns
Ok(value?, HttpStatusCode)
public static Result Ok(value? t, HttpStatusCode code)
Parameters
t
valuecode
HttpStatusCode
Returns
Timeout()
public static Result Timeout()
Returns
ToString()
public override string ToString()
Returns
WithContinuation(value, IEnumerable<Request>)
public static Result WithContinuation(value v, IEnumerable<Request> continuation)
Parameters
v
valuecontinuation
IEnumerable<Request>