Ejemplo n.º 1
0
        private IMessage ExecuteHelper <T>(ObjectPutRequest <T> request)
        {
            IObjectSpaceSimple ts = this.repository.GetSpace(request.Target);

            if (ts != null)
            {
                ts.Put(request.Element);
                return(new ObjectPutResponse <T>(request.Source, request.Session, request.Target, StatusCode.OK, StatusMessage.OK));
            }
            return(new ObjectPutResponse <T>(request.Source, request.Session, request.Target, StatusCode.NOT_FOUND, StatusMessage.NOT_FOUND));
        }
Ejemplo n.º 2
0
        public void Put <T>(T element)
        {
            var request = new ObjectPutRequest <T>(this.GetSource(), this.GetSessionId(), this.connectionString.Target, element);

            this.GetMode()?.PerformRequest <ObjectPutResponse <T> >(request);
        }