示例#1
0
        public T GetP <T>()
        {
            var request = new ObjectGetPRequest <T>(this.GetSource(), this.GetSessionId(), this.connectionString.Target);
            var mode    = this.GetMode();

            return(mode.PerformRequest <ObjectGetPResponse <T> >(request).Result);
        }
示例#2
0
        private IMessage ExecuteHelper <T>(ObjectGetPRequest <T> request)
        {
            IObjectSpaceSimple ts = this.repository.GetSpace(request.Target);

            if (ts != null)
            {
                T result = ts.GetP <T>();
                return(new ObjectGetPResponse <T>(request.Source, request.Session, request.Target, result, StatusCode.OK, StatusMessage.OK));
            }
            return(new ObjectGetPResponse <T>(request.Source, request.Session, request.Target, default(T), StatusCode.NOT_FOUND, StatusMessage.NOT_FOUND));
        }