Show / Hide Table of Contents

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
System.Object
System.Dynamic.DynamicObject
ExpandoBase
Expando
AmbientServices
AppArgs
AppRuntimeBase
FeatureRef
AppInfo
FeatureInfo
BehaviorValue<TValue>
CompositionSettings
ExportMetadataBase
Configuration<TSettings>
DefaultConfigurationStore
EntityEntry
DataCommandResult
DataConversionResult
EntityBase
LazyExpando
GraphEdge
GraphNode
Localization
MessageMatch
NamedElementBase<TModelContract>
OperationResult
PluginInfo
DynamicElementInfo
RuntimeAssemblyInfo
RuntimeFieldInfo
RuntimeMethodInfo
RuntimeParameterInfo
RuntimePropertyInfo
RuntimeTypeInfo
Script
ScriptGlobals
JsonExpando
Context
AppServiceInfo
ThreadContext
RuntimeActivityParameterInfo
Implements
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
Inherited Members
ExpandoBase.Item[String]
ExpandoBase.GetDynamicMemberNames()
ExpandoBase.HasDynamicMember(String)
ExpandoBase.TryGetMember(GetMemberBinder, Object)
ExpandoBase.TrySetMember(SetMemberBinder, Object)
ExpandoBase.TryInvokeMember(InvokeMemberBinder, Object[], Object)
ExpandoBase.ToDictionary(Func<String, String>, Func<Object, Object>)
ExpandoBase.GetInnerObjectTypeInfo()
ExpandoBase.GetThisTypeInfo()
ExpandoBase.TryGetValue(String, Object)
ExpandoBase.TrySetValue(String, Object)
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryInvoke(System.Dynamic.InvokeBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Dynamic
Assembly: Kephas.Core.dll
Syntax
public class Expando : ExpandoBase, IExpando, IDynamicMetaObjectProvider, IIndexable

Constructors

| Improve this Doc View Source

Expando()

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()
| Improve this Doc View Source

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

true if this object is thread safe when working with the internal dictionary, false otherwise.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

true if this object is thread safe when working with the internal dictionary, false otherwise.

Remarks

You can pass in null here if you don't want to check native properties and only check the Dictionary!.

Implements

IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
ExpandoExtensions.Merge<T>(T, Object)
ExpandoExtensions.GetLaxValue<T>(IIndexable, String, T)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX