Class ScriptCdnTagHelper
CdnTagHelper implementation targeting <script> elements that supports ICacheBusting versioning. This class cannot be inherited. Implements the CdnTagHelper
Inheritance
System.Object
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
ScriptCdnTagHelper
Implements
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent
Inherited Members
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext)
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Order
Namespace: Cuemon.AspNetCore.Razor.TagHelpers
Assembly: Cuemon.AspNetCore.Razor.TagHelpers.dll
Syntax
[HtmlTargetElement("cdn-script")]
public sealed class ScriptCdnTagHelper : CdnTagHelper, ITagHelper, ITagHelperComponent, IConfigurable<CdnTagHelperOptions>
Constructors
| Improve this DocScriptCdnTagHelper(IOptions<CdnTagHelperOptions>, ICacheBusting)
Initializes a new instance of the ScriptCdnTagHelper class.
Declaration
public ScriptCdnTagHelper(IOptions<CdnTagHelperOptions> setup, ICacheBusting cacheBusting = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<CdnTagHelperOptions> | setup | The CdnTagHelperOptions which need to be configured. |
ICacheBusting | cacheBusting | An optional object implementing the ICacheBusting interface. |
Properties
| Improve this DocDefer
Gets or sets a value indicating whether the script is executed when the page has finished parsing.
Declaration
public bool Defer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Src
Gets or sets the source of the script.
Declaration
public string Src { get; set; }
Property Value
Type | Description |
---|---|
System.String | The source of the script. |
Methods
| Improve this DocProcessAsync(TagHelperContext, TagHelperOutput)
Declaration
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext | context | |
Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput | output |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)
Implements
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent