C# Класс ServiceStack.HttpResult

Наследование: IHttpResult, IStreamWriter, IPartialWriter
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DeleteCookie ( string name ) : void
GetContentLength ( ) : long?
HttpResult ( ) : System
HttpResult ( FileInfo fileResponse, bool asAttachment ) : System
HttpResult ( FileInfo fileResponse, string contentType = null, bool asAttachment = false ) : System
HttpResult ( HttpStatusCode statusCode, string statusDescription ) : System
HttpResult ( IVirtualFile fileResponse, bool asAttachment ) : System
HttpResult ( IVirtualFile fileResponse, string contentType = null, bool asAttachment = false ) : System
HttpResult ( Stream responseStream, string contentType ) : System
HttpResult ( byte responseBytes, string contentType ) : System
HttpResult ( object response ) : System
HttpResult ( object response, HttpStatusCode statusCode ) : System
HttpResult ( object response, string contentType ) : System
HttpResult ( object response, string contentType, HttpStatusCode statusCode ) : System
HttpResult ( string responseText, string contentType ) : System
NotModified ( string description = null, CacheControl cacheControl = null, System.TimeSpan maxAge = null, string eTag = null, System.DateTime lastModified = null ) : HttpResult
Redirect ( string newLocationUri, HttpStatusCode redirectStatus = HttpStatusCode.Found ) : HttpResult
SetCookie ( string name, string value, System.DateTime expiresAt, string path, bool secure = false, bool httpOnly = false ) : void
SetCookie ( string name, string value, System.TimeSpan expiresIn, string path ) : void
SetPermanentCookie ( string name, string value ) : void
SetPermanentCookie ( string name, string value, string path ) : void
SetSessionCookie ( string name, string value ) : void
SetSessionCookie ( string name, string value, string path ) : void
SoftRedirect ( string newLocationUri, object response = null ) : HttpResult

Respond with a 'Soft redirect' so smart clients (e.g. ajax) have access to the response and can decide whether or not they should redirect

Status201Created ( object response, string newLocationUri ) : HttpResult
TriggerEvent ( object response, string eventName, string value = null ) : HttpResult

Decorate the response with an additional client-side event to instruct participating smart clients (e.g. ajax) with hints to transparently invoke client-side functionality

WritePartialTo ( IResponse response ) : void
WriteTo ( Stream responseStream ) : void

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

Метод Описание
DisposeStream ( ) : void
WriteTo ( Stream responseStream, int paddingLength ) : void

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

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

public DeleteCookie ( string name ) : void
name string
Результат void

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

public GetContentLength ( ) : long?
Результат long?

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

public HttpResult ( ) : System
Результат System

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

public HttpResult ( FileInfo fileResponse, bool asAttachment ) : System
fileResponse System.IO.FileInfo
asAttachment bool
Результат System

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

public HttpResult ( FileInfo fileResponse, string contentType = null, bool asAttachment = false ) : System
fileResponse System.IO.FileInfo
contentType string
asAttachment bool
Результат System

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

public HttpResult ( HttpStatusCode statusCode, string statusDescription ) : System
statusCode HttpStatusCode
statusDescription string
Результат System

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

public HttpResult ( IVirtualFile fileResponse, bool asAttachment ) : System
fileResponse IVirtualFile
asAttachment bool
Результат System

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

public HttpResult ( IVirtualFile fileResponse, string contentType = null, bool asAttachment = false ) : System
fileResponse IVirtualFile
contentType string
asAttachment bool
Результат System

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

public HttpResult ( Stream responseStream, string contentType ) : System
responseStream Stream
contentType string
Результат System

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

public HttpResult ( byte responseBytes, string contentType ) : System
responseBytes byte
contentType string
Результат System

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

public HttpResult ( object response ) : System
response object
Результат System

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

public HttpResult ( object response, HttpStatusCode statusCode ) : System
response object
statusCode HttpStatusCode
Результат System

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

public HttpResult ( object response, string contentType ) : System
response object
contentType string
Результат System

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

public HttpResult ( object response, string contentType, HttpStatusCode statusCode ) : System
response object
contentType string
statusCode HttpStatusCode
Результат System

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

public HttpResult ( string responseText, string contentType ) : System
responseText string
contentType string
Результат System

NotModified() публичный статический Метод

public static NotModified ( string description = null, CacheControl cacheControl = null, System.TimeSpan maxAge = null, string eTag = null, System.DateTime lastModified = null ) : HttpResult
description string
cacheControl CacheControl
maxAge System.TimeSpan
eTag string
lastModified System.DateTime
Результат HttpResult

Redirect() публичный статический Метод

public static Redirect ( string newLocationUri, HttpStatusCode redirectStatus = HttpStatusCode.Found ) : HttpResult
newLocationUri string
redirectStatus HttpStatusCode
Результат HttpResult

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

public SetCookie ( string name, string value, System.DateTime expiresAt, string path, bool secure = false, bool httpOnly = false ) : void
name string
value string
expiresAt System.DateTime
path string
secure bool
httpOnly bool
Результат void

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

public SetCookie ( string name, string value, System.TimeSpan expiresIn, string path ) : void
name string
value string
expiresIn System.TimeSpan
path string
Результат void

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

public SetPermanentCookie ( string name, string value ) : void
name string
value string
Результат void

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

public SetPermanentCookie ( string name, string value, string path ) : void
name string
value string
path string
Результат void

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

public SetSessionCookie ( string name, string value ) : void
name string
value string
Результат void

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

public SetSessionCookie ( string name, string value, string path ) : void
name string
value string
path string
Результат void

SoftRedirect() публичный статический Метод

Respond with a 'Soft redirect' so smart clients (e.g. ajax) have access to the response and can decide whether or not they should redirect
public static SoftRedirect ( string newLocationUri, object response = null ) : HttpResult
newLocationUri string
response object
Результат HttpResult

Status201Created() публичный статический Метод

public static Status201Created ( object response, string newLocationUri ) : HttpResult
response object
newLocationUri string
Результат HttpResult

TriggerEvent() публичный статический Метод

Decorate the response with an additional client-side event to instruct participating smart clients (e.g. ajax) with hints to transparently invoke client-side functionality
public static TriggerEvent ( object response, string eventName, string value = null ) : HttpResult
response object
eventName string
value string
Результат HttpResult

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

public WritePartialTo ( IResponse response ) : void
response IResponse
Результат void

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

public WriteTo ( Stream responseStream ) : void
responseStream Stream
Результат void