Composition

References
public sealed class Composition
An organised collection of chapters.

Constructors

Composition

#
public Composition(params CompositionChapter[] chapters)
Create a new layout.
chapters (params CompositionChapter[])

Properties

Chapters

#
public CompositionChapter[] Chapters { get; }
Gets all the chapters contained in this layout.

Methods

Apply

#
public Composition Apply(Rules rules, Func<string, Rules> citationResolver)
Apply one or more rules to this organisation.
rules (Rules)Rules to apply.
citationResolver (Func<string, Rules>)Method which returns the cited rules given their name. If this argument is not supplied, cited rules will not be considered.

FromItems<T>

#
public static Composition FromItems<T>(IEnumerable<T> values, Func<T, Nomen> toNomen, Func<T, IIcon> toIcon, Func<T, Guid> toId)
Create a new organisation from a collection of values.
values (IEnumerable<T>)Value to add.
toNomen (Func<T, Nomen>)Nomen extractor.
toIcon (Func<T, IIcon>)Icon extractor.
toId (Func<T, Guid>)Id extractor.

Insert

#
public Composition Insert(CompositionItem item)
Insert a collection of items into this chapter.
item (CompositionItem)

Remove

#
public Composition Remove(Selector selector, List<CompositionItem> list)
Remove all indicated items from this chapter.
selector (Selector)Selector pattern.
list (List<CompositionItem>)All removed items will be appended to this list.