Property | Type | Description | |
---|---|---|---|
Properties | PropertyBag |
Property | Type | Description |
---|
Method | Description | |
---|---|---|
Contains ( object>.KeyValuePair |
Checks whether a property exists in the Property collection or as a property on the instance
|
|
Expando ( ) : System |
This constructor just works off the internal dictionary and any public properties of this object. Note you can subclass Expando.
|
|
Expando ( object>.IDictionary |
Create an Expando from a dictionary
|
|
Expando ( object instance ) : System |
Allows passing in an existing instance variable to 'extend'. You can pass in null here if you don't want to check native properties and only check the Dictionary! |
|
GetDynamicMemberNames ( ) : IEnumerable |
Return both instance and dynamic names. Important to return both so JSON serialization with Json.NET works.
|
|
GetProperties ( bool includeInstanceProperties = false ) : object>>.IEnumerable |
Returns and the properties of
|
|
TryGetMember ( |
Try to retrieve a member by name first from instance properties followed by the collection entries.
|
|
TryInvokeMember ( |
Dynamic invocation method. Currently allows only for Reflection based operation (no ability to add methods dynamically).
|
|
TrySetMember ( |
Property setter implementation tries to retrieve value from instance first then into this object
|
|
this ( string key ) : object |
Convenience method that provides a string Indexer to the Properties collection AND the strongly typed properties of the object by name. // dynamic exp["Address"] = "112 nowhere lane"; // strong var name = exp["StronglyTypedProperty"] as string; The getter checks the Properties dictionary first then looks in PropertyInfo for properties. The setter checks the instance properties before checking the Properties dictionary. |
Method | Description | |
---|---|---|
GetProperty ( object instance, string name, object &result ) : bool |
Reflection Helper method to retrieve a property
|
|
Initialize ( object instance ) : void | ||
InvokeMethod ( object instance, string name, object args, object &result ) : bool |
Reflection helper method to invoke a method
|
|
SetProperty ( object instance, string name, object value ) : bool |
Reflection helper method to set a property value
|
public Contains ( object>.KeyValuePair |
||
item | object>.KeyValuePair | |
includeInstanceProperties | bool | |
return | bool |
public Expando ( object>.IDictionary |
||
dict | object>.IDictionary | |
return | System |
public GetDynamicMemberNames ( ) : IEnumerable |
||
return | IEnumerable |
public GetProperties ( bool includeInstanceProperties = false ) : object>>.IEnumerable |
||
includeInstanceProperties | bool | |
return | object>>.IEnumerable |
protected GetProperty ( object instance, string name, object &result ) : bool | ||
instance | object | |
name | string | |
result | object | |
return | bool |
protected Initialize ( object instance ) : void | ||
instance | object | |
return | void |
protected InvokeMethod ( object instance, string name, object args, object &result ) : bool | ||
instance | object | |
name | string | |
args | object | |
result | object | |
return | bool |
protected SetProperty ( object instance, string name, object value ) : bool | ||
instance | object | |
name | string | |
value | object | |
return | bool |
public TryGetMember ( |
||
binder | ||
result | object | |
return | bool |
public TryInvokeMember ( |
||
binder | ||
args | object | |
result | object | |
return | bool |
public TrySetMember ( |
||
binder | ||
value | object | |
return | bool |