C# 클래스 EnterpriseWebLibrary.EnterpriseWebFramework.EwfSafeResponseWriter

An object that writes a response to a safe HTTP request (e.g. GET, HEAD).
파일 보기 프로젝트 열기: enduracode/enterprise-web-library 1 사용 예제들

공개 메소드들

메소드 설명
EwfSafeResponseWriter ( EwfResponse response ) : System

Creates a response writer with a generic response and no caching information.

EwfSafeResponseWriter ( Func responseCreator, string urlVersionString, Func useMemoryCacheGetter ) : System

Creates a response writer with a BLOB-file response.

EwfSafeResponseWriter ( Func responseCreator, DateTimeOffset lastModificationDateAndTime, Func memoryCacheKeyGetter = null ) : System

Creates a response writer with a generic response, a last-modification date/time (which enables conditional requests), and an optional memory-cache key. Do not use this overload if the response will vary based on non-URL elements of the request, such as the authenticated user, since a parameter doesn't exist yet to incorporate those elements into the ETag.

EwfSafeResponseWriter ( Func responseCreator, string urlVersionString, Func memoryCachingSetupGetter = null ) : System

Creates a response writer with a generic response, a resource-version string from the request URL, and optional memory caching information. Including a version string in a resource's URL greatly improves the cacheability of the resource, so you should use this technique whenever you have the ability to change the URL when the resource changes. Do not use a version string if the response will vary based on non-URL elements of the request, such as the authenticated user.

EwfSafeResponseWriter ( Func cssGetter, string urlVersionString, Func memoryCachingSetupGetter ) : System

Creates a response writer with CSS text.

GetUrlVersionString ( DateTimeOffset dateAndTime ) : string

Returns the URL resource-version string for the specified date/time.

비공개 메소드들

메소드 설명
WriteResponse ( ) : void
createWriter ( Func responseCreator, string urlVersionString, string eTagBase, Func lastModificationDateAndTimeGetter, Func memoryCacheKeyGetter ) : HttpResponse>.Action

메소드 상세

EwfSafeResponseWriter() 공개 메소드

Creates a response writer with a generic response and no caching information.
public EwfSafeResponseWriter ( EwfResponse response ) : System
response EwfResponse The response.
리턴 System

EwfSafeResponseWriter() 공개 메소드

Creates a response writer with a BLOB-file response.
public EwfSafeResponseWriter ( Func responseCreator, string urlVersionString, Func useMemoryCacheGetter ) : System
responseCreator Func The response creator.
urlVersionString string The resource-version string from the request URL. Including a version string in a resource's URL greatly improves the /// cacheability of the resource, so you should use this technique whenever you have the ability to change the URL when the resource changes. Do not use a /// version string if the response will vary based on non-URL elements of the request, such as the authenticated user. Do not pass null.
useMemoryCacheGetter Func A function that gets whether you want to use EWL's memory cache for this response. Do not pass null.
리턴 System

EwfSafeResponseWriter() 공개 메소드

Creates a response writer with a generic response, a last-modification date/time (which enables conditional requests), and an optional memory-cache key. Do not use this overload if the response will vary based on non-URL elements of the request, such as the authenticated user, since a parameter doesn't exist yet to incorporate those elements into the ETag.
public EwfSafeResponseWriter ( Func responseCreator, DateTimeOffset lastModificationDateAndTime, Func memoryCacheKeyGetter = null ) : System
responseCreator Func The response creator.
lastModificationDateAndTime DateTimeOffset The last-modification date/time of the resource.
memoryCacheKeyGetter Func A function that gets the memory-cache key for this response. Pass null or return the empty string if you do not want /// to use EWL's memory cache. Do not return null.
리턴 System

EwfSafeResponseWriter() 공개 메소드

Creates a response writer with a generic response, a resource-version string from the request URL, and optional memory caching information. Including a version string in a resource's URL greatly improves the cacheability of the resource, so you should use this technique whenever you have the ability to change the URL when the resource changes. Do not use a version string if the response will vary based on non-URL elements of the request, such as the authenticated user.
public EwfSafeResponseWriter ( Func responseCreator, string urlVersionString, Func memoryCachingSetupGetter = null ) : System
responseCreator Func The response creator.
urlVersionString string The resource-version string from the request URL. Do not pass null or the empty string.
memoryCachingSetupGetter Func A function that gets the memory-caching setup object for the response. Pass null or return null if you do not /// want to use EWL's memory cache.
리턴 System

EwfSafeResponseWriter() 공개 메소드

Creates a response writer with CSS text.
public EwfSafeResponseWriter ( Func cssGetter, string urlVersionString, Func memoryCachingSetupGetter ) : System
cssGetter Func A function that gets the CSS that will be preprocessed and used as the response. Do not pass or return null.
urlVersionString string The resource-version string from the request URL. Do not pass null or the empty string; this parameter is required /// because it greatly improves cacheability, which is important for CSS. You must change the URL when the CSS changes, and you must not vary the response /// based on non-URL elements of the request, such as the authenticated user.
memoryCachingSetupGetter Func A function that gets the memory-caching setup object for the response. Do not pass or return null; memory caching /// is important for CSS and is therefore required.
리턴 System

GetUrlVersionString() 공개 정적인 메소드

Returns the URL resource-version string for the specified date/time.
public static GetUrlVersionString ( DateTimeOffset dateAndTime ) : string
dateAndTime DateTimeOffset
리턴 string