C# Класс FiftyOne.Foundation.Mobile.Redirection.RequestRecord

Class used to convert a HttpRequest into a single long value that is almost unique for the requesting device. Two devices that share the same external IP address and HTTP headers will calculate to the same long value so it may not always be unique. The number of handsets that fall into this category should be sufficiently small enough for it not to present a practical problem. The date and time the request was received is also recorded to enable out of date records to be removed from the list.
Наследование: IComparable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CompareTo ( object obj ) : int

Compares one request to another to determine if they are the same.

Защищенные методы

Метод Описание
Read ( BinaryReader reader ) : void
RequestRecord ( ) : System

Creates a new empty instance of RequestRecord class.

RequestRecord ( BinaryReader reader ) : System
RequestRecord ( HttpRequest request ) : System

If the IP address is IPv4 (4 bytes) then use the ip address as the high order bytes of the value and the hashcode as the low order bytes. If the IP address is IPv6 (8 bytes) then covert the bytes to a 64 bit integer. If anything else which we can't imagine use a hashcode of the string value.

RequestRecord ( RequestRecord recordToCopy ) : System

Constructs a new instance of RequestRecord class. Copies the values of the RequestRecord provided to the new instance.

Write ( Stream stream ) : void

Приватные методы

Метод Описание
SetHashCode ( byte buffer, HttpRequest request ) : void

Adds the hashcode of the relevent header fields as the low order bytes of the array.

Описание методов

CompareTo() публичный Метод

Compares one request to another to determine if they are the same.
public CompareTo ( object obj ) : int
obj object The object being compared.
Результат int

Read() защищенный Метод

protected Read ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Результат void

RequestRecord() защищенный Метод

Creates a new empty instance of RequestRecord class.
protected RequestRecord ( ) : System
Результат System

RequestRecord() защищенный Метод

protected RequestRecord ( BinaryReader reader ) : System
reader System.IO.BinaryReader
Результат System

RequestRecord() защищенный Метод

If the IP address is IPv4 (4 bytes) then use the ip address as the high order bytes of the value and the hashcode as the low order bytes. If the IP address is IPv6 (8 bytes) then covert the bytes to a 64 bit integer. If anything else which we can't imagine use a hashcode of the string value.
protected RequestRecord ( HttpRequest request ) : System
request HttpRequest
Результат System

RequestRecord() защищенный Метод

Constructs a new instance of RequestRecord class. Copies the values of the RequestRecord provided to the new instance.
protected RequestRecord ( RequestRecord recordToCopy ) : System
recordToCopy RequestRecord
Результат System

Write() защищенный Метод

protected Write ( Stream stream ) : void
stream Stream
Результат void