using System.Collections.Generic; using System.Linq; using IwbZero.IwbBase; using WeEngine.Functions; namespace WeEngine.Application.Packages.Dto { public class FunctionDto:IIwbId { public FunctionDto(ExprFunction eFun) { Id = eFun.Id; Name = eFun.FunctionName; Description = eFun.FunctionDesc; Params = new List(); if (eFun.Params != null && eFun.Params.Any()) { foreach (var eFunParam in eFun.Params) { Params.Add(new FunParamDto() { Index =eFunParam.Index, ParamName = eFunParam.Name, ParamType = eFunParam.ExprType }); } } } public string Id { get; set; } public string Name { get; set; } public string Description { get; set; } public List Params { get; set; } } public class FunParamDto { public int Index { get; set; } public string ParamName { get; set; } public string ParamType { get; set; } } }