示例#1
0
        private bool TryGet(string name, out object result)
        {
            if (!BlittableJsonReaderObject.TryGetMember(name, out result))
            {
                return(false);
            }

            if (result is BlittableJsonReaderObject)
            {
                result = new DynamicBlittableJson((BlittableJsonReaderObject)result);
            }
            else if (result is BlittableJsonReaderArray)
            {
                result = new DynamicBlittableArray((BlittableJsonReaderArray)result);
            }

            return(true);
        }
示例#2
0
            public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
            {
                var i            = (int)(indexes[0]);
                var resultObject = BlittableJsonReaderArray[i];

                if (resultObject is BlittableJsonReaderObject)
                {
                    result = new DynamicBlittableJson((BlittableJsonReaderObject)resultObject);
                }
                else if (resultObject is BlittableJsonReaderArray)
                {
                    result = new DynamicBlittableArray((BlittableJsonReaderArray)resultObject);
                }
                else
                {
                    result = resultObject;
                }
                return(true);
            }