C# 클래스 FiftyOne.Foundation.Mobile.Detection.TrieProvider

Decision trie data structure provider.
상속: IDisposable
파일 보기 프로젝트 열기: 51Degrees/dotNET-Device-Detection 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Copyright string

보호된 프로퍼티들

프로퍼티 타입 설명
_properties byte[]
_propertyHttpHeaders List
_propertyIndex int>.Dictionary
_propertyNames List

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of all the resources used by the provider.

GetDeviceId ( int deviceIndex ) : string

Returns the device id matching the device index.

GetDeviceIndex ( string userAgent ) : int

Returns the index of the device associated with the given User-Agent. The index returned may vary across different versions of the source data file and should not be stored. The "Id" property will remain unique.

GetDeviceIndexes ( NameValueCollection headers ) : int>.IDictionary

Returns a collection of device indexes for each of the relevent HTTP headers provided. Those headers which are unrelated to device detection are ignored.

GetPropertyValue ( int>.IDictionary deviceIndexes, int propertyIndex ) : string

Returns the value of the property index provided from the device indexes provided. Matches the Http header to the property index.

GetPropertyValue ( int>.IDictionary deviceIndexes, string property ) : string

Returns the property value based on the device indexes provided.

GetPropertyValue ( NameValueCollection headers, string propertyName ) : string

Returns the value of the property for the User-Agent provided.

GetPropertyValue ( int deviceIndex, int propertyIndex ) : string

Returns the value of the property index provided for the device index provided.

GetPropertyValue ( int deviceIndex, string property ) : string

Returns the property value based on the device index provided.

GetPropertyValue ( string userAgent, string propertyName ) : string

Returns the value of the property for the User-Agent provided.

GetUserAgent ( string userAgent ) : string

Returns the User-Agent matched against the one provided.

SizeOfOffsets ( OffsetType offsetType ) : int

The number of bytes each offset takes.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Disposes of all the resources used by the provider.

GetStringValue ( int offset ) : string

Returns the string at the offset provided.

비공개 메소드들

메소드 설명
GetChild ( int lookupOffset, byte value ) : byte

Returns the offset in the node for the current character.

GetDeviceIndex ( BinaryReader reader, byte userAgent, int index, int parentDeviceIndex ) : int

Returns the offset in the device byte array to the device matching the useragent provided.

GetDeviceIndex ( BinaryReader reader, byte userAgent, int index, int parentDeviceIndex, StringBuilder matchedUserAgent ) : int

Returns the offset in the device byte array to the device matching the useragent provided.

GetUserAgentByteArray ( string userAgent ) : byte[]

Converts a User-Agent in to a null terminated byte array.

SetNextNodePosition ( BinaryReader reader, byte childIndex, byte numberOfChildren, OffsetType offsetType ) : void

Returns the position in the nodes stream of the next node.

TrieProvider ( string copyright, byte strings, byte properties, byte devices, byte lookupList, long nodesLength, long nodesOffset, Pool pool ) : System

Constructs a new instance of a tree provider.

메소드 상세

Dispose() 공개 메소드

Disposes of all the resources used by the provider.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Disposes of all the resources used by the provider.
protected Dispose ( bool disposing ) : void
disposing bool True if the calling method is Dispose, false for the finaliser.
리턴 void

GetDeviceId() 공개 메소드

Returns the device id matching the device index.
public GetDeviceId ( int deviceIndex ) : string
deviceIndex int Index of the device whose Id should be returned
리턴 string

GetDeviceIndex() 공개 메소드

Returns the index of the device associated with the given User-Agent. The index returned may vary across different versions of the source data file and should not be stored. The "Id" property will remain unique.
public GetDeviceIndex ( string userAgent ) : int
userAgent string
리턴 int

GetDeviceIndexes() 공개 메소드

Returns a collection of device indexes for each of the relevent HTTP headers provided. Those headers which are unrelated to device detection are ignored.
public GetDeviceIndexes ( NameValueCollection headers ) : int>.IDictionary
headers System.Collections.Specialized.NameValueCollection Collection of HTTP headers and values
리턴 int>.IDictionary

GetPropertyValue() 공개 메소드

Returns the value of the property index provided from the device indexes provided. Matches the Http header to the property index.
public GetPropertyValue ( int>.IDictionary deviceIndexes, int propertyIndex ) : string
deviceIndexes int>.IDictionary _indexes for the device.
propertyIndex int Index of the property required.
리턴 string

GetPropertyValue() 공개 메소드

Returns the property value based on the device indexes provided.
public GetPropertyValue ( int>.IDictionary deviceIndexes, string property ) : string
deviceIndexes int>.IDictionary Http headers and their device index.
property string The name of the property required.
리턴 string

GetPropertyValue() 공개 메소드

Returns the value of the property for the User-Agent provided.
public GetPropertyValue ( NameValueCollection headers, string propertyName ) : string
headers System.Collections.Specialized.NameValueCollection Collection of HTTP headers and values
propertyName string Name of the property required
리턴 string

GetPropertyValue() 공개 메소드

Returns the value of the property index provided for the device index provided.
public GetPropertyValue ( int deviceIndex, int propertyIndex ) : string
deviceIndex int Index for the device.
propertyIndex int Index of the property required.
리턴 string

GetPropertyValue() 공개 메소드

Returns the property value based on the device index provided.
public GetPropertyValue ( int deviceIndex, string property ) : string
deviceIndex int The index of the device whose property should be returned.
property string The name of the property required.
리턴 string

GetPropertyValue() 공개 메소드

Returns the value of the property for the User-Agent provided.
public GetPropertyValue ( string userAgent, string propertyName ) : string
userAgent string User agent of the request
propertyName string Name of the property required
리턴 string

GetStringValue() 보호된 메소드

Returns the string at the offset provided.
protected GetStringValue ( int offset ) : string
offset int
리턴 string

GetUserAgent() 공개 메소드

Returns the User-Agent matched against the one provided.
public GetUserAgent ( string userAgent ) : string
userAgent string
리턴 string

SizeOfOffsets() 공개 정적인 메소드

The number of bytes each offset takes.
public static SizeOfOffsets ( OffsetType offsetType ) : int
offsetType OffsetType
리턴 int

프로퍼티 상세

Copyright 공개적으로 프로퍼티

The copy right notice associated with the data file.
public string Copyright
리턴 string

_properties 보호되어 있는 프로퍼티

Byte array of the available properties.
protected byte[] _properties
리턴 byte[]

_propertyHttpHeaders 보호되어 있는 프로퍼티

List of Http headers for each property index.
protected List _propertyHttpHeaders
리턴 List

_propertyIndex 보호되어 있는 프로퍼티

Dictionary of property names to indexes.
protected Dictionary _propertyIndex
리턴 int>.Dictionary

_propertyNames 보호되어 있는 프로퍼티

List of the available property names.
protected List _propertyNames
리턴 List