예제 #1
0
        private T Succes <T>(API.SessionRequest request) where T : API.SessionResponse, new()
        {
            var response = new T()
            {
                RequestId = request.RequestId,
                SessionId = request.SessionId,
                Status    = (int)HttpStatusCode.OK
            };

            return(response);
        }
예제 #2
0
        private T Fail <T>(API.SessionRequest request, HttpStatusCode code, string errorMessage) where T : API.SessionResponse, new()
        {
            var response = new T()
            {
                RequestId         = request.RequestId,
                SessionId         = request.SessionId,
                Status            = (int)code,
                StatusDescription = errorMessage
            };

            return(response);
        }
예제 #3
0
파일: API.cs 프로젝트: sls1j/caveCache
 public void CopySessionInfo(SessionRequest request)
 {
     this.RequestId = request.RequestId;
     this.SessionId = request.SessionId;
 }