private EventRosterPage CreateRosterPage()
        {
            EventRosterPage eventRosterPage = Object.Instantiate <EventRosterPage>(this.m_rosterPagePrefab, this.m_inviteListScrollArea.transform, false);

            eventRosterPage.transform.SetAsLastSibling();
            eventRosterPage.transform.localScale = Vector3.one;
            return(eventRosterPage);
        }
        private IEnumerator GetInvitesCoroutine()
        {
            this.m_addInviteButton.GetComponent <Button>().interactable = false;
            bool acceptInteractable    = this.m_acceptButton.interactable;
            bool tentativeInteractable = this.m_tentativeButton.interactable;
            bool declineInteractable   = this.m_declineButton.interactable;

            this.m_acceptButton.interactable    = false;
            this.m_tentativeButton.interactable = false;
            this.m_declineButton.interactable   = false;
            while (!Calendar.AreNamesReady() || Calendar.IsActionPending())
            {
                yield return(null);
            }
            this.m_invites.Clear();
            for (uint num = 0u; num < Calendar.GetNumInvites(); num += 1u)
            {
                CalendarEventInviteInfo key2;
                if (Calendar.EventGetInvite(num, ref key2))
                {
                    this.m_invites.Add(key2, num);
                }
            }
            IOrderedEnumerable <CalendarEventInviteInfo> invites = this.m_invites.Keys.OrderBy((CalendarEventInviteInfo key) => key, EventInviteResponseDialog.Sorter);

            foreach (EventRosterPage eventRosterPage in this.m_inviteListScrollArea.GetComponentsInChildren <EventRosterPage>())
            {
                Object.Destroy(eventRosterPage.gameObject);
            }
            while (base.GetComponentsInChildren <EventRosterPage>().Length > 0)
            {
                yield return(null);
            }
            EventRosterPage currentMemberPage = this.CreateRosterPage();

            foreach (CalendarEventInviteInfo invite in invites)
            {
                if (currentMemberPage.AtCapacity())
                {
                    currentMemberPage = this.CreateRosterPage();
                }
                currentMemberPage.AddMemberToRoster(invite);
                yield return(null);
            }
            this.m_inviteListScrollArea.GetComponentInParent <AutoCenterScrollRect>().CenterOnItem(0);
            bool isTodayOrLater = this.CalendarEventItem.EventData.EventTime >= DateAndTime.GetServerTimeLocal();

            this.m_addInviteButton.GetComponent <Button>().interactable = isTodayOrLater;
            this.m_acceptButton.interactable    = acceptInteractable;
            this.m_tentativeButton.interactable = tentativeInteractable;
            this.m_declineButton.interactable   = declineInteractable;
            yield break;
        }