51Degrees Device Detection .NET  4.1

Device detection services for 51Degrees Pipeline

FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine Class Reference

Detailed Description

Engine that takes the JSON response from the CloudRequestEngine and uses it populate a DeviceDataCloud instance for easier consumption.

Inheritance diagram for FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine:

[legend]

Collaboration diagram for FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine:

[legend]

Public Member Functions

 DeviceDetectionCloudEngine (ILogger< DeviceDetectionCloudEngine > logger, Func< IPipeline, FlowElementBase< DeviceDataCloud, IAspectPropertyMetaData >, DeviceDataCloud > deviceDataFactory)
Constructor More...

Public Attributes

override string  ElementDataKey => "device"
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  ProcessEngine (IFlowData data, DeviceDataCloud aspectData)
Perform the processing for this engine: More...

Constructor & Destructor Documentation

◆ DeviceDetectionCloudEngine()

FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine.DeviceDetectionCloudEngine ( ILogger< DeviceDetectionCloudEngine >   logger,
Func< IPipeline, FlowElementBase< DeviceDataCloud, IAspectPropertyMetaData >, DeviceDataCloud >   deviceDataFactory  
)

Constructor

Parameters
logger - The logger for this instance to use
deviceDataFactory - Factory function to use when creating aspect data instances.

Member Function Documentation

◆ ProcessEngine()

override void FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine.ProcessEngine ( IFlowData   data,
DeviceDataCloud   aspectData  
)
protected

Perform the processing for this engine:

  1. Get the JSON data from the CloudRequestEngine response.
  2. Extract properties relevant to this engine.
  3. Deserialize JSON data to populate a DeviceDataCloud instance.
Parameters
data - The IFlowData instance containing data for the current request.
aspectData - The DeviceDataCloud instance to populate with values.
Exceptions
ArgumentNullException - Thrown if a required parameter is null

Member Data Documentation

◆ ElementDataKey

override string FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine.ElementDataKey => "device"

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

◆ EvidenceKeyFilter

override IEvidenceKeyFilter FiftyOne.DeviceDetection.Cloud.FlowElements.DeviceDetectionCloudEngine.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.