public ICalendar CreateCalendarForEvent(Post post) { ICalendar calendar = new Calendar(HttpUtility.HtmlDecode(post.Title), false); var item = CreateCalendarItem(post); if (item != null) { calendar.Items.Add(item); } return calendar; }
public ICalendar CreateCalendar(IEnumerable<Post> posts) { ICalendar calendar = new Calendar(_settings.Title, true); foreach (var post in posts) { var item = CreateCalendarItem(post); if (item != null) { calendar.Items.Add(item); } } return calendar; }