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
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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