Show / Hide Table of Contents

Class LazyExpando

Expando class for evaluating the internal values on demand.

Inheritance
System.Object
System.Dynamic.DynamicObject
ExpandoBase
Expando
LazyExpando
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.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 LazyExpando : Expando, IExpando, IDynamicMetaObjectProvider, IIndexable

Constructors

| Improve this Doc View Source

LazyExpando(IDictionary<String, Object>, Func<String, Object>)

Initializes a new instance of the LazyExpando class.

Declaration
public LazyExpando(IDictionary<string, object> dictionary, Func<string, object> valueResolver = null)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.String, System.Object> dictionary

The dictionary.

System.Func<System.String, System.Object> valueResolver

The value resolver (optional).

| Improve this Doc View Source

LazyExpando(Func<String, Object>)

Initializes a new instance of the LazyExpando class.

Declaration
public LazyExpando(Func<string, object> valueResolver = null)
Parameters
Type Name Description
System.Func<System.String, System.Object> valueResolver

The value resolver (optional).

Properties

| Improve this Doc View Source

ValueResolver

Gets or sets the value resolver.

Declaration
protected Func<string, object> ValueResolver { get; set; }
Property Value
Type Description
System.Func<System.String, System.Object>

The value resolver.

Methods

| Improve this Doc View Source

HandleCircularDependency(String, out Object)

Handles the circular dependency described by requested key.

Declaration
protected virtual bool HandleCircularDependency(string key, out object value)
Parameters
Type Name Description
System.String key

The key involved in the circular dependency.

System.Object value

The value to return.

Returns
Type Description
System.Boolean

true if a value is found, false otherwise.

| Improve this Doc View Source

TryGetValue(String, out Object)

Attempts to get the dynamic value with the given key.

Declaration
protected override bool TryGetValue(string key, out object value)
Parameters
Type Name Description
System.String key

The key.

System.Object value

The value to get.

Returns
Type Description
System.Boolean

true if a value is found, false otherwise.

Overrides
ExpandoBase.TryGetValue(String, out Object)
Remarks

First of all, it is tried to get a property value from the inner object, if one is set. The next try is to retrieve the property value from the expando object itself. Lastly, if still a property by the provided name cannot be found, the inner dictionary is searched by the provided key.

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