CodeLiturgy.Dashboard/BlueWest.Data/DataQueryResult.cs

36 lines
792 B
C#
Raw Normal View History

2021-12-10 03:04:48 +03:00
using System;
using System.Collections.Generic;
using System.Text;
namespace BlueWest.Data
{
2021-12-26 20:43:27 +03:00
public sealed class DataQueryResult<T>
2021-12-10 03:04:48 +03:00
{
public readonly T Value;
2021-12-26 20:43:27 +03:00
public bool HasValue;
public string Message;
2021-12-10 03:04:48 +03:00
2021-12-26 20:43:27 +03:00
public DataQueryResult(T value, bool success = true, string message = "")
2021-12-10 03:04:48 +03:00
{
Value = value;
2021-12-26 20:43:27 +03:00
HasValue = success;
Message = message;
2021-12-10 03:04:48 +03:00
}
}
2021-12-26 20:43:27 +03:00
internal sealed class DataQueryResult
2021-12-10 03:04:48 +03:00
{
2021-12-26 20:43:27 +03:00
public readonly object Value;
public bool HasValue;
public string Message;
public DataQueryResult(object value, bool success = true, string message = "")
2021-12-10 03:04:48 +03:00
{
2021-12-26 20:43:27 +03:00
Value = value;
HasValue = success;
Message = message;
2021-12-10 03:04:48 +03:00
}
}
2021-12-26 20:43:27 +03:00
2021-12-10 03:04:48 +03:00
}