Class AdaptiveImageBlockController
Used to provide default rendering of adaptive images in site templates, e.g. when using PropertyFor.
Inheritance
AsyncPartialContentComponent<AdaptiveImage>
AsyncBlockComponent<AdaptiveImage>
AdaptiveImageBlockController
Inherited Members
AsyncPartialContentComponent<AdaptiveImage>.InvokeAsync(AdaptiveImage)
Namespace: AdaptiveImages.Controllers
Assembly: AdaptiveImages.dll
Syntax
[TemplateDescriptor(Inherited = true)]
public class AdaptiveImageBlockController : AsyncBlockComponent<AdaptiveImage>, IRenderTemplate<AdaptiveImage>, IRenderTemplate
Constructors
AdaptiveImageBlockController()
Creates an instance and initializes required dependencies.
Declaration
public AdaptiveImageBlockController()
Methods
InvokeComponentAsync(AdaptiveImage)
Renders markup, i.e. <picture> element, for an adaptive image.
Declaration
protected override Task<IViewComponentResult> InvokeComponentAsync(AdaptiveImage currentContent)
Parameters
Type | Name | Description |
---|---|---|
AdaptiveImage | currentContent | The block representing an AdaptiveImage property. |
Returns
Type | Description |
---|---|
Task<IViewComponentResult> |
Overrides
Implements
EPiServer.Web.IRenderTemplate<TModel>
EPiServer.Web.IRenderTemplate