Exemplo n.º 1
0
        public ServiceResult GetSideAffects(string parentUUID = "")
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }

            List <dynamic> SideAffects;

            SideAffectManager SideAffectManager = new SideAffectManager(Globals.DBConnectionKey, this.GetAuthToken(Request));

            SideAffects = SideAffectManager.GetSideAffects(parentUUID, CurrentUser.AccountUUID).Cast <dynamic>().ToList();;

            DataFilter filter = this.GetFilter(Request);

            SideAffects = SideAffects.Filter(ref filter);

            return(ServiceResponse.OK("", SideAffects, filter.TotalRecordCount));
        }
Exemplo n.º 2
0
        public ServiceResult GetSideAffects(string parentUUID = "", string filter = "")
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }

            List <dynamic> SideAffects;


            SideAffectManager SideAffectManager = new SideAffectManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter);

            SideAffects = SideAffectManager.GetSideAffects(parentUUID, CurrentUser.AccountUUID).Cast <dynamic>().ToList();;
            int count;

            DataFilter tmpFilter = this.GetFilter(filter);

            SideAffects = FilterEx.FilterInput(SideAffects, tmpFilter, out count);

            return(ServiceResponse.OK("", SideAffects, count));
        }
Exemplo n.º 3
0
        public void SideAffectManager_GetSideAffects()
        {
            SideAffectManager m = new SideAffectManager(new TreeMonDbContext(connectionKey));

            Assert.IsTrue(m.GetSideAffects("a").Count > 0);
        }