private IMessage PerformQueryP(IMessage request) { ISpace ts = this.repository.GetSpace(request.Target); if (ts != null) { QueryPRequest getReq = (QueryPRequest)request; ITuple tuple = ts.QueryP(new Pattern(getReq.Template)); return(new QueryPResponse(request.Source, request.Session, request.Target, tuple?.Fields ?? null, StatusCode.OK, StatusMessage.OK)); } return(new QueryPResponse(request.Source, request.Session, request.Target, null, StatusCode.NOT_FOUND, StatusMessage.NOT_FOUND)); }