示例#1
0
        public List <Blog> GetBlogs()
        {
            var blogs = JsonReaderHelper.ReadObjectListFromJson <Blog>("Features/Blogs/blogs.json");

            //Randomize order to not favorize any
            return(blogs.OrderBy(a => Guid.NewGuid()).ToList());
        }
示例#2
0
        public void Execute(IJobExecutionContext context)
        {
            var groupsConfig = JsonReaderHelper.ReadObjectListFromJson <NetGroup>("netGroupsConfig.json");

            MeetupDataProvider provider = new MeetupDataProvider();

            var meetings = provider.GetDataFromMeetupPage(groupsConfig);

            AddMeetingsToGroups(groupsConfig, meetings);

            NetGroupDataSnapshot snapshot = NetGroupDataSnapshot.Create();

            snapshot.Groups = groupsConfig;

            Repository repository = new Repository();

            repository.Add(snapshot);
        }
示例#3
0
        public void Execute(IJobExecutionContext context)
        {
            var groupsConfig = JsonReaderHelper.ReadObjectListFromJson <NetGroup>("netGroupsConfig.json");

            MeetupDataProvider provider = new MeetupDataProvider();

            var meetings = provider.GetDataFromMeetupPage(groupsConfig);

            AddMeetingsToGroups(groupsConfig, meetings);

            NetGroupDataSnapshot snapshot = NetGroupDataSnapshot.Create();

            snapshot.Groups = groupsConfig;

            Repository repository = new Repository();

            repository.Add(snapshot);

            Logger.Info(string.Format("Found {0} groups with {1} upcoming meetups", snapshot.Groups.Count, snapshot.Groups.SelectMany(g => g.UpcomingMeetings).Count()));
        }
示例#4
0
        public void Execute(IJobExecutionContext context)
        {
            var blogsConfig = JsonReaderHelper.ReadObjectListFromJson <Blog>("blogsConfig.json");

            BlogDataProvider blogDataProvider = new BlogDataProvider();

            var blogs = blogDataProvider.GetDataFromRss(blogsConfig);

            BlogDataSnapshot snapshot = BlogDataSnapshot.Create();

            snapshot.Blogs = blogs;

            OrderBlogsByNewestPostsPosts(snapshot);

            Repository repository = new Repository();

            repository.Add(snapshot);

            Logger.Info(string.Format("Added/updated: {0} blog posts", blogs.SelectMany(b => b.BlogPosts).Count()));
        }
 public List <WebsiteRecordWithTitleAndDesc> GetProgrammingChallenges() => JsonReaderHelper.ReadObjectListFromJson <WebsiteRecordWithTitleAndDesc>("Features/LearnOnline/programmingChallenges.json");
 public List <WebsiteRecordWithTitleAndDesc> GetMasteringTools() => JsonReaderHelper.ReadObjectListFromJson <WebsiteRecordWithTitleAndDesc>("Features/LearnOnline/toolsMastering.json");
示例#7
0
 public List <Webcast> GetWebcastList() => JsonReaderHelper.ReadObjectListFromJson <Webcast>("Features/Webcasts/webcastsList.json");
示例#8
0
 public List <Resource> GetResources() => JsonReaderHelper.ReadObjectListFromJson <Resource>("Features/Resources/resources.json");
示例#9
0
 public List <ConferenceVideo> GetConferenceVideosList() => JsonReaderHelper.ReadObjectListFromJson <ConferenceVideo>("Features/ConferenceVideos/conferenceVideosList.json");