public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) { if (indexes.Length == 1) { var index = new Index(indexes[0]); if (IsIndexExisting(Node, index)) { result = new DynamicIndexedNode(Node, index); return(true); } } result = null; return(false); }
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) { var targetNode = GetTargetNode(); if (indexes.Length == 1 && targetNode != null) { var nextIndex = new Index(indexes[0]); if (IsIndexExisting(targetNode, nextIndex)) { result = new DynamicIndexedNode(targetNode, nextIndex); return(true); } } result = null; return(false); }