Method | Description | |
---|---|---|
FillResults ( SearchCriteriaFormViewModel criteriaViewModel ) : void |
Fill search results from criteria 1 search matching localisations in repository 2 compute distance between place to search and search result for each result 3 push result in session
|
|
FillSearchResults ( SearchCriteria criteria ) : SearchCriteriaFormViewModel |
get a SearchCriteriaFormViewModel containing the criteria and the results of a search if results in cache get it else build searchcriteria from url with this, search matchings localisations in repository fill the session store with computed results and returns the results
|
|
GetCriteria ( System.Web.HttpRequestBase parameters, int page = 1 ) : SearchCriteria |
private method to create a SearchCriteria object from route data used to create search criteria from an url
|
|
GetRVD ( SearchCriteria criteria ) : RouteValueDictionary |
private method to create route data from a SearchCriteria object used to pass search criteria in url
|
|
GetSingleResult ( System.Web.HttpRequestBase parameters, int index ) : SearchSingleResultViewModel |
Get single result for a given index, within search results
|
|
SearchService ( ILogger logger, IGeocodeService geocodeService ) : System | ||
ValidateLocalisation ( |
Validate a localisation against database state, throws exception if not valide
|
public FillResults ( SearchCriteriaFormViewModel criteriaViewModel ) : void | ||
criteriaViewModel | SearchCriteriaFormViewModel | |
return | void |
public FillSearchResults ( SearchCriteria criteria ) : SearchCriteriaFormViewModel | ||
criteria | SearchCriteria | |
return | SearchCriteriaFormViewModel |
public GetCriteria ( System.Web.HttpRequestBase parameters, int page = 1 ) : SearchCriteria | ||
parameters | System.Web.HttpRequestBase | |
page | int | |
return | SearchCriteria |
public GetRVD ( SearchCriteria criteria ) : RouteValueDictionary | ||
criteria | SearchCriteria | |
return | RouteValueDictionary |
public GetSingleResult ( System.Web.HttpRequestBase parameters, int index ) : SearchSingleResultViewModel | ||
parameters | System.Web.HttpRequestBase | parameters from which to build result of not in session |
index | int | index of the result item |
return | SearchSingleResultViewModel |
public SearchService ( ILogger logger, IGeocodeService geocodeService ) : System | ||
logger | ILogger | |
geocodeService | IGeocodeService | |
return | System |
public ValidateLocalisation ( |
||
toValidate | localisation to validate | |
error | string | error to fill |
return | void |