C# Class MapAround.Caching.FileJSONCacheAccessor

Represents an object that provides an access to the JSON object cache storing into files.
Inheritance: IJSONCacheAccessor
Exibir arquivo Open project: gkrsu/maparound.core

Public Methods

Method Description
ExtractJSONBytes ( string key ) : string

Extracts a string representation of an JSON object from cache.

FileJSONCacheAccessor ( string path ) : System.Text

Constructs FileJSONCacheAccessor object.

SaveJSONBytes ( string key, string jsonObject ) : void

Saves a string representation of an JSON object into cache.

Protected Methods

Method Description
FileNameFromCacheKey ( string cacheKey ) : string

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

Method Details

ExtractJSONBytes() public method

Extracts a string representation of an JSON object from cache.
public ExtractJSONBytes ( string key ) : string
key string
return string

FileJSONCacheAccessor() public method

Constructs FileJSONCacheAccessor object.
public FileJSONCacheAccessor ( string path ) : System.Text
path string
return System.Text

FileNameFromCacheKey() protected method

Gets a file name (excluding directory name) by the cache access key.
protected FileNameFromCacheKey ( string cacheKey ) : string
cacheKey string A cache access key
return string

SaveJSONBytes() public method

Saves a string representation of an JSON object into cache.
public SaveJSONBytes ( string key, string jsonObject ) : void
key string Access key
jsonObject string Byte array that contains a binary representation of a JSON object
return void