Class LinqExtensions
- Namespace
- LinqToOneNote
- Assembly
- LinqToOneNote.dll
Linq extension methods for a IOneNoteItem.
public static class LinqExtensions
- Inheritance
-
LinqExtensions
- Inherited Members
Methods
AfterSelf(IOneNoteItem)
Returns a collection of sibling items that appear after the specified origin in its parent.
public static IEnumerable<IOneNoteItem> AfterSelf(this IOneNoteItem origin)
Parameters
originIOneNoteItemThe item for which to retrieve the following sibling items of.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the following sibling items of the
origin.
AfterSelf(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a filtered collection of sibling items that appear after the specified origin and satisfy the given predicate.
public static IEnumerable<IOneNoteItem> AfterSelf(this IOneNoteItem origin, Func<IOneNoteItem, bool> predicate)
Parameters
originIOneNoteItemThe item for which to retrieve the following sibling items of.
predicateFunc<IOneNoteItem, bool>The predicate to filter the following sibling items.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the following sibling items of the
originthat pass thepredicate.
Ancestors(IOneNoteItem)
Returns a collection of the ancestor elements of the specified origin.
public static IEnumerable<IOneNoteItem> Ancestors(this IOneNoteItem origin)
Parameters
originIOneNoteItemThe item for which to retrieve the ancestor elements of.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the ancestor elements of the
origin.
Ancestors(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a collection of the ancestor elements of the specified origin that satisfy the given predicate.
public static IEnumerable<IOneNoteItem> Ancestors(this IOneNoteItem origin, Func<IOneNoteItem, bool> predicate)
Parameters
originIOneNoteItemThe item for which to retrieve the ancestor elements of.
predicateFunc<IOneNoteItem, bool>The predicate to filter the ancestor elements.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the ancestor elements of the
originthat pass thepredicate.
BeforeSelf(IOneNoteItem)
Returns a collection of sibling items that appear before the specified origin in its parent.
public static IEnumerable<IOneNoteItem> BeforeSelf(this IOneNoteItem origin)
Parameters
originIOneNoteItemThe item for which to retrieve the preceding sibling items of.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the preceding sibling items of the
origin.
BeforeSelf(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a filtered collection of sibling items that appear before the specified origin and satisfy the given predicate.
public static IEnumerable<IOneNoteItem> BeforeSelf(this IOneNoteItem origin, Func<IOneNoteItem, bool> predicate)
Parameters
originIOneNoteItemThe item for which to retrieve the preceding sibling items of.
predicateFunc<IOneNoteItem, bool>The predicate to filter the preceding sibling items.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the preceding sibling items of the
originthat pass thepredicate.
Descendants(IOneNoteItem)
Returns a flattened collection of OneNote items, which contains the descendants of the source.
public static IEnumerable<IOneNoteItem> Descendants(this IOneNoteItem source)
Parameters
sourceIOneNoteItemThe source OneNote item.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the descendants of the
source.
Remarks
This method uses a non-recursive depth first traversal algorithm.
Descendants(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of OneNote items, which contains the descendants of the source.
Only items that successfully pass the predicate are returned.
public static IEnumerable<IOneNoteItem> Descendants(this IOneNoteItem source, Func<IOneNoteItem, bool> predicate)
Parameters
sourceIOneNoteItemThe source OneNote item.
predicateFunc<IOneNoteItem, bool>The predicate to filter the descendants.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the descendants of the
sourcethat pass thepredicate.
Remarks
Descendants(IEnumerable<IOneNoteItem>)
Returns a flattened collection of OneNote items, which contains the descendants of the source.
public static IEnumerable<IOneNoteItem> Descendants(this IEnumerable<IOneNoteItem> source)
Parameters
sourceIEnumerable<IOneNoteItem>The source OneNote item.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the descendants of the
source.
Remarks
This method uses a non-recursive depth first traversal algorithm.
Descendants(IEnumerable<IOneNoteItem>, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of OneNote items, which contains the descendants of the source.
Only items that successfully pass the predicate are returned.
public static IEnumerable<IOneNoteItem> Descendants(this IEnumerable<IOneNoteItem> source, Func<IOneNoteItem, bool> predicate)
Parameters
sourceIEnumerable<IOneNoteItem>The source OneNote item.
predicateFunc<IOneNoteItem, bool>The predicate to filter the descendants.
Returns
- IEnumerable<IOneNoteItem>
An IEnumerable<IOneNoteItem> containing all the descendants of the
sourcethat pass thepredicate.
Remarks
GetAllPages(IOneNoteItem)
Returns a flattened collection of all the pages present in the source.
public static IEnumerable<Page> GetAllPages(this IOneNoteItem source)
Parameters
sourceIOneNoteItem- The source OneNote item.
Returns
- IEnumerable<Page>
An IEnumerable<Page> containing all the pages present in the
source.
GetAllPages(IOneNoteItem, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of all the pages present in the source.
Only items that successfully pass the predicate are returned.
public static IEnumerable<Page> GetAllPages(this IOneNoteItem source, Func<IOneNoteItem, bool> predicate)
Parameters
sourceIOneNoteItemThe item for which to retrieve the pages of.
predicateFunc<IOneNoteItem, bool>The predicate to filter the pages.
Returns
- IEnumerable<Page>
An IEnumerable<Page> containing all the pages present in the
sourcethat pass thepredicate.
GetAllPages(IEnumerable<IOneNoteItem>)
Returns a flattened collection of all the pages present in the source.
public static IEnumerable<Page> GetAllPages(this IEnumerable<IOneNoteItem> source)
Parameters
sourceIEnumerable<IOneNoteItem>- The source OneNote item.
Returns
- IEnumerable<Page>
An IEnumerable<Page> containing all the pages present in the
source.
GetAllPages(IEnumerable<IOneNoteItem>, Func<IOneNoteItem, bool>)
Returns a filtered flattened collection of all the pages present in the source.
Only items that successfully pass the predicate are returned.
public static IEnumerable<Page> GetAllPages(this IEnumerable<IOneNoteItem> source, Func<IOneNoteItem, bool> predicate)
Parameters
sourceIEnumerable<IOneNoteItem>The item for which to retrieve the pages of.
predicateFunc<IOneNoteItem, bool>The predicate to filter the pages.
Returns
- IEnumerable<Page>
An IEnumerable<Page> containing all the pages present in the
sourcethat pass thepredicate.