\r\n

51Degrees Device Detection .NET  4.4

Device detection services for 51Degrees Pipeline

FiftyOne.DeviceDetection.Examples.ExampleBase Class Reference

Inheritance diagram for FiftyOne.DeviceDetection.Examples.ExampleBase:

[legend]

Static Protected Member Functions

static IEnumerable< string >  GetUserAgents (string userAgentsFile, int count)
Loops around the User-Agents file returning User-Agents until the required number have been returned. More...
static IEnumerable< string >  GetUserAgents (string userAgentsFile, int count, int randomness)
Returns User-Agents that have had a number of characters altered. More...
static IEnumerable< Dictionary< string, object > >  GetEvidence (TextReader evidenceReader, ILogger logger=null)
Read the specified yaml-formatted stream and return evidence collections. More...
static IEnumerable< string >  Report (List< string > input, int count, int maxDistinctUAs, int marks)
static void  OutputException (Exception ex, int depth=0)

Member Function Documentation

◆ GetEvidence()

static IEnumerable<Dictionary<string, object> > FiftyOne.DeviceDetection.Examples.ExampleBase.GetEvidence ( TextReader   evidenceReader,
ILogger   logger = null  
)
static protected

Read the specified yaml-formatted stream and return evidence collections.

Parameters
evidenceReader - A TextReader containing the yaml-formatted evidence data to be ingested.
logger - A logger instance. If null is passed then progress messages will not be logged.
Returns
Examples
OnPremise/OfflineProcessing-Console/Program.cs, and Performance-Console/Program.cs.

◆ GetUserAgents() [1/2]

static IEnumerable<string> FiftyOne.DeviceDetection.Examples.ExampleBase.GetUserAgents ( string   userAgentsFile,
int   count  
)
static protected

Loops around the User-Agents file returning User-Agents until the required number have been returned.

Parameters
userAgentsFile - Source file of User-Agents where each User-Agents is a single line of characters
count - Number of User-Agents to return

apply

Returns
User-Agents with repetition

◆ GetUserAgents() [2/2]

static IEnumerable<string> FiftyOne.DeviceDetection.Examples.ExampleBase.GetUserAgents ( string   userAgentsFile,
int   count,
int   randomness  
)
static protected

Returns User-Agents that have had a number of characters altered.

Used in examples where caching of User-Agents or difference matching techniques are required. The selection of characters is random.

Parameters
userAgentsFile - Source file of User-Agents where each User-Agents is a single line of characters
count - Number of User-Agents to return
randomness - Number of character adjustments to apply
Returns
User-Agents that are effectively unique