// Token: 0x0600310B RID: 12555 RVA: 0x00120874 File Offset: 0x0011EA74
        public static void RenderSuggestionQualities(TextWriter output, SuggestionDayResult[] suggestionDayResults, bool renderNoDataSuggestionBuckets, ExDateTime startDate, ExDateTime endDate, Microsoft.Exchange.Clients.Owa.Core.WorkingHours workingHours)
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug(0L, "SchedulingTabRenderingUtilities.RenderSuggestionQualitys");
            if (suggestionDayResults == null || renderNoDataSuggestionBuckets)
            {
                ExTraceGlobals.CalendarDataTracer.TraceDebug(0L, "Either we did not get any suggestion buckets or we intentionally want to render buckets for no data");
                int num = ((DateTime)endDate - (DateTime)startDate).Days + 1;
                for (int i = 0; i < num; i++)
                {
                    output.Write(4);
                }
                return;
            }
            UserContextManager.GetUserContext();
            int days = (suggestionDayResults[0].Date - (DateTime)startDate).Days;

            for (int j = 0; j < days; j++)
            {
                output.Write(4);
            }
            for (int k = 0; k < suggestionDayResults.Length; k++)
            {
                Suggestion[] suggestionArray = suggestionDayResults[k].SuggestionArray;
                int          value           = 3;
                if (0 < suggestionArray.Length)
                {
                    value = (int)suggestionArray[0].SuggestionQuality;
                }
                else if (!workingHours.IsWorkDay(suggestionDayResults[k].Date.DayOfWeek))
                {
                    value = 4;
                }
                output.Write(value);
            }
        }
 // Token: 0x06003109 RID: 12553 RVA: 0x001207B8 File Offset: 0x0011E9B8
 public static int GetWorkDayEndHour(Microsoft.Exchange.Clients.Owa.Core.WorkingHours workingHours, ExDateTime date)
 {
     return((int)Math.Ceiling((double)workingHours.GetWorkDayEndTime(date) / 60.0));
 }
        // Token: 0x0600310D RID: 12557 RVA: 0x00120F14 File Offset: 0x0011F114
        public static void RenderRecipientFreeBusyData(TextWriter output, SchedulingRecipientInfo[] schedulingRecipientInfos, FreeBusyQueryResult[] freeBusyQueryResults, ExDateTime startDateFreeBusyWindow, ExDateTime endDateFreeBusyWindow, bool show24Hours, bool renderDataForAllRecipients, ExTimeZone timeZone, Microsoft.Exchange.Clients.Owa.Core.WorkingHours workingHours)
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug(0L, "SchedulingTabRenderingUtilities.RenderRecipientFreeBusyData");
            int days = ((DateTime)endDateFreeBusyWindow - (DateTime)startDateFreeBusyWindow).Days;
            int num  = 0;
            int num2 = 48;

            if (!show24Hours)
            {
                num  = SchedulingTabRenderingUtilities.GetWorkDayStartHour(workingHours, startDateFreeBusyWindow) * 60 / 30;
                num2 = SchedulingTabRenderingUtilities.GetWorkDayEndHour(workingHours, startDateFreeBusyWindow) * 60 / 30;
            }
            int num3 = 48;
            int num4 = num2 - num;

            output.Write("<div id=fbd>");
            output.Write("var rgUFB = new Array();");
            int num5 = 0;

            for (int i = 0; i < schedulingRecipientInfos.Length; i++)
            {
                FreeBusyQueryResult     freeBusyQueryResult     = (freeBusyQueryResults == null) ? null : freeBusyQueryResults[i];
                SchedulingRecipientInfo schedulingRecipientInfo = schedulingRecipientInfos[i];
                if (renderDataForAllRecipients || schedulingRecipientInfo.GetFreeBusyData)
                {
                    output.Write("rgUFB[");
                    output.Write(num5++);
                    output.Write("] = new RecipientFreeBusyData(\"");
                    output.Write(schedulingRecipientInfo.ID);
                    output.Write("\",\"");
                    if (freeBusyQueryResult == null || Utilities.IsFatalFreeBusyError(freeBusyQueryResult.ExceptionInfo) || string.IsNullOrEmpty(freeBusyQueryResult.MergedFreeBusy))
                    {
                        ExTraceGlobals.CalendarDataTracer.TraceDebug <string, string, object>(0L, "Unable to get free/busy data for user '{0} ({1})' Exception: {2}", schedulingRecipientInfo.DisplayName, schedulingRecipientInfo.EmailAddress, (freeBusyQueryResult != null) ? freeBusyQueryResult.ExceptionInfo : "<recipientQueryResult is null>");
                        int num6 = num4 * days;
                        for (int j = 0; j < num6; j++)
                        {
                            output.Write('4');
                        }
                        if (freeBusyQueryResult != null)
                        {
                            output.Write("\",\"{0}", freeBusyQueryResult.ExceptionInfo.ErrorCode);
                        }
                    }
                    else
                    {
                        string mergedFreeBusy = freeBusyQueryResult.MergedFreeBusy;
                        SchedulingTabRenderingUtilities.SetFreeBusyDayLightBasedValue(startDateFreeBusyWindow, endDateFreeBusyWindow, timeZone, ref mergedFreeBusy);
                        for (int k = 0; k < days; k++)
                        {
                            int num7 = k * num3 + num;
                            for (int l = 0; l < num4; l++)
                            {
                                output.Write(mergedFreeBusy[num7 + l]);
                            }
                        }
                    }
                    output.Write("\");");
                }
            }
            output.Write("</div>");
        }
 // Token: 0x06003107 RID: 12551 RVA: 0x0012076D File Offset: 0x0011E96D
 public static int CalculateTotalWorkingHours(Microsoft.Exchange.Clients.Owa.Core.WorkingHours workingHours)
 {
     return((int)Math.Ceiling((double)workingHours.WorkDayEndTimeInWorkingHoursTimeZone / 60.0) - (int)Math.Floor((double)workingHours.WorkDayStartTimeInWorkingHoursTimeZone / 60.0));
 }