public IEnumerator GetEnumerator()
        {
            if (_items == null)
            {
                // Reserve space so this will not have to reallocate. The most it will ever be is
                // 9 for the forward stack, 9 for the back stack, 1 for the title bar
                _items = new ArrayList(19);

                // Add ForwardStack in reverse order
                foreach (JournalEntry o in _forwardStack)
                {
                    _items.Insert(0, o);
                    JournalEntryUnifiedViewConverter.SetJournalEntryPosition(o, JournalEntryPosition.Forward);
                }

                DependencyObject current = new DependencyObject();
                current.SetValue(JournalEntry.NameProperty, SR.Get(SRID.NavWindowMenuCurrentPage));

                // "Current Page"
                _items.Add(current);

                foreach (JournalEntry o in _backStack)
                {
                    _items.Add(o);
                    JournalEntryUnifiedViewConverter.SetJournalEntryPosition(o, JournalEntryPosition.Back);
                }
            }

            return(_items.GetEnumerator());
        }
Exemple #2
0
 // Token: 0x0600291C RID: 10524 RVA: 0x000BDFEC File Offset: 0x000BC1EC
 public IEnumerator GetEnumerator()
 {
     if (this._items == null)
     {
         this._items = new ArrayList(19);
         foreach (object obj in this._forwardStack)
         {
             JournalEntry journalEntry = (JournalEntry)obj;
             this._items.Insert(0, journalEntry);
             JournalEntryUnifiedViewConverter.SetJournalEntryPosition(journalEntry, JournalEntryPosition.Forward);
         }
         DependencyObject dependencyObject = new DependencyObject();
         dependencyObject.SetValue(JournalEntry.NameProperty, SR.Get("NavWindowMenuCurrentPage"));
         this._items.Add(dependencyObject);
         foreach (object obj2 in this._backStack)
         {
             JournalEntry journalEntry2 = (JournalEntry)obj2;
             this._items.Add(journalEntry2);
             JournalEntryUnifiedViewConverter.SetJournalEntryPosition(journalEntry2, JournalEntryPosition.Back);
         }
     }
     return(this._items.GetEnumerator());
 }