public static List <EventWrapper> GetEventWrappers(this BaseCalendar calendar, Guid userId, ApiDateTime startDate, ApiDateTime endDate) { var result = new List <EventWrapper>(); if (calendar != null) { var events = calendar.LoadEvents(userId, startDate.UtcTime, endDate.UtcTime); events.ForEach(e => result.AddRange(new EventWrapper(e, userId, calendar.TimeZone).GetList(startDate.UtcTime, endDate.UtcTime))); } return(result); }
public static List <EventWrapper> GetEventWrappers(this BaseCalendar calendar, Guid userId, ApiDateTime startDate, ApiDateTime endDate) { var result = new List <EventWrapper>(); if (calendar != null) { var events = calendar.LoadEvents(userId, startDate.UtcTime, endDate.UtcTime); foreach (var e in events) { var wrapper = new EventWrapper(e, userId, calendar.TimeZone); var listWrapper = wrapper.GetList(startDate.UtcTime, endDate.UtcTime); result.AddRange(listWrapper); } } return(result); }