C# Класс JsonFx.Handlers.ETag

Generates an HTTP/1.1 Cache header Entity Tag (ETag)
HTTP/1.1 RFC: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
HandleETag ( HttpContext context ) : bool

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.

HandleETag ( HttpContext context, HttpCacheability cacheability ) : bool

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.

HandleETag ( HttpContext context, HttpCacheability cacheability, bool forceRefresh ) : bool

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.

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

Метод Описание
CalculateETag ( ) : string

Sets ETag.Value

ComputeHash ( Stream value ) : string

Generates a unique hash from Stream

ComputeHash ( byte value ) : string

Generates a unique hash from byte[]

ComputeHash ( string value ) : string

Generates a unique hash from string

GetLastModified ( ) : System.DateTime

GetMetaData ( bool &isHash ) : object

Provides an algorithm for generating an HTTP/1.1 Cache header Entity Tag (ETag)

GetMetaData must return String, Byte[], or Stream

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

Метод Описание
ETagsEqual ( string etag1, string etag2 ) : bool

see System.Web.StaticFileHandler

FormatBytes ( byte value ) : string

Gets the hex digits for the given bytes

FormatTimeHeader ( System.DateTime time ) : string

Converts a DateTime to a valid header string

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

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

Sets ETag.Value
protected CalculateETag ( ) : string
Результат string

ComputeHash() защищенный статический Метод

Generates a unique hash from Stream
protected static ComputeHash ( Stream value ) : string
value Stream
Результат string

ComputeHash() защищенный статический Метод

Generates a unique hash from byte[]
protected static ComputeHash ( byte value ) : string
value byte
Результат string

ComputeHash() защищенный статический Метод

Generates a unique hash from string
protected static ComputeHash ( string value ) : string
value string
Результат string

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

protected GetLastModified ( ) : System.DateTime
Результат System.DateTime

GetMetaData() защищенный абстрактный Метод

Provides an algorithm for generating an HTTP/1.1 Cache header Entity Tag (ETag)
GetMetaData must return String, Byte[], or Stream
protected abstract GetMetaData ( bool &isHash ) : object
isHash bool
Результат object

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

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.
public HandleETag ( HttpContext context ) : bool
context System.Web.HttpContext
Результат bool

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

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.
public HandleETag ( HttpContext context, HttpCacheability cacheability ) : bool
context System.Web.HttpContext
cacheability HttpCacheability
Результат bool

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

Verifies if the client has a cached copy of the resource. Sets up HttpResponse appropriately. Returns true if cached.
public HandleETag ( HttpContext context, HttpCacheability cacheability, bool forceRefresh ) : bool
context System.Web.HttpContext
cacheability HttpCacheability
forceRefresh bool
Результат bool