View Source
Class ConfigurationEditor
Represents a data type configuration editor.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
[DataContract]
public class ConfigurationEditor : IConfigurationEditor
Constructors
View Source
ConfigurationEditor()
Declaration
public ConfigurationEditor()
View Source
ConfigurationEditor(List<ConfigurationField>)
Declaration
protected ConfigurationEditor(List<ConfigurationField> fields)
Parameters
Properties
View Source
DefaultConfiguration
Gets the default configuration.
Declaration
[DataMember(Name = "defaultConfig")]
public virtual IDictionary<string, object> DefaultConfiguration { get; set; }
Property Value
Type |
Description |
IDictionary<System.String, System.Object> |
|
View Source
DefaultConfigurationObject
Gets the default configuration object.
Declaration
public virtual object DefaultConfigurationObject { get; }
Property Value
Type |
Description |
System.Object |
|
View Source
Fields
Declaration
[DataMember(Name = "fields")]
public List<ConfigurationField> Fields { get; }
Property Value
Methods
View Source
ConfigurationAs<TConfiguration>(Object)
Gets the configuration as a typed object.
Declaration
public static TConfiguration ConfigurationAs<TConfiguration>(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
TConfiguration |
|
Type Parameters
Name |
Description |
TConfiguration |
|
View Source
Field(String)
Gets a field by its property name.
Declaration
protected ConfigurationField Field(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
View Source
FromConfigurationEditor(Nullable<IDictionary<String, Object>>, Object)
Converts the values posted by the configuration editor into the actual configuration object.
Declaration
public virtual object FromConfigurationEditor(IDictionary<string, object>? editorValues, object configuration)
Parameters
Type |
Name |
Description |
System.Nullable<IDictionary<System.String, System.Object>> |
editorValues |
The values posted by the configuration editor.
|
System.Object |
configuration |
The current configuration object.
|
Returns
Type |
Description |
System.Object |
|
View Source
FromDatabase(String, IConfigurationEditorJsonSerializer)
Converts the serialized database value into the actual configuration object.
Declaration
public virtual object FromDatabase(string configurationJson, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Returns
Type |
Description |
System.Object |
|
View Source
IsConfiguration(Object)
Determines whether a configuration object is of the type expected by the configuration editor.
Declaration
public virtual bool IsConfiguration(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ToConfigurationEditor(Object)
Converts the configuration object to values for the configuration editor.
Declaration
public virtual IDictionary<string, object> ToConfigurationEditor(object configuration)
Parameters
Type |
Name |
Description |
System.Object |
configuration |
The configuration.
|
Returns
Type |
Description |
IDictionary<System.String, System.Object> |
|
View Source
ToDatabase(Object, IConfigurationEditorJsonSerializer)
Converts a configuration object into a serialized database value.
Declaration
public static string ToDatabase(object configuration, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
ToValueEditor(Object)
Declaration
public virtual IDictionary<string, object> ToValueEditor(object configuration)
Parameters
Type |
Name |
Description |
System.Object |
configuration |
|
Returns
Type |
Description |
IDictionary<System.String, System.Object> |
|