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)
파일 보기 프로젝트 열기: nikhilk/sharpen 1 사용 예제들

공개 메소드들

메소드 설명
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