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

상속: IRequestHistory
파일 보기 프로젝트 열기: 51Degrees/dotNET-Device-Detection

공개 메소드들

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

Determines if the device making the request has been seen by the web site previously.

Remove ( HttpRequest request ) : void

Removes the device behind the request.

Set ( HttpRequest request ) : void

Sets the last active time for the device making the request.

비공개 메소드들

메소드 설명
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.

GetEntityFromContext ( RequestRecord record ) : RequestEntity

Returns the entity if present from the current context.

GetEntityFromTable ( RequestRecord record ) : RequestEntity

Returns the entity if present from the table service. Should only be called after checking the entity is not already present in the context.

Remove ( RequestRecord record ) : void

Removes the request device details from the table, and then removes from memory once the table has been updated.

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

Removes old entries that are held within this context from the table store using a single save changes operation. This means the service happens using one HTTP request which saves a lot of money with Azure. Unfortunately it does mean that there is a possibility request data not known to this instance will not be removed.

Set ( RequestRecord record ) : void

Adds the record to the table storage service, or if it already exists updates the last active date and time.

메소드 상세

IsPresent() 공개 메소드

Determines if the device making the request has been seen by the web site previously.
public IsPresent ( HttpRequest request ) : bool
request System.Web.HttpRequest The request from the device.
리턴 bool

Remove() 공개 메소드

Removes the device behind the request.
public Remove ( HttpRequest request ) : void
request System.Web.HttpRequest The request from the device.
리턴 void

Set() 공개 메소드

Sets the last active time for the device making the request.
public Set ( HttpRequest request ) : void
request System.Web.HttpRequest The request from the device.
리턴 void