C# 클래스 MALClient.Shared.Managers.ImageCache

Provides methods and tools to cache images in a temporary local folder
파일 보기 프로젝트 열기: Mordonus/MALClient

공개 메소드들

메소드 설명
ClearAsync ( System.TimeSpan duration = null ) : Task

call this method to clear the entire cache.

GetCacheFileName ( Uri uri ) : string

Gets the local cache file name associated with a specified Uri.

GetFromCacheAsync ( Uri uri ) : Task

Load a specific image from the cache. If the image is not in the cache, ImageCache will try to download and store it.

GetHttpStreamToStorageFileAsync ( this uri, StorageFile targetFile ) : Task

Get the response stream returned by a HTTP get request and save it to a local file.

PerformScheduledCacheCleanup ( ) : void

비공개 메소드들

메소드 설명
CreateBitmapImage ( string fileName ) : Uri
CreateHash64 ( Uri uri ) : ulong
CreateHash64 ( string str ) : ulong
EnsureFileAsync ( Uri uri ) : Task
GetCacheFolderAsync ( ) : Task
GetHttpContentAsync ( Uri uri ) : Task
ImageCache ( ) : System
IsFileOutOfDate ( StorageFile file, System.DateTime expirationDate ) : Task

메소드 상세

ClearAsync() 공개 정적인 메소드

call this method to clear the entire cache.
public static ClearAsync ( System.TimeSpan duration = null ) : Task
duration System.TimeSpan Use this parameter to define a timespan from now to select cache entries to delete.
리턴 Task

GetCacheFileName() 공개 정적인 메소드

Gets the local cache file name associated with a specified Uri.
public static GetCacheFileName ( Uri uri ) : string
uri System.Uri Uri of the resource.
리턴 string

GetFromCacheAsync() 공개 정적인 메소드

Load a specific image from the cache. If the image is not in the cache, ImageCache will try to download and store it.
public static GetFromCacheAsync ( Uri uri ) : Task
uri System.Uri Uri of the image.
리턴 Task

GetHttpStreamToStorageFileAsync() 공개 정적인 메소드

Get the response stream returned by a HTTP get request and save it to a local file.
public static GetHttpStreamToStorageFileAsync ( this uri, StorageFile targetFile ) : Task
uri this Uri to request.
targetFile Windows.Storage.StorageFile StorageFile to save the stream to.
리턴 Task

PerformScheduledCacheCleanup() 공개 정적인 메소드

public static PerformScheduledCacheCleanup ( ) : void
리턴 void