FileTileCache¶
Namespace: ThinkGeo.Core
Represents the FileTileCache class.
public class FileTileCache
Inheritance object → FileTileCache
Properties¶
FileExtension¶
Gets or sets the FileExtension.
public string FileExtension { get; set; }
Property Value¶
CacheDirectory¶
Gets or sets the CacheDirectory.
public string CacheDirectory { get; set; }
Property Value¶
ExpirationTime¶
Gets or sets the ExpirationTime.
public TimeSpan ExpirationTime { get; set; }
Property Value¶
Constructors¶
FileTileCache()¶
Initializes a new instance of the FileTileCache class.
public FileTileCache()
FileTileCache(string)¶
Initializes a new instance of the FileTileCache class.
public FileTileCache(string cacheDirectory)
Parameters¶
cacheDirectory string
Methods¶
OnGettingTile(GettingTileTileCacheEventArgs)¶
Performs on getting tile.
protected void OnGettingTile(GettingTileTileCacheEventArgs e)
Parameters¶
e GettingTileTileCacheEventArgs
The e.
Returns¶
OnGottenTile(GottenTileTileCacheEventArgs)¶
Performs on gotten tile.
protected void OnGottenTile(GottenTileTileCacheEventArgs e)
Parameters¶
e GottenTileTileCacheEventArgs
The e.
Returns¶
OnSavingTile(SavingTileTileCacheEventArgs)¶
Performs on saving tile.
protected void OnSavingTile(SavingTileTileCacheEventArgs e)
Parameters¶
e SavingTileTileCacheEventArgs
The e.
Returns¶
OnSavedTile(SavedTileTileCacheEventArgs)¶
Performs on saved tile.
protected void OnSavedTile(SavedTileTileCacheEventArgs e)
Parameters¶
e SavedTileTileCacheEventArgs
The e.
Returns¶
GetTileAsync(int, long, long, CancellationToken)¶
Returns tile async for the specified parameters.
public Task<Tile> GetTileAsync(int zoom, long x, long y, CancellationToken cancellationToken)
Parameters¶
zoom int
The zoom.
x long
The x-coordinate, in pixels.
y long
The y-coordinate, in pixels.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task<Tile>
A task that represents the asynchronous operation and provides the result.
GetTileAsync(int, long, long, string, CancellationToken)¶
Returns tile async for the specified parameters.
public Task<Tile> GetTileAsync(int zoom, long x, long y, string tileSource, CancellationToken cancellationToken)
Parameters¶
zoom int
The zoom.
x long
The x-coordinate, in pixels.
y long
The y-coordinate, in pixels.
tileSource string
The tile source.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task<Tile>
A task that represents the asynchronous operation and provides the result.
GetTileAsyncCore(int, long, long, string, CancellationToken)¶
Returns tile async for the specified parameters.
protected Task<Tile> GetTileAsyncCore(int zoom, long x, long y, string tileSource, CancellationToken cancellationToken)
Parameters¶
zoom int
The zoom.
x long
The x-coordinate, in pixels.
y long
The y-coordinate, in pixels.
tileSource string
The tile source.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task<Tile>
A task that represents the asynchronous operation and provides the result.
SaveTileAsync(Tile, CancellationToken)¶
Saves the current object to the specified destination.
public Task SaveTileAsync(Tile tile, CancellationToken cancellationToken)
Parameters¶
tile Tile
The tile.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task
A task that represents the asynchronous operation.
SaveTileAsync(Tile, string, CancellationToken)¶
Saves the current object to the specified destination.
public Task SaveTileAsync(Tile tile, string tileSource, CancellationToken cancellationToken)
Parameters¶
tile Tile
The tile.
tileSource string
The tile source.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task
A task that represents the asynchronous operation.
SaveTileAsyncCore(Tile, string, CancellationToken)¶
Provides the overridable implementation that saves the current object to the specified destination.
protected Task SaveTileAsyncCore(Tile tile, string tileSource, CancellationToken cancellationToken)
Parameters¶
tile Tile
The tile.
tileSource string
The tile source.
cancellationToken CancellationToken
A cancellation or authentication token, depending on context.
Returns¶
Task
A task that represents the asynchronous operation.
DeleteTile(Tile)¶
Performs delete tile.
public void DeleteTile(Tile tile)
Parameters¶
tile Tile
The tile.
Returns¶
DeleteTile(Tile, string)¶
Performs delete tile.
public void DeleteTile(Tile tile, string tileSource)
Parameters¶
tile Tile
The tile.
tileSource string
The tile source.
Returns¶
DeleteTileCore(Tile, string)¶
Provides the overridable implementation that performs delete tile.
protected void DeleteTileCore(Tile tile, string tileSource)
Parameters¶
tile Tile
The tile.
tileSource string
The tile source.
Returns¶
ClearCache()¶
Clears all cached tiles by deleting the cache directory.
public void ClearCache()
Returns¶
ClearCacheCore()¶
Provides the overridable implementation that performs clear cache.
protected void ClearCacheCore()
Returns¶
ToSafeShortDirectoryName(string, int)¶
Generates a filesystem-safe short directory name for the supplied input.
public static string ToSafeShortDirectoryName(string input, int maxLength)
Parameters¶
input string
The input string to normalize.
maxLength int
The maximum length for the generated name.
Returns¶
string
A safe directory name derived from the input.
Events¶
GettingTile¶
Occurs when the GettingTile event is raised.
public event EventHandler<GettingTileTileCacheEventArgs> GettingTile;
GottenTile¶
Occurs when the GottenTile event is raised.
public event EventHandler<GottenTileTileCacheEventArgs> GottenTile;
SavingTile¶
Occurs when the SavingTile event is raised.
public event EventHandler<SavingTileTileCacheEventArgs> SavingTile;
SavedTile¶
Occurs when the SavedTile event is raised.
public event EventHandler<SavedTileTileCacheEventArgs> SavedTile;