C# Класс Archetype.PropertyEditors.ArchetypePropertyEditor.ArchetypePropertyValueEditor

Class that represents the actual data editor. This is often done with a package manifest instead.
Наследование: Umbraco.Web.PropertyEditors.PropertyValueEditorWrapper
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_jsonSettings Newtonsoft.Json.JsonSerializerSettings

Открытые методы

Метод Описание
ArchetypePropertyValueEditor ( Umbraco.Core.PropertyEditors.PropertyValueEditor wrapped ) : System
ConvertDbToEditor ( Property property, PropertyType propertyType, IDataTypeService dataTypeService ) : object

A method used to format the database value to a value that can be used by the editor

The object returned will automatically be serialized into json notation. For most property editors the value returned is probably just a string but in some cases a json structure will be returned.

ConvertDbToString ( Property property, PropertyType propertyType, IDataTypeService dataTypeService ) : string

Converts the property value for use in the front-end cache

ConvertEditorToDb ( Umbraco.Core.Models.Editors.ContentPropertyData editorValue, object currentValue ) : object

A method to deserialize the string value that has been saved in the content editor to an object to be stored in the database.

By default this will attempt to automatically convert the string value to the value type supplied by ValueType. If overridden then the object returned must match the type supplied in the ValueType, otherwise persisting the value to the DB will fail when it tries to validate the value type.

Приватные методы

Метод Описание
EnsureUtcDate ( System.DateTime dateTime ) : DateTime?

Ensures that a datetime is in UTC

GetPropertyEditor ( IDataTypeDefinition dtd ) : Umbraco.Core.PropertyEditors.PropertyEditor

Gets the property editor.

Описание методов

ArchetypePropertyValueEditor() публичный Метод

public ArchetypePropertyValueEditor ( Umbraco.Core.PropertyEditors.PropertyValueEditor wrapped ) : System
wrapped Umbraco.Core.PropertyEditors.PropertyValueEditor
Результат System

ConvertDbToEditor() публичный Метод

A method used to format the database value to a value that can be used by the editor
The object returned will automatically be serialized into json notation. For most property editors the value returned is probably just a string but in some cases a json structure will be returned.
public ConvertDbToEditor ( Property property, PropertyType propertyType, IDataTypeService dataTypeService ) : object
property Property
propertyType PropertyType
dataTypeService IDataTypeService
Результат object

ConvertDbToString() публичный Метод

Converts the property value for use in the front-end cache
public ConvertDbToString ( Property property, PropertyType propertyType, IDataTypeService dataTypeService ) : string
property Property
propertyType PropertyType
dataTypeService IDataTypeService
Результат string

ConvertEditorToDb() публичный Метод

A method to deserialize the string value that has been saved in the content editor to an object to be stored in the database.
By default this will attempt to automatically convert the string value to the value type supplied by ValueType. If overridden then the object returned must match the type supplied in the ValueType, otherwise persisting the value to the DB will fail when it tries to validate the value type.
public ConvertEditorToDb ( Umbraco.Core.Models.Editors.ContentPropertyData editorValue, object currentValue ) : object
editorValue Umbraco.Core.Models.Editors.ContentPropertyData
currentValue object The current value that has been persisted to the database for this editor. This value may be usesful for /// how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used.
Результат object

Описание свойств

_jsonSettings защищенное свойство

protected JsonSerializerSettings,Newtonsoft.Json _jsonSettings
Результат Newtonsoft.Json.JsonSerializerSettings