Skip to main content

StaticFileHandler

Assembly: ServiceStack.dll
View Source
Declaration
public class StaticFileHandler : HttpAsyncTaskHandler, IHttpAsyncHandler, IHttpHandler, IServiceStackHandler

Properties

ResponseFilter

View Source
Declaration
public static Action<IRequest, IResponse, IVirtualFile> ResponseFilter { get; set; }

BufferSize

View Source
Declaration
public int BufferSize { get; set; }

VirtualNode

View Source
Declaration
public IVirtualNode VirtualNode { get; set; }

IsReusable

View Source
Declaration
public override bool IsReusable { get; }

Inherited Properties

IsReusable

View Source
Declaration
public virtual bool IsReusable { get; }

RequestName

View Source
Declaration
public string RequestName { get; set; }

Fields

DefaultBufferSize

View Source
Declaration
public static int DefaultBufferSize

Methods

SetDefaultFile(String, Byte[], DateTime)

Keep default file contents in-memory

View Source
Declaration
public static void SetDefaultFile(string defaultFilePath, byte[] defaultFileContents, DateTime defaultFileModified)
Parameters
TypeName
System.StringdefaultFilePath
System.Byte[]defaultFileContents
System.DateTimedefaultFileModified

ProcessRequestAsync(IRequest, IResponse, String)

View Source
Declaration
public override async Task ProcessRequestAsync(IRequest request, IResponse response, string operationName)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequestrequest
ServiceStack.Web.IResponseresponse
System.StringoperationName

MonoDirectoryExists(String, String)

View Source
Declaration
public static bool MonoDirectoryExists(string dirPath, string appFilePath)
Returns

System.Boolean

Parameters
TypeName
System.StringdirPath
System.StringappFilePath

Inherited Methods

CreateProcessRequestTask(IRequest, IResponse, String)

View Source
Declaration
protected virtual Task CreateProcessRequestTask(IRequest httpReq, IResponse httpRes, string operationName)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes
System.StringoperationName

DefaultHandledRequest(HttpListenerContext)

View Source
Declaration
protected static bool DefaultHandledRequest(HttpListenerContext context)
Returns

System.Boolean

Parameters
TypeName
System.Net.HttpListenerContextcontext

DefaultHandledRequest(HttpContextBase)

View Source
Declaration
protected static bool DefaultHandledRequest(HttpContextBase context)
Returns

System.Boolean

Parameters
TypeName
System.Web.HttpContextBasecontext

HandleException(IRequest, IResponse, String, Exception)

View Source
Declaration
protected async Task HandleException(IRequest httpReq, IResponse httpRes, string operationName, Exception ex)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes
System.StringoperationName
System.Exceptionex

ProcessRequest(IRequest, IResponse, String)

View Source
Declaration
public virtual void ProcessRequest(IRequest httpReq, IResponse httpRes, string operationName)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes
System.StringoperationName

ProcessRequestAsync(IRequest, IResponse, String)

View Source
Declaration
public virtual Task ProcessRequestAsync(IRequest httpReq, IResponse httpRes, string operationName)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes
System.StringoperationName

ProcessRequestAsync(HttpContextBase)

View Source
Declaration
public virtual Task ProcessRequestAsync(HttpContextBase context)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Web.HttpContextBasecontext

RunAsAsync()

View Source
Declaration
public virtual bool RunAsAsync()
Returns

System.Boolean

IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object)

View Source
Declaration
IAsyncResult IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
Returns

System.IAsyncResult

Parameters
TypeName
System.Web.HttpContextcontext
System.AsyncCallbackcb
System.ObjectextraData

IHttpAsyncHandler.EndProcessRequest(IAsyncResult)

View Source
Declaration
void IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
Parameters
TypeName
System.IAsyncResultresult

IHttpHandler.ProcessRequest(HttpContext)

View Source
Declaration
void IHttpHandler.ProcessRequest(HttpContext context)
Parameters
TypeName
System.Web.HttpContextcontext

Implements