C# Class FFImageLoading.Work.TaskParameter

Inheritance: IDisposable
Afficher le fichier Open project: daniel-luberda/FFImageLoading Class Usage Examples

Private Properties

Свойство Type Description
TaskParameter System
TransparencyChannel TaskParameter

Méthodes publiques

Méthode Description
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)

Private Methods

Méthode Description
TaskParameter ( ) : System
TransparencyChannel ( bool loadTransparencyChannel ) : TaskParameter

Method Details

BitmapOptimizations() public méthode

public BitmapOptimizations ( bool enabled ) : TaskParameter
enabled bool
Résultat TaskParameter

CacheKey() public méthode

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.
Résultat TaskParameter

Delay() public méthode

Delay the task by the specified milliseconds.
public Delay ( int milliseconds ) : TaskParameter
milliseconds int Milliseconds to wait prior to start the task.
Résultat TaskParameter

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DownSample() public méthode

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.
Résultat TaskParameter

DownSampleInDip() public méthode

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.
Résultat TaskParameter

DownSampleMode() public méthode

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.
Résultat TaskParameter

DownloadStarted() public méthode

If image starts downloading from Internet this callback is called
public DownloadStarted ( Action action ) : TaskParameter
action Action Action.
Résultat TaskParameter

Error() public méthode

If image loading failed this callback is called
public Error ( Action action ) : TaskParameter
action Action
Résultat TaskParameter

ErrorPlaceholder() public méthode

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
Résultat TaskParameter

FadeAnimation() public méthode

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
Résultat TaskParameter

Finish() public méthode

If image loading process finished, whatever the result, this callback is called
public Finish ( Action action ) : TaskParameter
action Action
Résultat TaskParameter

FromApplicationBundle() public static méthode

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.
Résultat TaskParameter

FromCompiledResource() public static méthode

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
Résultat TaskParameter

FromFile() public static méthode

Constructs a new TaskParameter to load an image from a file.
public static FromFile ( string filepath ) : TaskParameter
filepath string Path to the file.
Résultat TaskParameter

FromStream() public static méthode

Constructs a new TaskParameter to load an image from a stream
public static FromStream ( Func stream ) : TaskParameter
stream Func Stream.
Résultat TaskParameter

FromUrl() public static méthode

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
Résultat TaskParameter

LoadingPlaceholder() public méthode

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
Résultat TaskParameter

Retry() public méthode

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
Résultat TaskParameter

Success() public méthode

If image loading succeded this callback is called
public Success ( System.Action action ) : TaskParameter
action System.Action Action to invoke when loading succeded.
Résultat TaskParameter

Success() public méthode

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.
Résultat TaskParameter

Transform() public méthode

public Transform ( IEnumerable transformations ) : TaskParameter
transformations IEnumerable
Résultat TaskParameter

Transform() public méthode

public Transform ( ITransformation transformation ) : TaskParameter
transformation ITransformation
Résultat TaskParameter

TransformPlaceholders() public méthode

Indicates if transforms should be applied to placeholders.
public TransformPlaceholders ( bool enabled ) : TaskParameter
enabled bool If set to true enabled.
Résultat TaskParameter

WithCache() public méthode

public WithCache ( CacheType cacheType ) : TaskParameter
cacheType CacheType
Résultat TaskParameter

WithCustomDataResolver() public méthode

Forces task to use custom resolver.
public WithCustomDataResolver ( IDataResolver resolver ) : TaskParameter
resolver IDataResolver Resolver.
Résultat TaskParameter

WithPriority() public méthode

Defines the loading priority, the default is LoadingPriority.Normal
public WithPriority ( LoadingPriority priority ) : TaskParameter
priority LoadingPriority Priority.
Résultat TaskParameter

WithPriority() public méthode

Defines the loading priority, the default is 0 (LoadingPriority.Normal)
public WithPriority ( int priority ) : TaskParameter
priority int Priority.
Résultat TaskParameter