RequiresFeatureAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
An attribute that can be placed on targets to toggle them at runtime based features. Use FeatureBarrierAttribute for MVC controllers, controller actions, or Razor pages.
[AttributeUsage(AttributeTargets.All)]
public class RequiresFeatureAttribute : Attribute
Public Members
| name | description |
|---|---|
| RequiresFeatureAttribute(…) | Creates an attribute that can be used to toggle targets. The toggle can be configured to require all or any of the provided feature(s) to pass. (2 constructors) |
| Features { get; } | The name of the features that the feature attribute will activate for. |
| RequireAny { get; set; } | Controls whether any (true) or all (false, default) features in Features should be enabled to pass. |
See Also
- Source: RequiresFeatureAttribute.cs