Class Expando
Class that provides extensible properties and methods. This dynamic object stores 'extra' properties in a dictionary or checks the actual properties of the instance. This means you can subclass this expando and retrieve either native properties or properties from values in the dictionary.
This type allows you three ways to access its properties:
- Directlyany explicitly declared properties are accessible
- Dynamicdynamic cast allows access to dictionary and native properties/methods
- DictionaryAny of the extended properties are accessible via IDictionary interface
Inheritance
Inherited Members
Namespace: Kephas.Dynamic
Assembly: Kephas.Core.dll
Syntax
public class Expando : ExpandoBase, IExpando, IDynamicMetaObjectProvider, IIndexable
Constructors
| Improve this Doc View SourceExpando()
Initializes a new instance of the Expando class. This constructor just works off the internal dictionary and any public properties of this object.
Declaration
public Expando()
Expando(Boolean)
Initializes a new instance of the Expando class. This constructor just works off the internal dictionary and any public properties of this object.
Declaration
public Expando(bool isThreadSafe)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isThreadSafe |
|
Expando(IDictionary<String, Object>)
Initializes a new instance of the Expando class. This constructor just works off the internal dictionary and any public properties of this object.
Declaration
public Expando(IDictionary<string, object> dictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | dictionary | The properties. |
Expando(Object, Boolean)
Initializes a new instance of the Expando class. Allows passing in an existing instance variable to 'extend'.
Declaration
public Expando(object innerObject, bool isThreadSafe = false)
Parameters
Type | Name | Description |
---|---|---|
System.Object | innerObject | The instance to be extended. |
System.Boolean | isThreadSafe |
|
Remarks
You can pass in null here if you don't want to check native properties and only check the Dictionary!.