FeatureTagHelper Class

Definition

Provides a <feature> tag that can be used to conditionally render content based on a feature's state.

public class FeatureTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
type FeatureTagHelper = class
    inherit TagHelper
Public Class FeatureTagHelper
Inherits TagHelper
Inheritance
FeatureTagHelper

Constructors

FeatureTagHelper(IFeatureManagerSnapshot)

Creates a feature tag helper.

Properties

Name

A feature name, or comma separated list of feature names, for which the content should be rendered. By default, all specified features must be enabled to render the content, but this requirement can be controlled by the Requirement property.

Negate

Negates the evaluation for whether or not a feature tag should display content. This is used to display alternate content when a feature or set of features are disabled.

Requirement

Controls whether 'All' or 'Any' feature in a list of features should be enabled to render the content within the feature tag.

Methods

ProcessAsync(TagHelperContext, TagHelperOutput)

Processes the tag helper context to evaluate if the feature's content should be rendered.

Applies to