public new static object GetSample()
 {
     return(new
     {
         canEditTimeZone = false,
         timeZone = TimeZoneWrapper.GetSample(),
         defaultAlert = EventAlertWrapper.GetSample(),
         events = new List <object>()
         {
             EventWrapper.GetSample()
         },
         owner = UserParams.GetSample(),
         objectId = "1",
         title = "Calendar Name",
         description = "Calendar Description",
         backgroundColor = "#000000",
         textColor = "#ffffff",
         isEditable = true,
         permissions = CalendarPermissions.GetSample(),
         isShared = true,
         canAlertModify = true,
         isHidden = false,
         isiCalStream = false,
         isSubscription = false,
         group = "Personal Calendars",
         isNew = true,
         isSubscribed = false,
     });
 }
Esempio n. 2
0
        public EventHistoryWrapper(EventHistory eventHistory, bool canEdit, bool canNotify, BusinessObjects.Calendar cal, bool fullHistory = true)
        {
            CalendarId = eventHistory.CalendarId;
            EventUid   = eventHistory.EventUid;
            EventId    = eventHistory.EventId;

            if (fullHistory)
            {
                Ics = eventHistory.Ics;
            }
            else
            {
                var mergedCalendar = eventHistory.GetMerged();
                MergedIcs = mergedCalendar == null ? string.Empty : DDayICalParser.SerializeCalendar(mergedCalendar);
            }

            CanEdit   = canEdit;
            CanNotify = canNotify;

            CalendarName = cal.Name;

            TimeZoneInfo = new TimeZoneWrapper(cal.ViewSettings.Any() && cal.ViewSettings.First().TimeZone != null
                                                   ? cal.ViewSettings.First().TimeZone
                                                   : cal.TimeZone);
        }