public TypedItem(Item item, ITemplateMapping templateMapping) { if (item == null) throw new ArgumentNullException(nameof(item)); if (templateMapping == null) throw new ArgumentNullException(nameof(templateMapping)); this.innerItem = item; this.mapping = templateMapping; this.axes = new Axes(item, templateMapping); }
public static Option <TItem> ResolveAs <TItem>(this ITemplateMapping mapping, Item item) where TItem : IItem { if (mapping == null) { throw new ArgumentNullException(nameof(mapping)); } if (item == null) { throw new ArgumentNullException(nameof(item)); } return(mapping.Resolve(item).SomeWhen(i => i is TItem).Map(i => (TItem)i)); }
public Axes(Item item, ITemplateMapping templateMapping) { if (item == null) { throw new ArgumentNullException(nameof(item)); } if (templateMapping == null) { throw new ArgumentNullException(nameof(templateMapping)); } this.ownerItem = item; this.mapping = templateMapping; }
public TypedItem(Item item, ITemplateMapping templateMapping) { if (item == null) { throw new ArgumentNullException(nameof(item)); } if (templateMapping == null) { throw new ArgumentNullException(nameof(templateMapping)); } this.innerItem = item; this.mapping = templateMapping; this.axes = new Axes(item, templateMapping); }
public ArticlePageItem(Item item, ITemplateMapping mapping) : base(item, mapping) { Title = new TypedField(item, "Title"); Content = new TypedField(item, "Content"); }
public PageItem(Item item, ITemplateMapping mapping) : base(item, mapping) { Title = new TypedField(item, "Title"); }