Esempio n. 1
0
        IEnumerator IEnumerable.GetEnumerator()
        {
            string             url   = PostHelper.BuildUrl(_criteria);
            IEnumerable <Post> posts = PostHelper.PerformWebQuery(url);

            return(posts.GetEnumerator());
        }
Esempio n. 2
0
        public override object Execute(Expression expression)
        {
            var url     = GetQueryText(expression);
            var results = PostHelper.PerformWebQuery(url);

            return(results);
        }
Esempio n. 3
0
        public override string GetQueryText(Expression expression)
        {
            // 翻译查询条件
            var criteria = new PostExpressionVisitor().ProcessExpression(expression);

            // 生成URL
            return(PostHelper.BuildUrl(criteria));
        }