Class JSONDynamicObject
Implements a JSON dynamic object that shapes itself at runtime
Inheritance
System.Object
System.Dynamic.DynamicObject
JSONDynamicObject
Implements
System.Dynamic.IDynamicMetaObjectProvider
Inherited Members
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, 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.TryInvoke(System.Dynamic.InvokeBinder, 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: Azos.Serialization.JSON
Assembly: Azos.dll
Syntax
[Serializable]
public sealed class JSONDynamicObject : DynamicObject, IDynamicMetaObjectProvider
Constructors
JSONDynamicObject(IJSONDataObject)
Declaration
public JSONDynamicObject(IJSONDataObject data)
Parameters
Type | Name | Description |
---|---|---|
IJSONDataObject | data |
JSONDynamicObject(JSONDynamicObjectKind, Boolean)
Creates a dynamic wrapper around existing array or map. Optionally specifies map key case sensitivity
Declaration
public JSONDynamicObject(JSONDynamicObjectKind kind, bool caseSensitiveMap = true)
Parameters
Type | Name | Description |
---|---|---|
JSONDynamicObjectKind | kind | |
System.Boolean | caseSensitiveMap |
Properties
Data
Returns the underlying JSON data
Declaration
public IJSONDataObject Data { get; }
Property Value
Type | Description |
---|---|
IJSONDataObject |
Kind
Declaration
public JSONDynamicObjectKind Kind { get; }
Property Value
Type | Description |
---|---|
JSONDynamicObjectKind |
Methods
GetDynamicMemberNames()
Declaration
public override IEnumerable<string> GetDynamicMemberNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Overrides
System.Dynamic.DynamicObject.GetDynamicMemberNames()
TryConvert(ConvertBinder, out Object)
Declaration
public override bool TryConvert(ConvertBinder binder, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.ConvertBinder | binder | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
TryGetIndex(GetIndexBinder, Object[], out Object)
Declaration
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.GetIndexBinder | binder | |
System.Object[] | indexes | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
TryGetMember(GetMemberBinder, out Object)
Declaration
public override bool TryGetMember(GetMemberBinder binder, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.GetMemberBinder | binder | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TryGetMember(System.Dynamic.GetMemberBinder, System.Object)
TryInvokeMember(InvokeMemberBinder, Object[], out Object)
Declaration
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.InvokeMemberBinder | binder | |
System.Object[] | args | |
System.Object | result |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TryInvokeMember(System.Dynamic.InvokeMemberBinder, System.Object[], System.Object)
TrySetIndex(SetIndexBinder, Object[], Object)
Declaration
public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.SetIndexBinder | binder | |
System.Object[] | indexes | |
System.Object | value |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
TrySetMember(SetMemberBinder, Object)
Declaration
public override bool TrySetMember(SetMemberBinder binder, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.SetMemberBinder | binder | |
System.Object | value |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Dynamic.DynamicObject.TrySetMember(System.Dynamic.SetMemberBinder, System.Object)
Implements
System.Dynamic.IDynamicMetaObjectProvider