1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00
CryptoExchange.Net/CallResult.cs
2018-02-28 13:53:29 +01:00

25 lines
609 B
C#

namespace CryptoExchange.Net
{
public class CallResult<T>
{
/// <summary>
/// The data returned by the call
/// </summary>
public T Data { get; internal set; }
/// <summary>
/// An error if the call didn't succeed
/// </summary>
public Error Error { get; internal set; }
/// <summary>
/// Whether the call was successful
/// </summary>
public bool Success => Error == null;
public CallResult(T data, Error error)
{
Data = data;
Error = error;
}
}
}