Class FeatureDefinition
Inheritance
System.Object
FeatureDefinition
Assembly: Volo.Abp.Features.dll
Syntax
public class FeatureDefinition : object
Constructors
FeatureDefinition(String, String, ILocalizableString, ILocalizableString, IStringValueType, Boolean)
Declaration
public FeatureDefinition(string name, string defaultValue = null, ILocalizableString displayName = null, ILocalizableString description = null, IStringValueType valueType = null, bool isVisibleToClients = true)
Parameters
Properties
AllowedProviders
A list of allowed providers to get/set value of this feature.
An empty list indicates that all providers are allowed.
Declaration
public List<string> AllowedProviders { get; }
Property Value
Type |
Description |
List<System.String> |
|
Children
Declaration
public IReadOnlyList<FeatureDefinition> Children { get; }
Property Value
DefaultValue
Default value of the feature.
Declaration
public string DefaultValue { get; set; }
Property Value
Type |
Description |
System.String |
|
Description
Declaration
public ILocalizableString Description { get; set; }
Property Value
DisplayName
Declaration
public ILocalizableString DisplayName { get; set; }
Property Value
IsVisibleToClients
Can clients see this feature and it's value.
Default: true.
Declaration
public bool IsVisibleToClients { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Item[String]
Declaration
public object this[string name] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
name |
Name of the property
|
Property Value
Type |
Description |
System.Object |
Returns the value in the Properties dictionary by given .
Returns null if given is not present in the Properties dictionary.
|
Name
Unique name of the feature.
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Parent
Parent of this feature, if one exists.
If set, this feature can be enabled only if the parent is enabled.
Declaration
public FeatureDefinition Parent { get; }
Property Value
Properties
Can be used to get/set custom properties for this feature.
Declaration
public Dictionary<string, object> Properties { get; }
Property Value
Type |
Description |
Dictionary<System.String, System.Object> |
|
ValueType
Input type.
This can be used to prepare an input for changing this feature's value.
Default: ToggleStringValueType.
Declaration
public IStringValueType ValueType { get; set; }
Property Value
Methods
CreateChild(String, String, ILocalizableString, ILocalizableString, IStringValueType, Boolean)
Declaration
public FeatureDefinition CreateChild(string name, string defaultValue = null, ILocalizableString displayName = null, ILocalizableString description = null, IStringValueType valueType = null, bool isVisibleToClients = true)
Parameters
Returns
RemoveChild(String)
Declaration
public void RemoveChild(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
WithProperty(String, Object)
Sets a property in the Properties dictionary.
This is a shortcut for nested calls on this object.
Declaration
public virtual FeatureDefinition WithProperty(string key, object value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Object |
value |
|
Returns
WithProviders(String[])
Sets a property in the Properties dictionary.
This is a shortcut for nested calls on this object.
Declaration
public virtual FeatureDefinition WithProviders(params string[] providers)
Parameters
Type |
Name |
Description |
System.String[] |
providers |
|
Returns
Extension Methods