Ejemplo n.º 1
0
        public object Post(PropertySearchRequest request)
        {
            Log.Debug("starting Post(PropertySearchRequest)");
            PropertySearchRequestPayload propertySearchRequestPayload = request.PropertySearchRequestPayload;
            PropertySearchRequestData    propertySearchRequestData    = propertySearchRequestPayload.PropertySearchRequestData;
            bool              savePropertySearchData = propertySearchRequestPayload.SavePropertySearchData;
            SearchParameters  searchParameters       = propertySearchRequestData.SearchParameters;
            ListingParameters listingParameters      = propertySearchRequestData.ListingParameters;
            // Get the name of the gateway to use
            var gatewayName = "HomeAway";

            // Get the HTTP request for a property search from the gateway
            // update it with the searchParameters
            // update it with the listingParameters
            // Get the type of Response to expect back
            // async call the gateway URI for property search, using the predefined policy and retry scheme
            // ToDo: figure out how to integrate a CancellationToken
            try {
                Log.Debug("Calling through gateway {gateway}, using Registry Key {RegistryKey}");
            }
            catch {
                Log.Debug("leaving Post(PropertySearchRequest)");
            }
            finally {
            }


            // update the Plugin Data Structure with the data from the response
            //RealEstateServicesData.PluginRootCOD.Add("test1", 100);
            Log.Debug("leaving Post(PropertySearchRequest)");
            List <ListingSearchHit>       listingSearchHits             = new List <ListingSearchHit>();
            PropertySearchResponseData    propertySearchResponseData    = new PropertySearchResponseData(listingSearchHits);
            PropertySearchResponsePayload propertySearchResponsePayload = new PropertySearchResponsePayload(propertySearchResponseData);
            PropertySearchResponse        propertySearchResponse        = new PropertySearchResponse();

            propertySearchResponse.PropertySearchResponsePayload = propertySearchResponsePayload;
            Log.Debug("Leaving Post(PropertySearchRequest)");
            return(propertySearchResponse);
        }
 public PropertySearchResponsePayload(PropertySearchResponseData propertySearchResponseData)
 {
     PropertySearchResponseData = propertySearchResponseData;
 }