// Token: 0x06001A8D RID: 6797 RVA: 0x0009A030 File Offset: 0x00098230
 public CalendarAdapterBase()
 {
     this.DateRanges = CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(new ExDateTime[]
     {
         ExDateTime.Now
     });
 }
 protected CalendarViewBase(ISessionContext sessionContext, CalendarAdapterBase calendarAdapter)
 {
     if (sessionContext == null)
     {
         throw new ArgumentNullException("sessionContext");
     }
     this.sessionContext  = sessionContext;
     this.CalendarAdapter = calendarAdapter;
 }
 // Token: 0x0600013A RID: 314 RVA: 0x00009D54 File Offset: 0x00007F54
 protected DailyViewBase(ISessionContext sessionContext, CalendarAdapterBase calendarAdapter) : base(sessionContext, calendarAdapter)
 {
     ExTraceGlobals.CalendarCallTracer.TraceDebug(0L, "DailyViewBase.DailyViewBase");
     this.timeStripMode = this.GetTimeStripMode();
     if (calendarAdapter.DataSource != null)
     {
         if (base.DateRanges != null)
         {
             Array.Sort(base.DateRanges, base.DateRanges[0]);
         }
         ExTraceGlobals.CalendarTracer.TraceDebug(0L, "Creating and mapping visuals in the view");
         this.CreateVisuals();
         this.MapVisuals();
     }
 }
Exemple #4
0
 // Token: 0x06002536 RID: 9526 RVA: 0x000D75E4 File Offset: 0x000D57E4
 public void LoadData(PropertyDefinition[] queryProperties, ExDateTime[] days, int startHour, int endHour, CalendarViewType viewType, ExTimeZone preferredTimeZone)
 {
     if (queryProperties == null || queryProperties.Length == 0)
     {
         throw new ArgumentNullException("queryProperties");
     }
     days = CalendarUtilities.GetViewDaysForPublishedView(this.SessionContext, days, viewType);
     try
     {
         this.publishedFolder = (PublishedCalendar)PublishedFolder.Create(this.SessionContext.PublishingUrl);
     }
     catch (PublishedFolderAccessDeniedException innerException)
     {
         throw new OwaInvalidRequestException("Cannot open published folder", innerException);
     }
     catch (NotSupportedException innerException2)
     {
         throw new OwaInvalidRequestException("Cannot open published folder", innerException2);
     }
     if (preferredTimeZone != null)
     {
         this.SessionContext.TimeZone  = preferredTimeZone;
         this.publishedFolder.TimeZone = preferredTimeZone;
         CalendarUtilities.AdjustTimesWithTimeZone(days, preferredTimeZone);
     }
     else if (this.SessionContext.IsTimeZoneFromCookie)
     {
         this.publishedFolder.TimeZone = this.SessionContext.TimeZone;
     }
     else
     {
         this.SessionContext.TimeZone = this.publishedFolder.TimeZone;
         CalendarUtilities.AdjustTimesWithTimeZone(days, this.SessionContext.TimeZone);
     }
     base.DateRanges = CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(days, startHour, endHour);
     try
     {
         base.DataSource = new PublishedCalendarDataSource(this.SessionContext, this.publishedFolder, base.DateRanges, queryProperties);
     }
     catch (FolderNotPublishedException)
     {
         Utilities.EndResponse(OwaContext.Current.HttpContext, HttpStatusCode.NotFound);
     }
     base.CalendarTitle = string.Format("{0} ({1})", this.publishedFolder.DisplayName, this.publishedFolder.OwnerDisplayName);
 }
Exemple #5
0
 public void LoadData(PropertyDefinition[] queryProperties, ExDateTime[] days, bool addOwaConditionAdvisor, int startHour, int endHour, ref CalendarViewType viewType, out int viewWidth, out ReadingPanePosition readingPanePosition)
 {
     if (queryProperties == null)
     {
         throw new ArgumentNullException("queryProperties");
     }
     if (queryProperties.Length == 0)
     {
         throw new ArgumentException("Length of queryProperties cannot be 0");
     }
     viewWidth           = 0;
     readingPanePosition = ReadingPanePosition.Min;
     if (this.folder == null)
     {
         try
         {
             this.folder = this.OpenFolder(false);
         }
         catch (OwaSharedFromOlderVersionException)
         {
         }
         catch (OwaLoadSharedCalendarFailedException)
         {
             return;
         }
     }
     this.GetDataAndUpdateCommonViewIfNecessary(true);
     if (this.folder != null && CalendarUtilities.UserHasRightToLoad(this.folder))
     {
         this.LoadFolderViewStates(this.folder, ref days, ref viewType, out viewWidth, out readingPanePosition);
         base.DateRanges = CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(days, startHour, endHour);
         base.DataSource = new CalendarDataSource(this.UserContext, this.folder, base.DateRanges, queryProperties);
         if (addOwaConditionAdvisor)
         {
             this.AddOwaConditionAdvisorIfNecessary(this.folder);
         }
     }
     else if (this.IsGSCalendar || (this.isFromOlderVersion && this.olderExchangeCalendarTypeInNode != NavigationNodeFolder.OlderExchangeCalendarType.Secondary))
     {
         this.LoadFolderViewStates(null, ref days, ref viewType, out viewWidth, out readingPanePosition);
         base.DateRanges = CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(days, startHour, endHour);
         base.DataSource = new AvailabilityDataSource(this.UserContext, this.SmtpAddress, (!this.IsGSCalendar && this.olderExchangeCalendarTypeInNode == NavigationNodeFolder.OlderExchangeCalendarType.Unknown) ? this.FolderId.StoreObjectId : null, base.DateRanges, false);
     }
     this.dataLoaded = true;
 }
Exemple #6
0
 public void LoadData(PropertyDefinition[] queryProperties, ExDateTime[] days, bool addOwaConditionAdvisor, bool throwIfFolderNotFound)
 {
     if (queryProperties == null || queryProperties.Length == 0)
     {
         throw new ArgumentNullException("queryProperties");
     }
     base.DateRanges = CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(days);
     if (this.folder == null)
     {
         try
         {
             this.folder = this.OpenFolder(throwIfFolderNotFound);
         }
         catch (OwaSharedFromOlderVersionException)
         {
         }
         catch (OwaLoadSharedCalendarFailedException)
         {
             return;
         }
     }
     this.GetDataAndUpdateCommonViewIfNecessary(false);
     if (this.folder != null && CalendarUtilities.UserHasRightToLoad(this.folder))
     {
         base.DataSource = new CalendarDataSource(this.UserContext, this.folder, base.DateRanges, queryProperties);
         if (addOwaConditionAdvisor)
         {
             this.AddOwaConditionAdvisorIfNecessary(this.folder);
         }
     }
     else if (this.IsGSCalendar || (this.isFromOlderVersion && this.olderExchangeCalendarTypeInNode != NavigationNodeFolder.OlderExchangeCalendarType.Secondary))
     {
         base.DataSource = new AvailabilityDataSource(this.UserContext, this.SmtpAddress, (!this.IsGSCalendar && this.olderExchangeCalendarTypeInNode == NavigationNodeFolder.OlderExchangeCalendarType.Unknown) ? this.FolderId.StoreObjectId : null, base.DateRanges, true);
     }
     this.dataLoaded = true;
 }
 // Token: 0x06001A99 RID: 6809 RVA: 0x0009A0C6 File Offset: 0x000982C6
 public static DateRange[] ConvertDateTimeArrayToDateRangeArray(ExDateTime[] dateTimes)
 {
     return(CalendarAdapterBase.ConvertDateTimeArrayToDateRangeArray(dateTimes, 0, 24));
 }