C# Class FiftyOne.Foundation.Mobile.Detection.Provider

Represents all device data and capabilities.
Inheritance: FiftyOne.Foundation.Mobile.Detection.BaseProvider
Afficher le fichier Open project: 51Degrees/dotNET-Device-Detection Class Usage Examples

Méthodes publiques

Свойство Type Description
DataSet DataSet
MethodCounts long>.SortedList
RecordDetectionTime bool

Private Properties

Свойство Type Description
GetMatchingHeaderProfile Profile
Match MatchResult
MatchForHeaders MatchState>.Dictionary
MatchNoCache void

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

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

Private Methods

Méthode Description
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.

Method Details

CreateMatch() public méthode

Creates a new FiftyOne.Foundation.Mobile.Detection.Match object to be used for matching.
public CreateMatch ( ) : Match
Résultat System.Text.RegularExpressions.Match

Dispose() public méthode

Disposes of the User-Agent cache if one was created.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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. ///
Résultat void

Match() public méthode

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 ///
Résultat System.Text.RegularExpressions.Match

Match() public méthode

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. ///
Résultat System.Text.RegularExpressions.Match

Match() public méthode

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 ///
Résultat System.Text.RegularExpressions.Match

Match() public méthode

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. ///
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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. ///
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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. ///
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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
Résultat System.Text.RegularExpressions.Match

MatchForDeviceId() public méthode

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. ///
Résultat System.Text.RegularExpressions.Match

Provider() public méthode

Constructs a new provider using the data set.
public Provider ( DataSet dataSet ) : System
dataSet DataSet Data set to use for device detection
Résultat System

Provider() public méthode

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
Résultat System

Provider() public méthode

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
Résultat System

Property Details

DataSet public_oe property

The data set associated with the provider.
public DataSet DataSet
Résultat DataSet

MethodCounts public_oe property

The number of detections performed using the method.
public SortedList MethodCounts
Résultat long>.SortedList

RecordDetectionTime public_oe property

True if the detection time should be recorded in the Elapsed property of the DetectionMatch object.
public bool RecordDetectionTime
Résultat bool