public void Project(string attributeName, CustomValue value, IMediaNode node)
        {
            var child = node.AddChild(attributeName);

            child.SetAttribute("Name", value.Name);
            child.SetAttribute("Age", value.Age);
        }
 public void Project(string attributeName, IMediaNode node)
 {
     var child = node.AddChild(attributeName);
 
     child.SetAttribute("Name", Name);
     child.SetAttribute("Age", Age);
 }
        public void Project(string attributeName, IMediaNode node)
        {
            var child = node.AddChild(attributeName);

            child.SetAttribute("Name", Name);
            child.SetAttribute("Age", Age);
        }
        public void Write(IProjectionContext <T> context, IMediaNode node)
        {
            var value = context.Values.ValueFor(_accessor);

            if (value == null)
            {
                return;
            }

            var childNode = node.AddChild(_name);
            var runner    = typeof(ChildRunner <>).CloseAndBuildAs <IChildRunner>(value, value.GetType());

            runner.Project(context, childNode, node, _name);
        }
Example #5
0
        void IProjection <TParent> .Write(IProjectionContext <TParent> context, IMediaNode node)
        {
            var value = _source(context);

            if (value == null)
            {
                return;
            }

            var childNode = node.AddChild(_name);

            var childContext = context.ContextFor(value);

            write(childContext, childNode);
        }
Example #6
0
        void IProjection <TParent> .Write(IProjectionContext <TParent> context, IMediaNode node)
        {
            var value = context.ValueFor(_accessor) as TChild;

            if (value == null)
            {
                return;
            }

            var childNode = node.AddChild(_name);

            var childContext = context.ContextFor(value);

            write(childContext, childNode);
        }