public BaseResponse(ServerAnswerEnum answer, List <String> messagelist) { MakeDefaults(); ServerAnswer = answer; if (MessageList != null) { MessageList = messagelist; } }
public BaseResponse(ServerAnswerEnum answer, List <InformationLog> messagelist) { MakeDefaults(); ServerAnswer = answer; if (MessageList != null) { MessageList = messagelist.Select(x => x.PrintShort(true)).ToList(); } }
private static String GetServerAnswerEnumByType(ServerAnswerEnum type) { try { return(EnumUtilities.GetEnumDescription(type)); } catch (Exception e) { return("نامشخص"); } }
public BaseResponse(ServerAnswerEnum answer, List <Exception> messagelist) { MakeDefaults(); ServerAnswer = answer; if (MessageList != null) { MessageList = messagelist.Select(x => x.Message).ToList(); } }
public BaseResponse(ServerAnswerEnum answer, T data = default(T), Object additionalData = null, List <String> messagelist = null) { MakeDefaults(); ServerAnswer = answer; Data = data; AdditionalData = additionalData; if (messagelist != null) { MessageList = messagelist; } }