C# 클래스 FiftyOne.Foundation.Mobile.Redirection.RequestHistory

Class used to record details of devices that have already accessed the mobile web site to determine if the request is the 1st one or a subsequent one.
상속: IRequestHistory
파일 보기 프로젝트 열기: 51Degrees/dotNET-Device-Detection 1 사용 예제들

공개 메소드들

메소드 설명
IsPresent ( HttpRequest request ) : bool

Checks to find out if the device associated with the HttpRequest has already been seen by the application. Always returns false if the sync file has not been specified.

Remove ( HttpRequest request ) : void

Removes this device request from the previous devices list.

Set ( HttpRequest request ) : void

Adds this device request to the previous devices list.

비공개 메소드들

메소드 설명
Add ( object record ) : void

Adds the current request record to the file containing details of all the available requests.

CheckIfServiceRequired ( ) : void

If the last time the devices file was serviced to remove old entries is older than 1 minute start a thread to service the devices file and remove old entries. If the redirect timeout is 0 indicating infinite then nothing should be purged.

OpenSyncFilePath ( FileMode mode, FileAccess access, FileShare share ) : FileStream

Opens the file for read and if an exception is thrown will return null rather than the exception.

ProcessSyncFile ( ) : void
ReadRecords ( FileStream stream, long purgeDate ) : byte[]

Read the records that should be retained in the sync file.

RefreshSyncFile ( ) : void

Checks to determine if new records need to be processed and if so loads them into memory.

RequestHistory ( ) : System
ServiceRequestHistory ( object purgeDate ) : void

Removes entries from the memory version and sync file that are older than the purgeDate specified.

메소드 상세

IsPresent() 공개 메소드

Checks to find out if the device associated with the HttpRequest has already been seen by the application. Always returns false if the sync file has not been specified.
public IsPresent ( HttpRequest request ) : bool
request System.Web.HttpRequest HttpRequest to be checked.
리턴 bool

Remove() 공개 메소드

Removes this device request from the previous devices list.
public Remove ( HttpRequest request ) : void
request System.Web.HttpRequest HttpRequest of the device.
리턴 void

Set() 공개 메소드

Adds this device request to the previous devices list.
public Set ( HttpRequest request ) : void
request System.Web.HttpRequest HttpRequest of the device.
리턴 void