Class ImageProvider
Image provider used for implementing extensible provider model. It will be used to persist and retrieve images. One existing provider distributed with ECF is FileImageProvider which uses file system to store images.
Namespace: Mediachase.Commerce.Engine.Images
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public abstract class ImageProvider : ProviderBase
Constructors
ImageProvider()
Declaration
protected ImageProvider()
Properties
ApplicationName
Gets or sets the name of the application.
Declaration
public abstract string ApplicationName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The name of the application. |
Methods
Exists(String)
Returns true if image with specified name already exists.
Declaration
public abstract bool Exists(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
RemoveImage(String)
Removes the image by name.
Declaration
public abstract void RemoveImage(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
RetrieveImage(String)
Retrieves the image object.
Declaration
public abstract Image RetrieveImage(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Image |
RetrieveImageUrl(String)
Retrieves the image URL.
Declaration
public abstract string RetrieveImageUrl(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
Returns
| Type | Description |
|---|---|
| System.String |
RetrieveThumbnailImageUrl(String)
Retrieves the thumbnail image URL.
Declaration
public abstract string RetrieveThumbnailImageUrl(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
Returns
| Type | Description |
|---|---|
| System.String |
SaveImage(String, Byte[])
Saves the image.
Declaration
public abstract void SaveImage(string name, byte[] image)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Byte[] | image | The image. |
SaveImage(String, Byte[], ImageFormat)
Saves the image.
Declaration
public abstract void SaveImage(string name, byte[] image, ImageFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Byte[] | image | The image. |
| System.Drawing.Imaging.ImageFormat | format | Image format. |
SaveImage(String, Byte[], String)
Saves the image.
Declaration
public abstract void SaveImage(string name, byte[] image, string contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Byte[] | image | The image. |
| System.String | contentType | Type of the content. |
SaveImage(String, Image)
Saves the image.
Declaration
public abstract void SaveImage(string name, Image image)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Drawing.Image | image | The image. |
SaveImage(String, Image, ImageFormat)
Saves the image.
Declaration
public abstract void SaveImage(string name, Image image, ImageFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Drawing.Image | image | The image. |
| System.Drawing.Imaging.ImageFormat | format | Image format. |
SaveImage(String, Image, String)
Saves the image.
Declaration
public abstract void SaveImage(string name, Image image, string contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| System.Drawing.Image | image | The image. |
| System.String | contentType | Type of the content. |