Expando Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

Base class for objects with both static and dynamic properties.

public abstract class Expando : DynamicObject, IExpando, IDynamicMetaObjectProvider, IEnumerable<KeyValuePair<string, object>>, IEnumerable, ICloneable
Inheritance:
System.Object → Expando
Implements:
IExpando

Constructors

Expando()

Properties

Property[String] Gets or sets the value of the property with the specified name.

Methods

Clone() Create a deep copy of the current object.
GetDynamicMemberNames() Returns the enumeration of all dynamic member names.
GetEnumerator() Returns an enumerator that iterates over the dynamic properties.
IExpando.get_Item(string)
IExpando.set_Item(string, object)
TryGetMember(GetMemberBinder, out Object) If you try to get a value of a property not defined in the class, this method is called.
TrySetMember(SetMemberBinder, object) If you try to set a value of a property that is not defined in the class, this method is called.
Value(string) Gets the value of the specified property, or the default value for T if the property does not exist.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.