C# Класс FiftyOne.Foundation.Mobile.Detection.Provider

Represents all device data and capabilities.
Наследование: FiftyOne.Foundation.Mobile.Detection.BaseProvider
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
DataSet DataSet
MethodCounts long>.SortedList
RecordDetectionTime bool

Private Properties

Свойство Тип Описание
GetMatchingHeaderProfile Profile
Match MatchResult
MatchForHeaders MatchState>.Dictionary
MatchNoCache void

Открытые методы

Метод Описание
CreateMatch ( ) : Match

Creates a new FiftyOne.Foundation.Mobile.Detection.Match object to be used for matching.

Dispose ( ) : void

Disposes of the User-Agent cache if one was created.

Match ( NameValueCollection headers ) : Match

For a given collection of HTTP headers returns a match containing information about the capabilities of the device and it's components.

Match ( NameValueCollection headers, Match match ) : Match

Resets the FiftyOne.Foundation.Mobile.Detection.Match object provided and performs the detection using that object rather than creating a new match.

Match ( string targetUserAgent ) : Match

For a given User-Agent returns a match containing information about the capabilities of the device and it's components.

Match ( string targetUserAgent, Match match ) : Match

Resets the FiftyOne.Foundation.Mobile.Detection.Match object provided and performs the detection using that object rather than creating a new match.

MatchForDeviceId ( IList profileIds ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

MatchForDeviceId ( IList profileIds, Match match ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

MatchForDeviceId ( byte deviceIdArray ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

MatchForDeviceId ( byte deviceIdArray, Match match ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

MatchForDeviceId ( string deviceId ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

MatchForDeviceId ( string deviceId, Match match ) : Match

Returns the result of a match based on the device Id returned from a previous match operation.

Provider ( DataSet dataSet ) : System

Constructs a new provider using the data set.

Provider ( DataSet dataSet, bool recordDetectionTime, int cacheSize ) : System

Constructs a new provided using the data set.

Provider ( DataSet dataSet, int cacheSize ) : System

Constructs a new provider using the data set.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Disposes of the User-Agent cache if one was created.

Приватные методы

Метод Описание
GetMatchingHeaderProfile ( MatchState state, MatchState>.Dictionary matches, Component component ) : Profile

See if any of the headers can be used for this components profile. As soon as one matches then stop and don't look at any more. They are ordered in preferred sequence such that the first item is the most preferred.

Match ( string targetUserAgent, MatchState state ) : MatchResult

Resets the match object provided and performs the detection using that object rather than creating a new match.

MatchForHeaders ( Match match, NameValueCollection headers, IEnumerable importantHeaders ) : MatchState>.Dictionary

For each of the important HTTP headers provides a mapping to a match result.

MatchNoCache ( string targetUserAgent, MatchState state ) : void

Matches the User-Agent setting the state without using a cache.

Описание методов

CreateMatch() публичный Метод

Creates a new FiftyOne.Foundation.Mobile.Detection.Match object to be used for matching.
public CreateMatch ( ) : Match
Результат System.Text.RegularExpressions.Match

Dispose() публичный Метод

Disposes of the User-Agent cache if one was created.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Disposes of the User-Agent cache if one was created.
protected Dispose ( bool disposing ) : void
disposing bool /// True if the calling method is Dispose, false for the finaliser. ///
Результат void

Match() публичный Метод

For a given collection of HTTP headers returns a match containing information about the capabilities of the device and it's components.
public Match ( NameValueCollection headers ) : Match
headers System.Collections.Specialized.NameValueCollection /// List of HTTP headers to use for the detection ///
Результат System.Text.RegularExpressions.Match

Match() публичный Метод

Resets the FiftyOne.Foundation.Mobile.Detection.Match object provided and performs the detection using that object rather than creating a new match.
public Match ( NameValueCollection headers, Match match ) : Match
headers System.Collections.Specialized.NameValueCollection /// List of HTTP headers to use for the detection ///
match System.Text.RegularExpressions.Match /// A /// object created by a previous match, or via the /// method. ///
Результат System.Text.RegularExpressions.Match

Match() публичный Метод

For a given User-Agent returns a match containing information about the capabilities of the device and it's components.
public Match ( string targetUserAgent ) : Match
targetUserAgent string /// The User-Agent string to use as the target ///
Результат System.Text.RegularExpressions.Match

Match() публичный Метод

Resets the FiftyOne.Foundation.Mobile.Detection.Match object provided and performs the detection using that object rather than creating a new match.
public Match ( string targetUserAgent, Match match ) : Match
targetUserAgent string /// The User-Agent string to use as the target ///
match System.Text.RegularExpressions.Match /// A /// object created by a previous match, or via the /// method. ///
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( IList profileIds ) : Match
profileIds IList List of profile ids as integers
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( IList profileIds, Match match ) : Match
profileIds IList List of profile ids as integers
match System.Text.RegularExpressions.Match /// A /// object created by a previous match, or via the /// method. ///
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( byte deviceIdArray ) : Match
deviceIdArray byte Byte array representation of the device Id
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( byte deviceIdArray, Match match ) : Match
deviceIdArray byte Byte array representation of the device Id
match System.Text.RegularExpressions.Match /// A /// object created by a previous match, or via the /// method. ///
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( string deviceId ) : Match
deviceId string String representation of the device Id
Результат System.Text.RegularExpressions.Match

MatchForDeviceId() публичный Метод

Returns the result of a match based on the device Id returned from a previous match operation.
public MatchForDeviceId ( string deviceId, Match match ) : Match
deviceId string String representation of the device Id
match System.Text.RegularExpressions.Match /// A /// object created by a previous match, or via the /// method. ///
Результат System.Text.RegularExpressions.Match

Provider() публичный Метод

Constructs a new provider using the data set.
public Provider ( DataSet dataSet ) : System
dataSet DataSet Data set to use for device detection
Результат System

Provider() публичный Метод

Constructs a new provided using the data set.
public Provider ( DataSet dataSet, bool recordDetectionTime, int cacheSize ) : System
dataSet DataSet Data set to use for device detection
recordDetectionTime bool True if the detection time should be recorded
cacheSize int Size of the cache used with the provider
Результат System

Provider() публичный Метод

Constructs a new provider using the data set.
public Provider ( DataSet dataSet, int cacheSize ) : System
dataSet DataSet Data set to use for device detection
cacheSize int Size of the cache used with the provider
Результат System

Описание свойств

DataSet публичное свойство

The data set associated with the provider.
public DataSet DataSet
Результат DataSet

MethodCounts публичное свойство

The number of detections performed using the method.
public SortedList MethodCounts
Результат long>.SortedList

RecordDetectionTime публичное свойство

True if the detection time should be recorded in the Elapsed property of the DetectionMatch object.
public bool RecordDetectionTime
Результат bool