\r\n

51Degrees Geo-Location .NET  4.4

Geo-location services for 51Degrees Pipeline

FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine Class Reference

Detailed Description

Reverse geocoding engine that uses the 51Degrees cloud service.

Inheritance diagram for FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine:

[legend]

Collaboration diagram for FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine:

[legend]

Public Member Functions

 GeoLocationCloudEngine (ILogger< GeoLocationCloudEngine > logger, Func< IPipeline, FlowElementBase< IGeoData, IAspectPropertyMetaData >, IGeoData > aspectDataFactory, GeoLocationProvider provider)
Constructor More...

Public Attributes

override string  ElementDataKey => _elementDataKey
The key to use for storing this engine's data in a IFlowData instance. More...
override IEvidenceKeyFilter  EvidenceKeyFilter
The filter that defines the evidence that is used by this engine. More...

Protected Member Functions

override void  ProcessCloudEngine (IFlowData data, IGeoData aspectData, string json)
Perform the processing for this engine:
  1. Extract properties relevant to this engine from the JSON response.
More...
override Type  GetPropertyType (PropertyMetaData propertyMetaData, Type parentObjectType)
Get the type of property from its name. More...

Properties

string  DataProviderPrefix [get]
A string identifying the provider of the data that powers this engine. More...

Constructor & Destructor Documentation

◆ GeoLocationCloudEngine()

FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.GeoLocationCloudEngine ( ILogger< GeoLocationCloudEngine >   logger,
Func< IPipeline, FlowElementBase< IGeoData, IAspectPropertyMetaData >, IGeoData >   aspectDataFactory,
GeoLocationProvider   provider  
)

Constructor

Parameters
logger - The logger used by this instance.
aspectDataFactory - A factory function that is used to create IGeoData instances.
provider - The GeoLocationProvider that will be used to power this engine.

Member Function Documentation

◆ GetPropertyType()

override Type FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.GetPropertyType ( PropertyMetaData   propertyMetaData,
Type   parentObjectType  
)
protected

Get the type of property from its name.

Parameters
propertyMetaData -
parentObjectType -
Returns

◆ ProcessCloudEngine()

override void FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.ProcessCloudEngine ( IFlowData   data,
IGeoData   aspectData,
string   json  
)
protected

Perform the processing for this engine:

  1. Extract properties relevant to this engine from the JSON response.

Deserialize JSON data to populate an IGeoData instance.

Parameters
data - The IFlowData instance containing data for the current request.
aspectData - The IGeoData instance to populate with values.
json - The JSON data from the CloudRequestEngine response.
Exceptions
ArgumentNullException - Thrown if a required parameter is null
PipelineConfigurationException - Thrown if the current pipeline configuration does not allow this engine to perform processing.

Member Data Documentation

◆ ElementDataKey

override string FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.ElementDataKey => _elementDataKey

The key to use for storing this engine's data in a IFlowData instance.

◆ EvidenceKeyFilter

override IEvidenceKeyFilter FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.EvidenceKeyFilter
Initial value:
=>
new EvidenceKeyFilterWhitelist(new List<string>())

The filter that defines the evidence that is used by this engine.

This engine needs no evidence as it works from the response from the ICloudRequestEngine.

Property Documentation

◆ DataProviderPrefix

string FiftyOne.GeoLocation.Cloud.GeoLocationCloudEngine.DataProviderPrefix
get

A string identifying the provider of the data that powers this engine.