Class RemoteImageLoader
Namespace: Aurigma.DesignAtoms.Services.RemoteImageLoader
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class RemoteImageLoader : IRemoteImageLoader
Inheritance: System.Object -> RemoteImageLoader
Implements
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
RemoteImageLoader
public RemoteImageLoader(IFileCache fileCache, HttpClient httpClient, int retryCount = 0)
Methods
GetImageUrlCacheName
public string GetImageUrlCacheName(Uri url)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | url |
Returns
System.String
IsExistsAsync
public Task<bool> IsExistsAsync(string url)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | url |
Returns
System.Threading.Tasks.Task<System.Boolean>
IsExistsAsync
public Task<bool> IsExistsAsync(Uri url)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | url |
Returns
System.Threading.Tasks.Task<System.Boolean>
GetImageUrlCachePrefix
public string GetImageUrlCachePrefix(Uri url)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | url |
Returns
System.String
DownloadImageToCache
public string DownloadImageToCache(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | uri |
Returns
System.String
DownloadImageToCacheAsync
public Task<string> DownloadImageToCacheAsync(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | uri |
Returns
System.Threading.Tasks.Task<System.String>
DownloadImageToStreamAsync
public Task<Stream> DownloadImageToStreamAsync(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | uri |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
GetImageMetadataAsync
public Task<WebImageMetadata> GetImageMetadataAsync(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | uri |
Returns
System.Threading.Tasks.Task<Aurigma.DesignAtoms.Services.RemoteImageLoader.WebImageMetadata>
ValidateCachedImageAsync
public virtual Task<bool> ValidateCachedImageAsync(Uri uri, string storageId)
Parameters
| Type | Name | Description |
|---|---|---|
System.Uri | uri | |
System.String | storageId |
Returns
System.Threading.Tasks.Task<System.Boolean>
DownloadImagesToCacheAsync
public Task DownloadImagesToCacheAsync(IEnumerable<string> urls)
Parameters
| Type | Name | Description |
|---|---|---|
System.Collections.Generic.IEnumerable<System.String> | urls |
Returns
System.Threading.Tasks.Task