Class ImageProviderFactory
Used to manage add or remove image providers for sourcing original images
Inheritance
ImageProviderFactory
Assembly: AdaptiveImages.dll
Syntax
public sealed class ImageProviderFactory
Properties
Instance
Gets the instance used to add or remove image providers
Declaration
public static ImageProviderFactory Instance { get; }
Property Value
this[string]
Gets a registered image provider by name.
Declaration
public IImageProvider this[string providerName] { get; }
Parameters
Type |
Name |
Description |
string |
providerName |
|
Property Value
Resolver
Gets or sets how an image provider is resolved from a specified provider name, if different from the default implementation
Declaration
public Func<string, IImageProvider?> Resolver { get; set; }
Property Value
Methods
Clear()
Removes all registered image providers
Declaration
Contains(string)
Checks if an image provider with the specified name has been registered.
Declaration
public bool Contains(string providerName)
Parameters
Type |
Name |
Description |
string |
providerName |
|
Returns
DefaultResolver(string)
Returns the image provider with the specified name
Declaration
public static IImageProvider? DefaultResolver(string providerName)
Parameters
Type |
Name |
Description |
string |
providerName |
|
Returns
List()
Lists all registered image providers
Declaration
public IEnumerable<IImageProvider> List()
Returns
Register(IImageProvider)
Adds a new image provider
Declaration
public void Register(IImageProvider provider)
Parameters
Exceptions
Remove(string)
Removes the specified provider if it exists, otherwise the action is ignored
Declaration
public void Remove(string providerName)
Parameters
Type |
Name |
Description |
string |
providerName |
|
Resolve(string)
Gets a specific provider if available, otherwise null is returned
Declaration
public IImageProvider? Resolve(string providerName)
Parameters
Type |
Name |
Description |
string |
providerName |
|
Returns
Extension Methods