C# Class Sharpen.Html.Expression

Represents the base class for all expressions. Expressions represent a value, and optionally a value that can change after being read (in which case, it provides a mechanism to subscribe for changes)
Afficher le fichier Open project: nikhilk/sharpen Class Usage Examples

Méthodes publiques

Méthode Description
Expression ( object value, bool canChange ) : System

Initializes and instance of an Expression.

GetValue ( ) : object

Gets the current value of the expression.

SetValue ( object value ) : void

Sets the value of the expression. Most expressions are read-only and ignore this call, but some expressions do support the ability to write back.

Subscribe ( System.Action changeCallback ) : void

Allows a consumer of the expression to subscribe to change notifications.

Méthodes protégées

Méthode Description
UpdateValue ( object value, bool notify ) : void

Updates the value represented by the expression.

Method Details

Expression() public méthode

Initializes and instance of an Expression.
public Expression ( object value, bool canChange ) : System
value object The initial value of the expression.
canChange bool Whether the expression represents a value that can change.
Résultat System

GetValue() public méthode

Gets the current value of the expression.
public GetValue ( ) : object
Résultat object

SetValue() public méthode

Sets the value of the expression. Most expressions are read-only and ignore this call, but some expressions do support the ability to write back.
public SetValue ( object value ) : void
value object The new value of the expression.
Résultat void

Subscribe() public méthode

Allows a consumer of the expression to subscribe to change notifications.
public Subscribe ( System.Action changeCallback ) : void
changeCallback System.Action The callback to be invoked.
Résultat void

UpdateValue() protected méthode

Updates the value represented by the expression.
protected UpdateValue ( object value, bool notify ) : void
value object The new value of the expression.
notify bool Whether to notify the subscriber of the change.
Résultat void