/// <summary>Merges two navigation history stacks.</summary> /// <param name="values">An array of two navigation stacks. </param> /// <param name="targetType">This parameter is not used.</param> /// <param name="parameter">This parameter is not used.</param> /// <param name="culture">This parameter is not used.</param> /// <returns>An <see cref="T:System.Collections.IEnumerable" /> that can be used to enumerate the merged list of navigation history stacks if neither passed navigation stack is <see langword="null" />. <see langword="null" />, otherwise.</returns> // Token: 0x06002917 RID: 10519 RVA: 0x000BDF0C File Offset: 0x000BC10C public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values != null && values.Length == 2) { JournalEntryStack journalEntryStack = values[0] as JournalEntryStack; JournalEntryStack journalEntryStack2 = values[1] as JournalEntryStack; if (journalEntryStack != null && journalEntryStack2 != null) { LimitedJournalEntryStackEnumerable backStack = (LimitedJournalEntryStackEnumerable)journalEntryStack.GetLimitedJournalEntryStackEnumerable(); LimitedJournalEntryStackEnumerable forwardStack = (LimitedJournalEntryStackEnumerable)journalEntryStack2.GetLimitedJournalEntryStackEnumerable(); return(new UnifiedJournalEntryStackEnumerable(backStack, forwardStack)); } } return(null); }
/// <summary> /// This method from IValueConverter returns an IEnumerable which in turn will yield the /// single list containing all of the menu items. /// </summary> public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (values != null && values.Length == 2) { JournalEntryStack backStack = values[0] as JournalEntryStack; JournalEntryStack forwardStack = values[1] as JournalEntryStack; if (backStack != null && forwardStack != null) { LimitedJournalEntryStackEnumerable limitedBackStack = (LimitedJournalEntryStackEnumerable)backStack.GetLimitedJournalEntryStackEnumerable(); LimitedJournalEntryStackEnumerable limitedForwardStack = (LimitedJournalEntryStackEnumerable)forwardStack.GetLimitedJournalEntryStackEnumerable(); return(new UnifiedJournalEntryStackEnumerable(limitedBackStack, limitedForwardStack)); } } return(null); }