예제 #1
0
        // HieuLT.ITSol
        #region ApplyDataDefaultRes
        public static SeabRes <T> ApplyResponse <T>(HeaderReq head, string errCode, string errDesc, T body, string sign) where T : BodyRes, new()
        {
            SeabRes <T> response = new SeabRes <T>();

            response.header = new HeaderRes(head, errCode, errDesc);
            response.body   = body;
            response.sign   = sign;

            return(response);
        }
예제 #2
0
 public HeaderRes(HeaderReq header, Error err)
 {
     reqType     = header.reqType;
     api         = header.api;
     apiKey      = header.apiKey;
     priority    = header.priority;
     channel     = header.channel;
     subChannel  = header.subChannel;
     location    = header.location;
     context     = header.context;
     trusted     = header.trusted;
     userID      = header.userID;
     dn          = header.dn;
     requestAPI  = header.requestAPI;
     requestNode = header.requestNode;
     requestID   = header.requestID;
     res_code    = Utils.GetErrorCode(err);
     res_desc    = Utils.GetErrorDesc(err);
 }
예제 #3
0
 public HeaderRes(HeaderReq header, string errCode, string errDecs)
 {
     reqType     = header.reqType;
     api         = header.api;
     apiKey      = header.apiKey;
     priority    = header.priority;
     channel     = header.channel;
     subChannel  = header.subChannel;
     location    = header.location;
     context     = header.context;
     trusted     = header.trusted;
     userID      = header.userID;
     dn          = header.dn;
     requestAPI  = header.requestAPI;
     requestNode = header.requestNode;
     requestID   = header.requestID;
     res_code    = errCode;
     res_desc    = errDecs;
 }