예제 #1
0
        public BaseResponse(ServerAnswerEnum answer, List <String> messagelist)
        {
            MakeDefaults();

            ServerAnswer = answer;

            if (MessageList != null)
            {
                MessageList = messagelist;
            }
        }
예제 #2
0
        public BaseResponse(ServerAnswerEnum answer, List <InformationLog> messagelist)
        {
            MakeDefaults();

            ServerAnswer = answer;

            if (MessageList != null)
            {
                MessageList = messagelist.Select(x => x.PrintShort(true)).ToList();
            }
        }
예제 #3
0
 private static String GetServerAnswerEnumByType(ServerAnswerEnum type)
 {
     try
     {
         return(EnumUtilities.GetEnumDescription(type));
     }
     catch (Exception e)
     {
         return("نامشخص");
     }
 }
예제 #4
0
        public BaseResponse(ServerAnswerEnum answer, List <Exception> messagelist)
        {
            MakeDefaults();

            ServerAnswer = answer;

            if (MessageList != null)
            {
                MessageList = messagelist.Select(x => x.Message).ToList();
            }
        }
예제 #5
0
        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;
            }
        }