ImageTagHelper Class¶
Summary¶
@!:ITagHelper- implementation targeting <img> elements that supports file versioning.
Constructors¶
-
ImageTagHelper
(IHostingEnvironment, IMemoryCache)¶ Creates a new [Microsoft.AspNet.Mvc.TagHelpers.ImageTagHelper](Microsoft.AspNet.Mvc.TagHelpers.ImageTagHelper.yml).
Arguments: - hostingEnvironment (IHostingEnvironment) – The @!:IHostingEnvironment-.
- cache (IMemoryCache) – The @!:IMemoryCache-.
public ImageTagHelper(IHostingEnvironment hostingEnvironment, IMemoryCache cache)
-
Properties¶
-
AppendVersion
()¶ Value indicating if file version should be appended to the src urls.
Return type: System.Boolean public bool AppendVersion { get; set; }
-
Cache
()¶ Return type: IMemoryCache protected IMemoryCache Cache { get; }
-
HostingEnvironment
()¶ Return type: IHostingEnvironment protected IHostingEnvironment HostingEnvironment { get; }
-
Src
()¶ Source of the image.
Return type: System.String public string Src { get; set; }
-
ViewContext
()¶ Return type: Microsoft.AspNet.Mvc.ViewContext public ViewContext ViewContext { get; set; }
-