True), then you can access the value using the Value property.
False), then the OVRResult does not have a value, and it is an error to access the Value property. In this case, the Status property will contain an error code.
HasValue
: bool
[Get] |
Gets a bool indicating whether the result has a value.
Signature
bool OVRResult< TValue, TStatus >.HasValue |
Status
: TStatus
[Get] |
Gets the status of the result.
Signature
TStatus OVRResult< TValue, TStatus >::Status |
Success
: bool
[Get] |
Gets a bool indicating whether the result is a success.
Signature
bool OVRResult< TValue, TStatus >::Success |
Value
: TValue
[Get] |
The value of the result.
Signature
TValue OVRResult< TValue, TStatus >.Value |
Equals
(
other
)
|
Determines whether the current OVRResult<TStatus> is equal to another OVRResult<TStatus>.
Signature
bool OVRResult< TValue, TStatus >.Equals(OVRResult< TStatus > other) Parameters Returns bool true if the specified OVRResult<TStatus> is equal to the current OVRResult<TStatus>; otherwise, false.
|
Equals
(
obj
)
|
Determines whether the current OVRResult<TStatus> is equal to another object.
Signature
override bool OVRResult< TValue, TStatus >.Equals(object obj) Parameters obj: object
The object to compare with the current OVRResult<TStatus>.
Returns override bool true if the specified object is equal to the current OVRResult<TStatus>; otherwise, false.
|
Equals
(
other
)
|
Determines whether the current OVRResult<TValue, TStatus> is equal to another OVRResult<TValue, TStatus>.
Signature
bool OVRResult< TValue, TStatus >.Equals(OVRResult< TValue, TStatus > other) Parameters Returns bool true if the specified OVRResult<TValue, TStatus> is equal to the current OVRResult<TValue, TStatus>; otherwise, false.
|
Equals
(
obj
)
|
Determines whether the current OVRResult<TValue, TStatus> is equal to another object.
Signature
override bool OVRResult< TValue, TStatus >.Equals(object obj) Parameters obj: object
The object to compare with the current OVRResult<TValue, TStatus>.
Returns override bool true if the specified object is equal to the current OVRResult<TValue, TStatus>; otherwise, false.
|
Equals
()
|
Signature
override bool TStatus other && OVRResult< TValue, TStatus >.Equals(other) Parameters otherReturns override bool TStatus other && |
GetHashCode
()
|
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int OVRResult< TValue, TStatus >.GetHashCode() Returns override int
A hashcode for this result.
|
GetHashCode
()
|
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int OVRResult< TValue, TStatus >.GetHashCode() Returns override int
A hashcode for this result.
|
ToString
()
|
Generates a string representation of this result object.
The string representation is the stringification of Status, or "(invalid result)" if this result object has not been initialized.
Signature
override string OVRResult< TValue, TStatus >.ToString() Returns override string
A string representation of this OVRResult<TStatus>
|
ToString
()
|
Generates a string representation of this result object.
Signature
override string OVRResult< TValue, TStatus >.ToString() Returns override string
A string representation of this OVRResult<TStatus>
|
TryGetValue
(
value
)
|
Tries to retrieve the value of the result.
Signature
bool OVRResult< TValue, TStatus >.TryGetValue(out TValue value) Parameters value: out TValue
When this method returns, contains the value of the result if the result was successful; otherwise, the default value.
Returns bool true if the result was successful and the value is retrieved; otherwise, false.
|
From
(
status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified status.
Signature
static OVRResult< TStatus > OVRResult< TValue, TStatus >.From(TStatus status) Parameters status: TStatus
The status.
|
From
(
value
, status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified value and status.
Signature
static OVRResult< TValue, TStatus > OVRResult< TValue, TStatus >.From(TValue value, TStatus status) Parameters value: TValue
The value.
status: TStatus
The status.
Returns OVRResult< TValue, TStatus >
A new OVRResult<TValue, TStatus> with the specified value and status.
|
From< TResult, TStatus >
(
result
, status
)
|
Signature
static OVRResult< TResult, TStatus > OVRResult< TValue, TStatus >.From< TResult, TStatus >(TResult result, TStatus status) Parameters result: TResultstatus: TStatusReturns OVRResult< TResult, TStatus > |
From< TStatus >
(
status
)
|
Signature
static OVRResult< TStatus > OVRResult< TValue, TStatus >.From< TStatus >(TStatus status) Parameters status: TStatusReturns OVRResult< TStatus > |
FromFailure
(
status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified failure status.
Signature
static OVRResult< TStatus > OVRResult< TValue, TStatus >.FromFailure(TStatus status) Parameters status: TStatus
The status (must be a valid failure status).
Throws ArgumentException
Thrown when status is not a valid failure status.
|
FromFailure
(
status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified failure status.
Signature
static OVRResult< TValue, TStatus > OVRResult< TValue, TStatus >.FromFailure(TStatus status) Parameters status: TStatus
The status (must be a valid failure status).
Throws ArgumentException
Thrown when status is not a valid failure status.
|
FromSuccess
(
status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified success status.
Signature
static OVRResult< TStatus > OVRResult< TValue, TStatus >.FromSuccess(TStatus status) Parameters status: TStatus
The status (must be a valid success status).
Throws ArgumentException
Thrown when status is not a valid success status.
|
FromSuccess
(
value
, status
)
|
Creates a new OVRResult<TValue, TStatus> with the specified value and a success status.
Signature
static OVRResult< TValue, TStatus > OVRResult< TValue, TStatus >.FromSuccess(TValue value, TStatus status) Parameters value: TValue
The value.
status: TStatus
The status (must be a valid success status).
Returns OVRResult< TValue, TStatus >
A new OVRResult<TValue, TStatus> with the specified value and status.
Throws ArgumentException
Thrown when status is not a valid success status.
|