mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
23 lines
770 B
C#
23 lines
770 B
C#
using System;
|
|
|
|
namespace TINK.Model.Services.CopriApi
|
|
{
|
|
public class Result<T> where T : class
|
|
{
|
|
public Result(Type source, T response, System.Exception exception = null)
|
|
{
|
|
Source = source ?? throw new ArgumentException(nameof(source));
|
|
Response = response ?? throw new ArgumentException(nameof(response));
|
|
Exception = exception;
|
|
}
|
|
|
|
/// <summary> Holds the copri respsonse</summary>
|
|
public T Response { get; }
|
|
|
|
/// <summary> Specifies the souce of the copri response.</summary>
|
|
public Type Source { get; }
|
|
|
|
/// <summary> Holds the exception if a communication error occurred.</summary>
|
|
public System.Exception Exception { get; private set; }
|
|
}
|
|
}
|