ImageExtensions.LoadImageBytesFromUrl(IBlobCache, string, bool, DateTimeOffset?) method¶
Defined in
Type: ImageExtensions
Namespace: Akavache
Assembly: Akavache.HttpDownloader.dll
Applies to
net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net462
Overloads¶
- 1.
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) - 2.
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) - 3.
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) - 4.
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
1. Overload¶
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Summary: Downloads an image from a remote URL and returns the image bytes. This method combines DownloadUrl and LoadImageBytes functionality, using cached values when possible.
Parameters
| Name | Type | Description |
|---|---|---|
blobCache | [IBlobCache](# | The blob cache to store and retrieve the image data. |
url | string | The URL to download the image from. |
fetchAlways = false | bool | A value indicating whether to always fetch the image from the URL, bypassing the cache. |
absoluteExpiration = null | DateTimeOffset? | An optional expiration date for the cached image data. |
Returns: IObservable
2. Overload¶
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.
Parameters
| Name | Type | Description |
|---|---|---|
blobCache | [IBlobCache](# | The blob cache to load the image from if available. |
url | Uri | The URL to download. |
fetchAlways = false | bool | If we should always fetch the image from the URL even if we have one in the blob. |
absoluteExpiration = null | DateTimeOffset? | An optional expiration date. |
Returns: IObservable
3. Overload¶
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.
Parameters
| Name | Type | Description |
|---|---|---|
blobCache | [IBlobCache](# | The blob cache to load the image from if available. |
key | string | The key to store with. |
url | string | The URL to download. |
fetchAlways = false | bool | If we should always fetch the image from the URL even if we have one in the blob. |
absoluteExpiration = null | DateTimeOffset? | An optional expiration date. |
Returns: IObservable
4. Overload¶
public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.
Parameters
| Name | Type | Description |
|---|---|---|
blobCache | [IBlobCache](# | The blob cache to load the image from if available. |
key | string | The key to store with. |
url | Uri | The URL to download. |
fetchAlways = false | bool | If we should always fetch the image from the URL even if we have one in the blob. |
absoluteExpiration = null | DateTimeOffset? | An optional expiration date. |
Returns: IObservable