C# Class AmazedSaint.Elastic.Lib.ElasticObject

See http://amazedsaint.blogspot.com/2010/02/introducing-elasticobject-for-net-40.html for details
Inheritance: System.Dynamic.DynamicObject, IElasticHierarchyWrapper, INotifyPropertyChanged
显示文件 Open project: amazedsaint/ElasticObject Class Usage Examples

Public Methods

Method Description
AddAttribute ( string key, ElasticObject value ) : void
AddElement ( ElasticObject element ) : void
Attribute ( string name ) : ElasticObject
ElasticObject ( ) : System
ElasticObject ( string name ) : System
Element ( string name ) : ElasticObject
GetAttributeValue ( string name ) : object
HasAttribute ( string name ) : bool
RemoveAttribute ( string key ) : void
RemoveElement ( ElasticObject element ) : void
SetAttributeValue ( string name, object obj ) : void
TryBinaryOperation ( BinaryOperationBinder binder, object arg, object &result ) : bool

Interpret the invocation of a binary operation

TryGetIndex ( GetIndexBinder binder, object indexes, object &result ) : bool

Handle the indexer operations

TryGetMember ( GetMemberBinder binder, object &result ) : bool

Catch a get member invocation

TryInvokeMember ( System binder, object args, object &result ) : bool

Interpret a method call

TrySetMember ( SetMemberBinder binder, object value ) : bool

Catch a set member invocation

TryUnaryOperation ( UnaryOperationBinder binder, object &result ) : bool

Try the unary operation.

Private Methods

Method Description
AddAttribute ( string memberName, object value ) : void
CreateOrGetAttribute ( string memberName, object value ) : ElasticObject

Add a member to this element, with the specified value

ElasticObject ( string name, object value ) : System
OnPropertyChanged ( string prop ) : void

Method Details

AddAttribute() public method

public AddAttribute ( string key, ElasticObject value ) : void
key string
value ElasticObject
return void

AddElement() public method

public AddElement ( ElasticObject element ) : void
element ElasticObject
return void

Attribute() public method

public Attribute ( string name ) : ElasticObject
name string
return ElasticObject

ElasticObject() public method

public ElasticObject ( ) : System
return System

ElasticObject() public method

public ElasticObject ( string name ) : System
name string
return System

Element() public method

public Element ( string name ) : ElasticObject
name string
return ElasticObject

GetAttributeValue() public method

public GetAttributeValue ( string name ) : object
name string
return object

HasAttribute() public method

public HasAttribute ( string name ) : bool
name string
return bool

RemoveAttribute() public method

public RemoveAttribute ( string key ) : void
key string
return void

RemoveElement() public method

public RemoveElement ( ElasticObject element ) : void
element ElasticObject
return void

SetAttributeValue() public method

public SetAttributeValue ( string name, object obj ) : void
name string
obj object
return void

TryBinaryOperation() public method

Interpret the invocation of a binary operation
public TryBinaryOperation ( BinaryOperationBinder binder, object arg, object &result ) : bool
binder System.Dynamic.BinaryOperationBinder
arg object
result object
return bool

TryGetIndex() public method

Handle the indexer operations
public TryGetIndex ( GetIndexBinder binder, object indexes, object &result ) : bool
binder System.Dynamic.GetIndexBinder
indexes object
result object
return bool

TryGetMember() public method

Catch a get member invocation
public TryGetMember ( GetMemberBinder binder, object &result ) : bool
binder System.Dynamic.GetMemberBinder
result object
return bool

TryInvokeMember() public method

Interpret a method call
public TryInvokeMember ( System binder, object args, object &result ) : bool
binder System
args object
result object
return bool

TrySetMember() public method

Catch a set member invocation
public TrySetMember ( SetMemberBinder binder, object value ) : bool
binder System.Dynamic.SetMemberBinder
value object
return bool

TryUnaryOperation() public method

Try the unary operation.
public TryUnaryOperation ( UnaryOperationBinder binder, object &result ) : bool
binder System.Dynamic.UnaryOperationBinder
result object
return bool