Ejemplo n.º 1
0
        private async Task <bool> SetSearchModel(HttpContext context, string controller,
                                                 string action, bool isInitView, string partialUriPattern, ISearchService searchService,
                                                 IMemberService memberService)
        {
            //the order that the search params get set is important
            //set general content properties
            this.SearchManagerData.SearchResult = new ContentURI();
            ViewDataHelper vwDataHelper = new ViewDataHelper();

            this.SearchManagerData.SearchResult =
                vwDataHelper.SetInitialModelProperties(_initialURI, context, controller,
                                                       action, partialUriPattern);

            ////2.0.0 contenturi does not init network in constructor, do it here
            //now it's done below with SetNetwork
            //await SetNetworkAsync(searchService, memberService);

            //set up initial club and member
            MemberHelper oMemberHelper = new MemberHelper();
            bool         bHasSet       = await oMemberHelper.SetClubAndMemberAsync(context, isInitView, memberService,
                                                                                   this.SearchManagerData.SearchResult);

            //set the service and, if necessary, change the app
            bHasSet = await SetService(context);

            //set 'rows to return' params sent in the request body
            SetStartRowArgs();
            SetOtherSearchArgs(context);
            SetNetworkType(context);
            return(bHasSet);
        }