Пример #1
0
 private static List<IBinderValue> populateUser( List<User> list )
 {
     List<IBinderValue> results = new List<IBinderValue>();
     foreach (User user in list) {
         IBinderValue vo = new ItemValue();
         vo.Title = user.Name;
         vo.PicUrl = user.PicSmall;
         vo.Link = Link.ToUser( user.Url );
         results.Add( vo );
     }
     return results;
 }
Пример #2
0
        private List<IBinderValue> getForList( List<FeedEntry> list ) {

            List<IBinderValue> results = new List<IBinderValue>();
            foreach (FeedEntry post in list) {
                IBinderValue vo = new ItemValue();
                vo.CreatorName = post.Author;
                vo.Title = post.Title;
                vo.Link = post.Link;
                vo.Content = post.Description;
                vo.Created = post.Created;

                results.Add( vo );
            }

            return results;
        }
        internal static List<IBinderValue> populateBinderValue( List<ForumTopic> list ) {
            List<IBinderValue> results = new List<IBinderValue>();
            foreach (ForumTopic topic in list) {
                IBinderValue vo = new ItemValue();

                vo.Title = topic.Title;
                vo.Category = topic.ForumBoard.Name;
                vo.Link = alink.ToAppData( topic );
                vo.Replies = topic.Replies;
                vo.Content = topic.Content;

                vo.CreatorName = topic.Creator.Name;
                vo.CreatorLink = Link.ToMember( topic.Creator );
                vo.CreatorPic = topic.Creator.PicSmall;


                vo.Created = topic.Created;

                results.Add( vo );
            }

            return results;
        }
Пример #4
0
        private static List<IBinderValue> populateBinderValue( List<ForumPost> list )
        {
            List<IBinderValue> results = new List<IBinderValue>();
            foreach (ForumPost post in list) {
                if (post.Creator == null) continue;

                IBinderValue vo = new ItemValue();
                vo.Title = post.Title;

                vo.CreatorName = post.Creator.Name;
                vo.CreatorLink = Link.ToMember( post.Creator );
                vo.CreatorPic = post.Creator.PicSmall;

                vo.Content = post.Content;
                vo.Link = alink.ToAppData( post );
                vo.Created = post.Created;

                results.Add( vo );
            }

            return results;
        }
Пример #5
0
        internal static List<IBinderValue> getResult( List<BlogPost> list )
        {
            List<IBinderValue> results = new List<IBinderValue>();

            foreach (BlogPost post in list) {

                IBinderValue vo = new ItemValue();

                vo.CreatorName = post.Creator.Name;
                vo.CreatorLink = Link.ToUser( post.CreatorUrl );
                vo.CreatorPic = post.Creator.PicSmall;

                vo.Title = post.Title;
                vo.Link = alink.ToAppData( post );
                vo.Content = post.Content;
                vo.Created = post.Created;
                vo.Replies = post.Replies;

                results.Add( vo );
            }

            return results;
        }
Пример #6
0
        private static List<IBinderValue> populateBinder( IList list )
        {
            List<IBinderValue> results = new List<IBinderValue>();
            foreach (ContentPost post in list) {
                IBinderValue vo = new ItemValue();

                vo.Title = post.Title;
                vo.Created = post.Created;
                vo.CreatorName = post.Creator.Name;
                vo.Link = alink.ToAppData( post );
                vo.Content = post.Content;
                vo.Replies = post.Replies;
                vo.Category = post.SectionName;

                vo.obj = post;

                results.Add( vo );
            }

            return results;
        }
Пример #7
0
        public virtual List<IBinderValue> GetNewListWithAvatar( int count )
        {
            if (count <= 0) count = 10;
            List<User> list = getNewListWithAvatar( count );

            List<IBinderValue> results = new List<IBinderValue>();
            foreach (User user in list) {
                IBinderValue vo = new ItemValue();
                vo.Title = user.Name;
                vo.PicUrl = user.PicSmall;
                vo.Link = Link.ToUser( user.Url );
                results.Add( vo );
            }

            return results;
        }
Пример #8
0
        internal static List<IBinderValue> populatePhoto( List<PhotoPost> posts ) {

            List<IBinderValue> results = new List<IBinderValue>();

            foreach (PhotoPost post in posts) {

                IBinderValue vo = new ItemValue();

                vo.Title = post.Title;
                vo.PicUrl = post.ImgThumbUrl;
                vo.Link = alink.ToAppData( post );

                vo.CreatorName = post.Creator.Name;
                vo.CreatorLink = Link.ToMember( post.Creator );
                vo.CreatorPic = post.Creator.PicSmall;

                vo.Created = post.Created;
                vo.Replies = post.Replies;

                vo.Summary = post.Description;


                results.Add( vo );
            }
            return results;
        }