Ejemplo n.º 1
0
 public static IVDomNode <T, TMessage> Attach <T, TMessage, TProp>(
     this IVDomNode <T, TMessage> node,
     DependencyProperty dependencyProperty,
     TProp value,
     IEqualityComparer <TProp> equalityComparer)
     where T : DependencyObject
 {
     return(node.AddProperty(new VDomNodeAttachedProperty <T, TMessage, TProp>(dependencyProperty, value, equalityComparer)));
 }
Ejemplo n.º 2
0
        public static IVDomNode <T, TMessage> SetCollection <T, TMessage, TProp>(
            this IVDomNode <T, TMessage> node,
            Expression <Func <T, System.Collections.IEnumerable> > propertyExpression,
            IEnumerable <TProp> value)
        {
            var propertyInfo = (PropertyInfo)((MemberExpression)propertyExpression.Body).Member;

            return(node.AddProperty(new VDomNodeChildSequenceProperty <T, TMessage, TProp>(propertyInfo, value.ToImmutableList(), EqualityComparer <TProp> .Default)));
        }
Ejemplo n.º 3
0
        public static IVDomNode <T, TMessage> Set <T, TMessage, TProp>(
            this IVDomNode <T, TMessage> node,
            Expression <Func <T, TProp> > propertyExpression,
            IVDomNode <TProp, TMessage> value)
        {
            var propertyInfo = (PropertyInfo)((MemberExpression)propertyExpression.Body).Member;

            return(node.AddProperty(new VDomNodeChildNodeProperty <T, TMessage, TProp>(propertyInfo, value)));
        }
Ejemplo n.º 4
0
        public static IVDomNode <T, TMessage> SetChildNodes <T, TMessage>(
            this IVDomNode <T, TMessage> node,
            Expression <Func <T, System.Collections.IList> > propertyExpression,
            IEnumerable <IVDomNode <TMessage> > value)
        {
            var propertyInfo = (PropertyInfo)((MemberExpression)propertyExpression.Body).Member;

            return(node.AddProperty(new VDomNodeChildNodeCollectionProperty <T, TMessage>(propertyInfo, value.ToImmutableList())));
        }
Ejemplo n.º 5
0
        public static IVDomNode <T, TMessage> Set <T, TMessage, TProp>(
            this IVDomNode <T, TMessage> node,
            Expression <Func <T, TProp> > propertyExpression,
            TProp value,
            IEqualityComparer <TProp> equalityComparer)
        {
            var propertyInfo = (PropertyInfo)((MemberExpression)propertyExpression.Body).Member;

            return(node.AddProperty(new VDomNodeSimpleProperty <T, TMessage, TProp>(propertyInfo, value, equalityComparer)));
        }