1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-06 23:46:12 +00: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;
}
}
}