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

Provides static file handler
Inheritance: IStaticFileHandler
Afficher le fichier Open project: i4004/Simplify.Web

Méthodes publiques

Méthode 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 méthode

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

GetFileLastModificationTime() public méthode

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

GetIfModifiedSinceTime() public méthode

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

GetRelativeFilePath() public méthode

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

IsFileCanBeUsedFromCache() public méthode

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.
Résultat bool

IsStaticFileRoutePath() public méthode

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

StaticFileHandler() public méthode

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.
Résultat System