51Degrees Device Detection .NET  4.1

Device detection services for 51Degrees Pipeline

FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder Class Reference

Detailed Description

Builder used to create a Pipeline with a device detection engine.

Public Member Functions

 DeviceDetectionPipelineBuilder ()
Constructor More...
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory)
Constructor More...
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory, HttpClient httpClient)
Constructor More...
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory, HttpClient httpClient, IDataUpdateService dataUpdateService)
Constructor More...
DeviceDetectionCloudPipelineBuilder  UseCloud (string resourceKey)
Use the 51Degrees Cloud service to perform device detection. More...
DeviceDetectionCloudPipelineBuilder  UseCloud (string resourceKey, string endpoint)
Use the 51Degrees Cloud service to perform device detection. More...
DeviceDetectionOnPremisePipelineBuilder  UseOnPremise (string datafile, bool createTempDataCopy)
Use a 51Degrees on-premise device detection engine to perform device detection. More...
DeviceDetectionOnPremisePipelineBuilder  UseOnPremise (string datafile, string key, bool createTempDataCopy=true)
Use a 51Degrees on-premise device detection engine to perform device detection. More...
DeviceDetectionOnPremisePipelineBuilder  UseOnPremise (Stream dataStream, DeviceDetectionAlgorithm algorithm)
Use a 51Degrees on-premise device detection engine to perform device detection. More...
DeviceDetectionOnPremisePipelineBuilder  UseOnPremise (Stream dataStream, DeviceDetectionAlgorithm algorithm, string key)
Use a 51Degrees on-premise device detection engine to perform device detection. More...

Constructor & Destructor Documentation

◆ DeviceDetectionPipelineBuilder() [1/4]

FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( )

Constructor

◆ DeviceDetectionPipelineBuilder() [2/4]

FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory )

Constructor

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.

◆ DeviceDetectionPipelineBuilder() [3/4]

FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory,
HttpClient   httpClient  
)

Constructor

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.
httpClient - The HTTP client to use within the pipeline.

◆ DeviceDetectionPipelineBuilder() [4/4]

FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory,
HttpClient   httpClient,
IDataUpdateService   dataUpdateService  
)

Constructor

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.
httpClient - The HTTP client to use within the pipeline.
dataUpdateService - The DataUpdateService to use when checking for data updates.

Member Function Documentation

◆ UseCloud() [1/2]

DeviceDetectionCloudPipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseCloud ( string   resourceKey )

Use the 51Degrees Cloud service to perform device detection.

Parameters
resourceKey - The resource key to use when querying the cloud service. Obtain one from https://configure.51degrees.com
Returns
A builder that can be used to configure and build a pipeline that will use the cloud device detection engine.

◆ UseCloud() [2/2]

DeviceDetectionCloudPipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseCloud ( string   resourceKey,
string   endpoint  
)

Use the 51Degrees Cloud service to perform device detection.

Parameters
resourceKey - The resource key to use when querying the cloud service. Obtain one from https://configure.51degrees.com
endpoint - The 51Degrees Cloud URL.
Returns
A builder that can be used to configure and build a pipeline that will use the cloud device detection engine.

◆ UseOnPremise() [1/4]

DeviceDetectionOnPremisePipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseOnPremise ( string   datafile,
bool   createTempDataCopy  
)

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
datafile - The full path to the device detection data file.
createTempDataCopy - If true, the engine will create a temporary copy of the data file rather than using the data file directly.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.
Exceptions
ArgumentNullException - Thrown if a required parameter is null

◆ UseOnPremise() [2/4]

DeviceDetectionOnPremisePipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseOnPremise ( string   datafile,
string   key,
bool   createTempDataCopy = true  
)

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
datafile - The full path to the device detection data file.
key - The license key to use when checking for updates to the data file. A license key can be obtained from the 51Degrees website. If you have no license key then this parameter can be set to null, but doing so will disable automatic updates.
createTempDataCopy - If true, the engine will create a temporary copy of the data file rather than using the data file directly. This is required in order for automatic updates to work correctly.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.
Exceptions
ArgumentNullException - Thrown if a required parameter is null
See also
UseOnPremise(Stream, DeviceDetectionAlgorithm, string)

◆ UseOnPremise() [3/4]

DeviceDetectionOnPremisePipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseOnPremise ( Stream   dataStream,
DeviceDetectionAlgorithm   algorithm  
)

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
dataStream - The device detection data file as a Stream.
algorithm - The detection algorithm that the supplied data supports.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.

◆ UseOnPremise() [4/4]

DeviceDetectionOnPremisePipelineBuilder FiftyOne.DeviceDetection.DeviceDetectionPipelineBuilder.UseOnPremise ( Stream   dataStream,
DeviceDetectionAlgorithm   algorithm,
string   key  
)

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
dataStream - The device detection data file as a Stream.
algorithm - The detection algorithm that the supplied data supports.
key - The license key to use when checking for updates to the data file. A license key can be obtained from the 51Degrees website. If you have no license key then this parameter can be set to null, but doing so will disable automatic updates.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.
See also
UseOnPremise(string, string, bool)