public object Execute(Expression expression)
 {
     //Type elementType = expression.Type.GetElementType();
     //MethodInfo execute = typeof(ReliableIndexedDictionaryQueryContext).GetMethod("Execute", BindingFlags.Static).MakeGenericMethod(new Type[] { elementType });
     //return execute.Invoke(null, new object[] { expression });
     return(ReliableIndexedDictionaryQueryContext.Execute <TKey, TValue>(expression, StateManager, Dictionary, false));
 }
        // Queryable's "single value" standard query operators call this method.
        // It is also called from QueryableTerraServerData.GetEnumerator().
        public TResult Execute <TResult>(Expression expression)
        {
            bool IsEnumerable = (typeof(TResult).Name == "IEnumerable`1");
            var  result       = (Task <object>)ReliableIndexedDictionaryQueryContext.Execute <TKey, TValue>(expression, StateManager, Dictionary, IsEnumerable);

            return((TResult)result.Result);
        }