示例#1
0
        private JsonResponseModel EditSearch(HttpStatusCode expectedStatusCode, MemberSearch search, bool isAlert, string deviceToken)
        {
            var model = new MemberSearchRequestModel
            {
                Name        = search.Name,
                IsAlert     = isAlert,
                Criteria    = search.Criteria,
                DeviceToken = deviceToken,
            };

            return(Deserialize <JsonResponseModel>(Put(expectedStatusCode, GetSearchUrl(search.Id), JsonContentType, Serialize(model, new MemberSearchModelJavaScriptConverter()))));
        }
示例#2
0
        private JsonResponseModel NewSearch(MemberSearch search, bool isAlert, string deviceToken)
        {
            var model = new MemberSearchRequestModel
            {
                Name        = search.Name,
                IsAlert     = isAlert,
                Criteria    = search.Criteria,
                DeviceToken = deviceToken,
            };

            return(Deserialize <JsonResponseModel>(Post(GetSearchesUrl(deviceToken), JsonContentType, Serialize(model, new MemberSearchCriteriaJavaScriptConverter(_locationQuery, _industriesQuery)))));
        }
示例#3
0
        private JsonResponseModel EditSearch(MemberSearch search, bool isAlert, string deviceToken)
        {
            var model = new MemberSearchRequestModel
            {
                Name        = search.Name,
                IsAlert     = isAlert,
                Criteria    = search.Criteria,
                DeviceToken = deviceToken,
            };

            var converters = new JavaScriptConverter[]
            {
                new MemberSearchModelJavaScriptConverter(),
                new MemberSearchCriteriaJavaScriptConverter(_locationQuery, _industriesQuery),
            };

            return(Deserialize <JsonResponseModel>(Put(GetSearchUrl(search.Id), JsonContentType, Serialize(model, converters))));
        }