◆ 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.