Method Traverse
- Namespace
- Odotocodot.OneNote.Linq
- Assembly
- Odotocodot.OneNote.Linq.dll
Traverse(IOneNoteItem)
Returns a flattened collection of OneNote items, that contains the children of every OneNote item from the source
.
public static IEnumerable<IOneNoteItem> Traverse(this IOneNoteItem source)
Parameters
source
IOneNoteItem-
The source OneNote item.
Returns
- IEnumerable<IOneNoteItem>
-
An IEnumerable<Odotocodot.OneNote.Linq.IOneNoteItem> containing the child items of the
source
.
Remarks
This method uses a non-recursive depth first traversal algorithm.
Traverse(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of OneNote items, that contains the children of every OneNote item
from the source
.
Only items that successfully pass the predicate
are returned.
public static IEnumerable<IOneNoteItem> Traverse(this IOneNoteItem source, Func<IOneNoteItem, bool> predicate)
Parameters
source
IOneNoteItem- The source OneNote item.
predicate
Func<IOneNoteItem, bool>-
A function to test each item for a condition.
Returns
- IEnumerable<IOneNoteItem>
-
An IEnumerable<Odotocodot.OneNote.Linq.IOneNoteItem> containing the child items of the
source
that pass thepredicate
.
Remarks
Traverse(IEnumerable<IOneNoteItem>)
Returns a flattened collection of OneNote items, that contains the children of every OneNote item from the source
.
public static IEnumerable<IOneNoteItem> Traverse(this IEnumerable<IOneNoteItem> source)
Parameters
source
IEnumerable<IOneNoteItem>-
The source OneNote item.
Returns
- IEnumerable<IOneNoteItem>
-
An IEnumerable<Odotocodot.OneNote.Linq.IOneNoteItem> containing the child items of the
source
.
Remarks
This method uses a non-recursive depth first traversal algorithm.
Traverse(IEnumerable<IOneNoteItem>, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of OneNote items, that contains the children of every OneNote item
from the source
.
Only items that successfully pass the predicate
are returned.
public static IEnumerable<IOneNoteItem> Traverse(this IEnumerable<IOneNoteItem> source, Func<IOneNoteItem, bool> predicate)
Parameters
source
IEnumerable<IOneNoteItem>- The source OneNote item.
predicate
Func<IOneNoteItem, bool>-
A function to test each item for a condition.
Returns
- IEnumerable<IOneNoteItem>
-
An IEnumerable<Odotocodot.OneNote.Linq.IOneNoteItem> containing the child items of the
source
that pass thepredicate
.