C# Class 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.
Inheritance: SelectListDataType
Afficher le fichier Open project: DanMannMann/UmbracoCodeFirst

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Method Details

Initialise() public méthode

Initialises the current instance from a string containing a single value
public Initialise ( string value ) : void
value string The serialised value
Résultat void

Serialise() public méthode

Serialises the current instance to a string containing the selected value
public Serialise ( ) : string
Résultat string

SetInvalidValue() protected méthode

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
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string