\r\n

51Degrees Device Detection .NET  4.3Newer Version 4.4

Device detection services for 51Degrees Pipeline

FiftyOne.DeviceDetection.Examples.DataExtensions Class Reference

Static Public Member Functions

static string  TryGetValue< T > (this T data, Func< T, string > function)
Execute the specified function on the supplied IElementData instance. More...
static string  GetHumanReadable (this IAspectPropertyValue< string > apv)
Get a human-readable version of the specified IAspectPropertyValue. More...
static string  GetHumanReadable (this IAspectPropertyValue< IReadOnlyList< string >> apv)
static string  GetHumanReadable (this IAspectPropertyValue< int > apv)

Member Function Documentation

◆ GetHumanReadable()

static string FiftyOne.DeviceDetection.Examples.DataExtensions.GetHumanReadable ( this IAspectPropertyValue< string >   apv )
static

Get a human-readable version of the specified IAspectPropertyValue.

If no value has be set, the result will be 'Unknown' + the IAspectPropertyValue.NoValueMessage.

Parameters
apv -
Returns

◆ TryGetValue< T >()

static string FiftyOne.DeviceDetection.Examples.DataExtensions.TryGetValue< T > ( this T   data,
Func< T, string >   function  
)
static

Execute the specified function on the supplied IElementData instance.

If a PropertyMissingException occurs then the resulting string will contain 'Unknown' + the message from the exception.

Template Parameters
T -
Parameters
data -
function -
Returns
Type Constraints
T :IElementData