Show / Hide Table of Contents

Struct GetValueResult

Represents the outcome of TryGetValueAsync(String, CancellationToken)

Implements
System.IEquatable<GetValueResult>
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ZptSharp.Expressions
Assembly: ZptSharp.Abstractions.dll
Syntax
public struct GetValueResult : IEquatable<GetValueResult>

Constructors

| Improve this Doc View Source

GetValueResult(Boolean, Object)

Initializes a new instance of the GetValueResult struct.

Declaration
public GetValueResult(bool success, object result)
Parameters
Type Name Description
System.Boolean success

If set to true then this instance indicates success.

System.Object result

The retrieved result.

Properties

| Improve this Doc View Source

Failure

Gets a GetValueResult which indicates failure to retrieve a result.

Declaration
public static GetValueResult Failure { get; }
Property Value
Type Description
GetValueResult

A failure result.

| Improve this Doc View Source

Success

Gets a value indicating whether a value was successfully retrieved or not.

Declaration
public bool Success { get; }
Property Value
Type Description
System.Boolean

true if a value was retrieved; otherwise, false.

| Improve this Doc View Source

Value

Gets the value which was retrieved, or a null reference if Success is false.

Declaration
public object Value { get; }
Property Value
Type Description
System.Object

The retrieved result.

Methods

| Improve this Doc View Source

Equals(GetValueResult)

Determines whether the specified GetValueResult is equal to the current GetValueResult.

Declaration
public bool Equals(GetValueResult other)
Parameters
Type Name Description
GetValueResult other

The GetValueResult to compare with the current GetValueResult.

Returns
Type Description
System.Boolean

true if the specified GetValueResult is equal to the current GetValueResult; otherwise, false.

| Improve this Doc View Source

For(Object)

Gets a GetValueResult which indicates that the specified result object was successfully retrieved.

Declaration
public static GetValueResult For(object result)
Parameters
Type Name Description
System.Object result

The result object.

Returns
Type Description
GetValueResult

A get-value result.

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX