Esempio n. 1
0
 public static IVDomNode <T, TMessage> SetCollection <T, TMessage, TProp>(
     this IVDomNode <T, TMessage> node,
     Expression <Func <T, System.Collections.IEnumerable> > propertyExpression,
     params TProp[] value)
 {
     return(node.SetCollection(propertyExpression, value.AsEnumerable()));
 }
Esempio n. 2
0
 public static IVDomNode <T, TMessage> Subscribe <T, TKey, TMessage>(
     this IVDomNode <T, TMessage> node,
     Func <T, TKey> keyFn,
     Func <TKey, IObservable <TMessage> > fn)
 {
     return(node.AddSubscription(o => Sub.Create(keyFn(o), fn)));
 }
Esempio n. 3
0
 public static IVDomNode <T, TMessage> SetChildNodes <T, TMessage>(
     this IVDomNode <T, TMessage> node,
     Expression <Func <T, System.Collections.IList> > propertyExpression,
     params IVDomNode <TMessage>[] value)
 {
     return(node.SetChildNodes(propertyExpression, value.AsEnumerable()));
 }
Esempio n. 4
0
 public static IVDomNode <T, TMessage> Set <T, TMessage, TProp>(
     this IVDomNode <T, TMessage> node,
     Expression <Func <T, TProp> > propertyExpression,
     TProp value)
 {
     return(node.Set(propertyExpression, value, EqualityComparer <TProp> .Default));
 }
Esempio n. 5
0
 public static IVDomNode <T, TMessage> Subscribe <T, TKey, TMessage>(
     this IVDomNode <T, TMessage> node,
     TKey key,
     Func <TKey, IObservable <TMessage> > fn)
 {
     return(node.Subscribe(_ => key, fn));
 }
 public VDomNodeChildNodeProperty(
     PropertyInfo propertyInfo,
     IVDomNode <TValue, TMessage> value)
 {
     this.propertyInfo = propertyInfo;
     Value             = value;
 }
Esempio n. 7
0
 public static IVDomNode <T, TMessage> Attach <T, TMessage, TProp>(
     this IVDomNode <T, TMessage> node,
     DependencyProperty dependencyProperty,
     TProp value)
     where T : DependencyObject
 {
     return(node.Attach(dependencyProperty, value, EqualityComparer <TProp> .Default));
 }
Esempio n. 8
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)));
 }
Esempio n. 9
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)));
        }
Esempio n. 10
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())));
        }
Esempio n. 11
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)));
        }
Esempio n. 12
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)));
        }
Esempio n. 13
0
 public static IVDomNode <T, TMessage> Subscribe <T, TMessage>(
     this IVDomNode <T, TMessage> node,
     Func <T, IObservable <TMessage> > fn)
 {
     return(node.Subscribe(o => o, fn));
 }