Exemplo n.º 1
0
        public object Build(WidgetSpecification widgetSpecification)
        {
            var visitor = new ResourceBuildingComponentVisitor(widgetSpecification);

            return(new WidgetSpecificationResource
            {
                Components = widgetSpecification.Components.Select((c, i) => c.Accept(visitor, new[] { i })),
                Links = this.GetLinks(widgetSpecification).ToArray()
            });
        }
Exemplo n.º 2
0
        public object Build(Template template)
        {
            var visitor = new ResourceBuildingComponentVisitor(template);

            return(new TemplateResource
            {
                Components = template.Components.Select((c, i) => c.Accept(visitor, new[] { i })),
                Links = this.GetLinks(template).ToArray()
            });
        }
        public object Build(ComponentDetails model)
        {
            var visitor = new ResourceBuildingComponentVisitor(model.Owner);

            return(model.Component.Accept(visitor, model.ComponentPath));
        }