Class ConfigurationFieldAttribute
Marks a ConfigurationEditor property as a configuration field, and a class as a configuration field type.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public class ConfigurationFieldAttribute : Attribute
Remarks
Properties marked with this attribute are discovered as fields.
Constructors
View SourceConfigurationFieldAttribute(String)
Initializes a new instance of the ConfigurationField class.
Declaration
public ConfigurationFieldAttribute(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The unique identifier of the field. |
ConfigurationFieldAttribute(Type)
Initializes a new instance of the ConfigurationField class.
Declaration
public ConfigurationFieldAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Properties
View SourceKey
Gets the key of the field.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
When null or empty, the ConfigurationEditor should derive a key from the name of the property marked with this attribute.
Type
Gets or sets the type of the field.
Declaration
public Type? Type { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Type> |
Remarks
By default, fields are created as ConfigurationField instances, unless specified otherwise through this property.
The specified type must inherit from ConfigurationField.