C# Class MapAround.Caching.FileTileCacheAccessor

Represents an object that provides an access to the tile cache storing into files.
Inheritance: ITileCacheAccessor
Afficher le fichier Open project: gkrsu/maparound.core Class Usage Examples

Méthodes publiques

Méthode Description
ExtractTileBytes ( string layer, BoundingRectangle area, string key, string contentType ) : byte[]

Extracts a binary representation of tile from cache.

FileTileCacheAccessor ( string path ) : System.Text

Initializes a new instance of the MapAround.Caching.FileTileCacheAccessor

GetCacheFile ( string layer, BoundingRectangle area, string key, string contentType ) : string

Gets the physical location of the file

Invalidate ( BoundingRectangle area ) : void

Invalidate cache given area.

Invalidate ( string layer, BoundingRectangle area ) : void

Invalidate cache given area.

SaveTileBytes ( string layer, BoundingRectangle area, string key, byte tile, string contentType ) : void

Saves a binary representation of an image into cache.

Méthodes protégées

Méthode Description
FileNameFromCacheKey ( string cacheKey, string contentType ) : string

Gets a file name (excluding directory name) by the cache access key.

GetAreaDir ( BoundingRectangle rectangle ) : string

Gets area

GetLayerDir ( string Layer ) : string

Gets layer directory

Private Methods

Méthode Description
CheckIntersect ( string path, double layerValue, string param ) : IEnumerable

Helps to find the intersection.

DeleteEmptyDirectory ( string path ) : void

Deletes an empty directory.

Lock ( ) : void
Unlock ( ) : void

Method Details

ExtractTileBytes() public méthode

Extracts a binary representation of tile from cache.
public ExtractTileBytes ( string layer, BoundingRectangle area, string key, string contentType ) : byte[]
layer string
area BoundingRectangle
key string Access key
contentType string
Résultat byte[]

FileNameFromCacheKey() protected méthode

Gets a file name (excluding directory name) by the cache access key.
protected FileNameFromCacheKey ( string cacheKey, string contentType ) : string
cacheKey string A cache access key
contentType string
Résultat string

FileTileCacheAccessor() public méthode

Initializes a new instance of the MapAround.Caching.FileTileCacheAccessor
public FileTileCacheAccessor ( string path ) : System.Text
path string The path to the files of cache
Résultat System.Text

GetAreaDir() protected méthode

Gets area
protected GetAreaDir ( BoundingRectangle rectangle ) : string
rectangle BoundingRectangle
Résultat string

GetCacheFile() public méthode

Gets the physical location of the file
public GetCacheFile ( string layer, BoundingRectangle area, string key, string contentType ) : string
layer string
area BoundingRectangle
key string
contentType string
Résultat string

GetLayerDir() protected méthode

Gets layer directory
protected GetLayerDir ( string Layer ) : string
Layer string
Résultat string

Invalidate() public méthode

Invalidate cache given area.
public Invalidate ( BoundingRectangle area ) : void
area BoundingRectangle
Résultat void

Invalidate() public méthode

Invalidate cache given area.
public Invalidate ( string layer, BoundingRectangle area ) : void
layer string Layer
area BoundingRectangle Given area
Résultat void

SaveTileBytes() public méthode

Saves a binary representation of an image into cache.
public SaveTileBytes ( string layer, BoundingRectangle area, string key, byte tile, string contentType ) : void
layer string
area BoundingRectangle
key string Access key
tile byte Byte array that contains a binary representation of a tile image
contentType string
Résultat void