51Degrees Geo-Location .NET  4.1Newer Version 4.2

Geo-location services for 51Degrees Pipeline

FiftyOne.GeoLocation.Core.GeoEngineHelper Class Reference

Detailed Description

Helper class that contains shared functionality required by geolocation engines.

This functionality is here rather than a geo engine base class because different geolocation engines require different engine base class functionality.

Static Public Member Functions

static GeoLookupResult  PerformGeoLookup (IFlowData data, HttpClient webClient, Action< IReadOnlyDictionary< string, object >, GeoEvidence > addExtraParams, Func< GeoEvidence, string > formatRequest)
Use evidence from the specified IFlowData instance to construct a query More...

Member Function Documentation

◆ PerformGeoLookup()

static GeoLookupResult FiftyOne.GeoLocation.Core.GeoEngineHelper.PerformGeoLookup ( IFlowData   data,
HttpClient   webClient,
Action< IReadOnlyDictionary< string, object >, GeoEvidence >   addExtraParams,
Func< GeoEvidence, string >   formatRequest  
)
static

Use evidence from the specified IFlowData instance to construct a query

Parameters
data - The flow data to process
webClient - The HttpClient to use when making a request to the geolocation service.
addExtraParams - A function that will set any additional fields in GeoEvidence that may be unique to the calling engine.
formatRequest - A function that will create a URL that can be used to query a web service based on the supplied GeoEvidence.
Returns
A new GeoLookupResult instance. If the supplied IFlowData contains the required evidence then this will contain the raw response from the web service. If not, it will contain the JavaScript to run on the client device in order to supply the required evidence.
Exceptions
ArgumentNullException - Thrown if a required parameter is null.