Class Result<T>
Represents a result of some calculation and associated status information.
Inheritance
System.Object
Result<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class Result<T>
Type Parameters
T
|
Constructors
Result(T)
Creates a new result.
Declaration
public Result(T result)
Parameters
T
result
|
Result(String)
Creates a new result.
Declaration
public Result(string errorMessage)
Parameters
System.String
errorMessage
|
Result(String, Func<String, Exception>)
Creates a new result.
Declaration
public Result(string errorMessage, Func<string, Exception> createException)
Parameters
System.String
errorMessage
|
Func<System.String, Exception>
createException
|
Properties
ErrorMessage
Gets the error message.
Declaration
public string ErrorMessage { get; }
Property Value
System.String
|
IsError
Gets the status.
Declaration
public bool IsError { get; }
Property Value
System.Boolean
|
Value
Gets the result.
Declaration
public T Value { get; }
Property Value
T
|
Methods
ConvertError<TNew>()
Converts this result, when an error to an result of another type.
Declaration
public Result<TNew> ConvertError<TNew>()
Returns
Result<TNew>
|
Type Parameters
TNew
|
ToString()
Returns a description.
Declaration
public override string ToString()
Returns
System.String
|
Overrides
System.Object.ToString()