Exemple #1
0
        /// <summary>
        /// Remove earlier components uploaded from ClientID will be romeved. The update_id will be decremented by 1.
        /// and all component tuples matching clientID and the decremented update_id will be removed.
        /// </summary>
        /// <param name="ClientID"></param>
        /// <param name="update_id"></param>
        private void RemoveExistingClientTuples(int ClientID, string update_id)
        {
            //Decrementing the update_id to remove earlier components uploaded from ClientID
            long update_id_long = long.Parse(update_id);

            update_id_long--;
            string decremented_update_id = update_id_long.ToString();
            IEnumerable <ITuple> result  = space.GetAll(typeof(string), ClientID, typeof(int), typeof(int), typeof(string), decremented_update_id);
        }
Exemple #2
0
        private IMessage PerformGetAll(IMessage request)
        {
            ISpace ts = this.repository.GetSpace(request.Target);

            if (ts != null)
            {
                GetAllRequest        getReq = (GetAllRequest)request;
                IEnumerable <ITuple> tuples = ts.GetAll(new Pattern(getReq.Template));
                return(new GetAllResponse(request.Source, request.Session, request.Target, tuples?.Select(x => x.Fields) ?? null, StatusCode.OK, StatusMessage.OK));
            }
            return(new GetAllResponse(request.Source, request.Session, request.Target, null, StatusCode.NOT_FOUND, StatusMessage.NOT_FOUND));
        }