public ApiParameter Exec2ApiParameter <TResult>(string cmd, BaseTransfer transfer) { TResult rlt = Exec <TResult>(cmd); string rltStr = null; string rltType = typeof(TResult).FullName; if (rlt != null) { rltType = rlt.GetType().FullName; rltStr = transfer.ToText(rlt); } return(new ApiParameter() { TypeName = rltType, Serializer = transfer.GetType().FullName, Value = rltStr }); }
public string Exec2String <TResult>(string cmd, BaseTransfer transfer) { TResult rlt = Exec <TResult>(cmd); return(transfer.ToText(rlt)); }