Class ImageResult
An Microsoft.AspNetCore.Mvc.IActionResult implementation that returns an image file as response, optionally resized and cached for a client.
Inheritance
object
ImageResult
Implements
IActionResult
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DataWeb.ActionResults
Assembly: DataWeb.Core.dll
Syntax
public class ImageResult : IActionResult
Constructors
ImageResult(IImageService, File, int, int, ResizeMode, bool)
Declaration
public ImageResult(IImageService imageService, File file, int width, int height, ResizeMode resizeMode, bool isClientCache = true)
Parameters
Type | Name | Description |
---|---|---|
IImageService | imageService | |
File | file | |
int | width | |
int | height | |
ResizeMode | resizeMode | |
bool | isClientCache |
Methods
ExecuteResultAsync(ActionContext)
Generates the HTTP response with the image data.
Declaration
public Task ExecuteResultAsync(ActionContext context)
Parameters
Type | Name | Description |
---|---|---|
ActionContext | context | The Microsoft.AspNetCore.Mvc.ActionContext for the current request. |
Returns
Type | Description |
---|---|
Task | A System.Threading.Tasks.Task that completes when the result has been executed. |
Implements
Microsoft.AspNetCore.Mvc.IActionResult