using Bro.Common.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bro.Common.Model
{
public class ProcessResponse
{
///
/// 执行操作简单结果
///
public int ResultValue { get; set; } = 0;
/////
///// 执行结果的数值
/////
//public int ResultData { get; set; } = 0;
///
/// 执行结果数据集合
///
public List DataList { get; set; } = new List();
public ProcessResponse() { }
public ProcessResponse(int result)
{
ResultValue = result;
}
public ProcessResponse(bool resultFlag, List datas = null)
{
ResultValue = resultFlag ? 1 : -1;
if (datas != null)
{
DataList = datas;
}
}
public ProcessResponse(bool resultFlag, List datas)
{
ResultValue = resultFlag ? 1 : -1;
if (datas != null)
{
datas.ForEach(d =>
{
DataList.AddRange(d.ParseIntToUnsignShortList());
});
}
}
}
}