public void Write(IProjectionContext <TParent> context, IMediaNode node)
        {
            var list     = node.AddList(NodeName, LeafName ?? NodeName);
            var elements = ElementSource(context);

            var projection = ProjectionSource(context);

            elements.Each(element =>
            {
                var childNode    = list.Add();
                var childContext = context.ContextFor(element);
                projection.Write(childContext, childNode);
            });
        }
Example #2
0
 public static IMediaNodeList AddList(this IMediaNode node, string name)
 {
     return(node.AddList(name, name));
 }