C# Класс FFImageLoading.Work.TaskParameter

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
TaskParameter System
TransparencyChannel TaskParameter

Открытые методы

Метод Описание
BitmapOptimizations ( bool enabled ) : TaskParameter
CacheKey ( string customCacheKey ) : TaskParameter

Uses this cache key, in addition with the real key, to cache into memory/disk

Delay ( int milliseconds ) : TaskParameter

Delay the task by the specified milliseconds.

Dispose ( ) : void
DownSample ( int width, int height ) : TaskParameter

Reduce memory usage by downsampling the image. Aspect ratio will be kept even if width/height values are incorrect. Uses pixels units for width/height

DownSampleInDip ( int width, int height ) : TaskParameter

Reduce memory usage by downsampling the image. Aspect ratio will be kept even if width/height values are incorrect. Uses device independent points units for width/height

DownSampleMode ( InterpolationMode mode ) : TaskParameter

Set mode for downsampling. Speed-wise: nearest neighbour > linear > cubic.\ Default: bilinear On Android it's always ignored as Android uses bitmap insamplesize downsampling (bilinear)

DownloadStarted ( Action action ) : TaskParameter

If image starts downloading from Internet this callback is called

Error ( Action action ) : TaskParameter

If image loading failed this callback is called

ErrorPlaceholder ( string filepath, ImageSource source = ImageSource.Filepath ) : TaskParameter

Defines the placeholder used when an error occurs.

FadeAnimation ( bool enabled, bool enabledForCachedImages = null, int duration = null ) : TaskParameter

Indicates if the fade animation should be enabled.

Finish ( Action action ) : TaskParameter

If image loading process finished, whatever the result, this callback is called

FromApplicationBundle ( string filepath ) : TaskParameter

Constructsa new TaskParameter to load an image from a file from application bundle.

FromCompiledResource ( string resourceName ) : TaskParameter

Constructs a new TaskParameter to load an image from a compiled drawable resource.

FromFile ( string filepath ) : TaskParameter

Constructs a new TaskParameter to load an image from a file.

FromStream ( Func stream ) : TaskParameter

Constructs a new TaskParameter to load an image from a stream

FromUrl ( string url, System.TimeSpan cacheDuration = null ) : TaskParameter

Constructs a new TaskParameter to load an image from a URL.

LoadingPlaceholder ( string path, ImageSource source = ImageSource.Filepath ) : TaskParameter

Defines the placeholder used while loading.

Retry ( int retryCount, int millisecondDelay ) : TaskParameter

If image loading fails automatically retry it a number of times, with a specific delay.

Success ( System.Action action ) : TaskParameter

If image loading succeded this callback is called

Success ( LoadingResult>.Action action ) : TaskParameter

If image loading succeded this callback is called

Transform ( IEnumerable transformations ) : TaskParameter
Transform ( ITransformation transformation ) : TaskParameter
TransformPlaceholders ( bool enabled ) : TaskParameter

Indicates if transforms should be applied to placeholders.

WithCache ( CacheType cacheType ) : TaskParameter
WithCustomDataResolver ( IDataResolver resolver ) : TaskParameter

Forces task to use custom resolver.

WithPriority ( LoadingPriority priority ) : TaskParameter

Defines the loading priority, the default is LoadingPriority.Normal

WithPriority ( int priority ) : TaskParameter

Defines the loading priority, the default is 0 (LoadingPriority.Normal)

Приватные методы

Метод Описание
TaskParameter ( ) : System
TransparencyChannel ( bool loadTransparencyChannel ) : TaskParameter

Описание методов

BitmapOptimizations() публичный Метод

public BitmapOptimizations ( bool enabled ) : TaskParameter
enabled bool
Результат TaskParameter

CacheKey() публичный Метод

Uses this cache key, in addition with the real key, to cache into memory/disk
public CacheKey ( string customCacheKey ) : TaskParameter
customCacheKey string Custom cache key.
Результат TaskParameter

Delay() публичный Метод

Delay the task by the specified milliseconds.
public Delay ( int milliseconds ) : TaskParameter
milliseconds int Milliseconds to wait prior to start the task.
Результат TaskParameter

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DownSample() публичный Метод

Reduce memory usage by downsampling the image. Aspect ratio will be kept even if width/height values are incorrect. Uses pixels units for width/height
public DownSample ( int width, int height ) : TaskParameter
width int Optional width parameter, if value is higher than zero it will try to downsample to this width while keeping aspect ratio.
height int Optional height parameter, if value is higher than zero it will try to downsample to this height while keeping aspect ratio.
Результат TaskParameter

DownSampleInDip() публичный Метод

Reduce memory usage by downsampling the image. Aspect ratio will be kept even if width/height values are incorrect. Uses device independent points units for width/height
public DownSampleInDip ( int width, int height ) : TaskParameter
width int Optional width parameter, if value is higher than zero it will try to downsample to this width while keeping aspect ratio.
height int Optional height parameter, if value is higher than zero it will try to downsample to this height while keeping aspect ratio.
Результат TaskParameter

DownSampleMode() публичный Метод

Set mode for downsampling. Speed-wise: nearest neighbour > linear > cubic.\ Default: bilinear On Android it's always ignored as Android uses bitmap insamplesize downsampling (bilinear)
public DownSampleMode ( InterpolationMode mode ) : TaskParameter
mode InterpolationMode Optional mode parameter, if not set, defaults to linear.
Результат TaskParameter

DownloadStarted() публичный Метод

If image starts downloading from Internet this callback is called
public DownloadStarted ( Action action ) : TaskParameter
action Action Action.
Результат TaskParameter

Error() публичный Метод

If image loading failed this callback is called
public Error ( Action action ) : TaskParameter
action Action
Результат TaskParameter

ErrorPlaceholder() публичный Метод

Defines the placeholder used when an error occurs.
public ErrorPlaceholder ( string filepath, ImageSource source = ImageSource.Filepath ) : TaskParameter
filepath string Path to the file.
source ImageSource Source for the path: local, web, assets
Результат TaskParameter

FadeAnimation() публичный Метод

Indicates if the fade animation should be enabled.
public FadeAnimation ( bool enabled, bool enabledForCachedImages = null, int duration = null ) : TaskParameter
enabled bool If set to true enabled.
enabledForCachedImages bool Enables animation for local or cached images
duration int Fade animation duration in ms
Результат TaskParameter

Finish() публичный Метод

If image loading process finished, whatever the result, this callback is called
public Finish ( Action action ) : TaskParameter
action Action
Результат TaskParameter

FromApplicationBundle() публичный статический Метод

Constructsa new TaskParameter to load an image from a file from application bundle.
public static FromApplicationBundle ( string filepath ) : TaskParameter
filepath string Path to the file.
Результат TaskParameter

FromCompiledResource() публичный статический Метод

Constructs a new TaskParameter to load an image from a compiled drawable resource.
public static FromCompiledResource ( string resourceName ) : TaskParameter
resourceName string Name of the resource in drawable folder without extension
Результат TaskParameter

FromFile() публичный статический Метод

Constructs a new TaskParameter to load an image from a file.
public static FromFile ( string filepath ) : TaskParameter
filepath string Path to the file.
Результат TaskParameter

FromStream() публичный статический Метод

Constructs a new TaskParameter to load an image from a stream
public static FromStream ( Func stream ) : TaskParameter
stream Func Stream.
Результат TaskParameter

FromUrl() публичный статический Метод

Constructs a new TaskParameter to load an image from a URL.
public static FromUrl ( string url, System.TimeSpan cacheDuration = null ) : TaskParameter
url string URL to the file
cacheDuration System.TimeSpan How long the file will be cached on disk
Результат TaskParameter

LoadingPlaceholder() публичный Метод

Defines the placeholder used while loading.
public LoadingPlaceholder ( string path, ImageSource source = ImageSource.Filepath ) : TaskParameter
path string Path to the file.
source ImageSource Source for the path: local, web, assets
Результат TaskParameter

Retry() публичный Метод

If image loading fails automatically retry it a number of times, with a specific delay.
public Retry ( int retryCount, int millisecondDelay ) : TaskParameter
retryCount int Number of retries
millisecondDelay int Delay in milliseconds between each trial
Результат TaskParameter

Success() публичный Метод

If image loading succeded this callback is called
public Success ( System.Action action ) : TaskParameter
action System.Action Action to invoke when loading succeded.
Результат TaskParameter

Success() публичный Метод

If image loading succeded this callback is called
public Success ( LoadingResult>.Action action ) : TaskParameter
action LoadingResult>.Action Action to invoke when loading succeded. Argument is the size of the image loaded.
Результат TaskParameter

Transform() публичный Метод

public Transform ( IEnumerable transformations ) : TaskParameter
transformations IEnumerable
Результат TaskParameter

Transform() публичный Метод

public Transform ( ITransformation transformation ) : TaskParameter
transformation ITransformation
Результат TaskParameter

TransformPlaceholders() публичный Метод

Indicates if transforms should be applied to placeholders.
public TransformPlaceholders ( bool enabled ) : TaskParameter
enabled bool If set to true enabled.
Результат TaskParameter

WithCache() публичный Метод

public WithCache ( CacheType cacheType ) : TaskParameter
cacheType CacheType
Результат TaskParameter

WithCustomDataResolver() публичный Метод

Forces task to use custom resolver.
public WithCustomDataResolver ( IDataResolver resolver ) : TaskParameter
resolver IDataResolver Resolver.
Результат TaskParameter

WithPriority() публичный Метод

Defines the loading priority, the default is LoadingPriority.Normal
public WithPriority ( LoadingPriority priority ) : TaskParameter
priority LoadingPriority Priority.
Результат TaskParameter

WithPriority() публичный Метод

Defines the loading priority, the default is 0 (LoadingPriority.Normal)
public WithPriority ( int priority ) : TaskParameter
priority int Priority.
Результат TaskParameter