ValueResult<TValue> Struct
Assembly: PTS.Modules.ResultComponent.dll
Syntax
public struct ValueResult<TValue> : IValueResult<TValue>, IResult
Type Parameters
Constructors
ValueResult(TValue, ResultType)
Declaration
public ValueResult(TValue value, ResultType type)
Parameters
Type |
Name |
Description |
TValue |
value |
|
ResultType |
type |
|
ValueResult(TValue, ResultType, String)
Declaration
public ValueResult(TValue value, ResultType type, string message)
Parameters
Type |
Name |
Description |
TValue |
value |
|
ResultType |
type |
|
System.String |
message |
|
ValueResult(TValue, Boolean)
Declaration
public ValueResult(TValue value, bool success)
Parameters
Type |
Name |
Description |
TValue |
value |
|
System.Boolean |
success |
|
Properties
Error
Declaration
public bool Error { get; }
Property Value
Type |
Description |
System.Boolean |
|
Message
Declaration
public string Message { get; set; }
Property Value
Type |
Description |
System.String |
|
On
Declaration
public DateTime On { get; }
Property Value
Type |
Description |
System.DateTime |
|
Success
Declaration
public bool Success { get; }
Property Value
Type |
Description |
System.Boolean |
|
Type
Declaration
public ResultType Type { get; set; }
Property Value
Value
Declaration
public TValue Value { get; set; }
Property Value
Operators
Implicit(TValue to ValueResult<TValue>)
Declaration
public static implicit operator ValueResult<TValue>(TValue value)
Parameters
Type |
Name |
Description |
TValue |
value |
|
Returns
Implicit(Result to ValueResult<TValue>)
Declaration
public static implicit operator ValueResult<TValue>(Result result)
Parameters
Type |
Name |
Description |
Result |
result |
|
Returns
Implicit(ValueResult<TValue> to TValue)
Declaration
public static implicit operator TValue(ValueResult<TValue> result)
Parameters
Returns
Implicit(ValueResult<TValue> to Result)
Declaration
public static implicit operator Result(ValueResult<TValue> result)
Parameters
Returns
Implicit(ValueResult<TValue> to Boolean)
Declaration
public static implicit operator bool (ValueResult<TValue> result)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
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)
Extension Methods