public void RegistryCalendar(BaseCalendar calendar)
 { 
     lock(this._calendars)
     {
         if (!this._calendars.Exists(c => String.Equals(c.Id, calendar.Id, StringComparison.InvariantCultureIgnoreCase)))
             this._calendars.Add(calendar);
     }
 }
 public void RegistryCalendar(BaseCalendar calendar)
 { 
     lock(this._calendars)
     {
         if (!this._calendars.Exists(c => String.Equals(c.Id, calendar.Id, StringComparison.InvariantCultureIgnoreCase)))
             this._calendars.Add(calendar);
     }
 }
        public CalendarWrapper(BaseCalendar calendar, UserViewSettings userViewSettings)
        {
            _userViewSettings = userViewSettings;
            if (_userViewSettings == null && calendar is ASC.Api.Calendar.BusinessObjects.Calendar)
            { 
                _userViewSettings = (calendar as ASC.Api.Calendar.BusinessObjects.Calendar)
                                    .ViewSettings.Find(s=> s.UserId == SecurityContext.CurrentAccount.ID);
            }

            if (_userViewSettings == null)
            {
                UserCalendar = calendar;
                _userId = SecurityContext.CurrentAccount.ID;
            }
            else
            {
                UserCalendar = calendar.GetUserCalendar(_userViewSettings);
                _userId = _userViewSettings.UserId;
            }
        }
 public SubscriptionWrapper(BaseCalendar calendar, UserViewSettings userViewSettings)
     : base(calendar, userViewSettings) { }
 public SubscriptionWrapper(BaseCalendar calendar)
     : base(calendar) { }
 public CalendarWrapper(BaseCalendar calendar) : this(calendar, null){}