C# Класс 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)
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

Метод Описание
UpdateValue ( object value, bool notify ) : void

Updates the value represented by the expression.

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

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

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.
Результат System

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

Gets the current value of the expression.
public GetValue ( ) : object
Результат object

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void