EnvironmentTagHelper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ITagHelper implementation targeting <environment> elements that conditionally renders content based on the current value of EnvironmentName. If the environment is not listed in the specified Names or Include, or if it is in Exclude, the content will not be rendered.
public ref class EnvironmentTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
public class EnvironmentTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type EnvironmentTagHelper = class
inherit TagHelper
Public Class EnvironmentTagHelper
Inherits TagHelper
- Inheritance
Constructors
EnvironmentTagHelper(IHostingEnvironment) |
Creates a new EnvironmentTagHelper. |
EnvironmentTagHelper(IWebHostEnvironment) |
Creates a new EnvironmentTagHelper. |
Properties
Exclude |
A comma separated list of environment names in which the content will not be rendered. |
HostingEnvironment |
Gets the IWebHostEnvironment for the application. |
Include |
A comma separated list of environment names in which the content should be rendered. If the current environment is also in the Exclude list, the content will not be rendered. |
Names |
A comma separated list of environment names in which the content should be rendered. If the current environment is also in the Exclude list, the content will not be rendered. |
Order |
When a set of ITagHelpers are executed, their Init(TagHelperContext)'s are first invoked in the specified Order; then their ProcessAsync(TagHelperContext, TagHelperOutput)'s are invoked in the specified Order. Lower values are executed first. |
Methods
Init(TagHelperContext) |
Initializes the ITagHelper with the given |
Process(TagHelperContext, TagHelperOutput) |
Synchronously executes the TagHelper with the given |
ProcessAsync(TagHelperContext, TagHelperOutput) |
Asynchronously executes the TagHelper with the given |