C# Class Simplify.Web.Core.StaticFiles.StaticFileHandler

Provides static file handler
Inheritance: IStaticFileHandler
Exibir arquivo Open project: i4004/Simplify.Web

Public Methods

Method Description
GetFileData ( string relativeFilePath ) : byte[]

Gets the file data.

GetFileLastModificationTime ( string relativeFilePath ) : System.DateTime

Gets the file last modification time.

GetIfModifiedSinceTime ( IHeaderDictionary headers ) : DateTime?

Gets If-Modified-Since time header from headers collection.

GetRelativeFilePath ( IOwinRequest request ) : string

Gets the relative file path of request.

IsFileCanBeUsedFromCache ( string cacheControlHeader, System.DateTime ifModifiedSinceHeader, System.DateTime fileLastModifiedTime ) : bool

Determines whether file can be used from cached.

IsStaticFileRoutePath ( string relativeFilePath ) : bool

Determines whether relative file path is a static file route path.

StaticFileHandler ( IList staticFilesPaths, string sitePhysicalPath ) : System

Initializes a new instance of the StaticFileHandler class.

Method Details

GetFileData() public method

Gets the file data.
public GetFileData ( string relativeFilePath ) : byte[]
relativeFilePath string The relative file path.
return byte[]

GetFileLastModificationTime() public method

Gets the file last modification time.
public GetFileLastModificationTime ( string relativeFilePath ) : System.DateTime
relativeFilePath string The relative file path.
return System.DateTime

GetIfModifiedSinceTime() public method

Gets If-Modified-Since time header from headers collection.
public GetIfModifiedSinceTime ( IHeaderDictionary headers ) : DateTime?
headers IHeaderDictionary The headers.
return DateTime?

GetRelativeFilePath() public method

Gets the relative file path of request.
public GetRelativeFilePath ( IOwinRequest request ) : string
request IOwinRequest The request.
return string

IsFileCanBeUsedFromCache() public method

Determines whether file can be used from cached.
public IsFileCanBeUsedFromCache ( string cacheControlHeader, System.DateTime ifModifiedSinceHeader, System.DateTime fileLastModifiedTime ) : bool
cacheControlHeader string The cache control header.
ifModifiedSinceHeader System.DateTime If modified since header.
fileLastModifiedTime System.DateTime The file last modified time.
return bool

IsStaticFileRoutePath() public method

Determines whether relative file path is a static file route path.
public IsStaticFileRoutePath ( string relativeFilePath ) : bool
relativeFilePath string The relative file path.
return bool

StaticFileHandler() public method

Initializes a new instance of the StaticFileHandler class.
public StaticFileHandler ( IList staticFilesPaths, string sitePhysicalPath ) : System
staticFilesPaths IList The static files paths.
sitePhysicalPath string The site physical path.
return System