C# Класс Felinesoft.UmbracoCodeFirst.DataTypes.SingleSelectDataType

A base class for data types which select a single value from a list of prevalues
This works with editors which store the actual string value as the property value. Editors which store the prevalue ID are not supported and in this case one should override Serialise and Initialise in a derived class to get the actual value based on the ID.
Наследование: SelectListDataType
Показать файл Открыть проект

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

Метод Описание
Initialise ( string value ) : void

Initialises the current instance from a string containing a single value

Serialise ( ) : string

Serialises the current instance to a string containing the selected value

ToString ( ) : string

Защищенные методы

Метод Описание
SetInvalidValue ( string value ) : void

Allows an invalid value to be explicitly set, bypassing the protection in the SelectedValue property setter.

This is equivalent to calling the base implementation of Initialise but, as Initialise is virtual, this method should be preferred as it guarantees the correct behaviour in derived types

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

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

Initialises the current instance from a string containing a single value
public Initialise ( string value ) : void
value string The serialised value
Результат void

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

Serialises the current instance to a string containing the selected value
public Serialise ( ) : string
Результат string

SetInvalidValue() защищенный Метод

Allows an invalid value to be explicitly set, bypassing the protection in the SelectedValue property setter.
This is equivalent to calling the base implementation of Initialise but, as Initialise is virtual, this method should be preferred as it guarantees the correct behaviour in derived types
protected SetInvalidValue ( string value ) : void
value string The value to set
Результат void

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

public ToString ( ) : string
Результат string