Пример #1
0
 public CastNode(NodeBase target) : base(target)
 {
 }
Пример #2
0
        protected override NodeBase ReduceTerminalList(NodeBase node)
        {
            var values = node.GetTerminalValues <TIn>();

            return(CreateTerminal(values.Cast <TOut>()));
        }
Пример #3
0
 protected override NodeBase ReduceTerminalList(NodeBase node)
 {
     return(Null);
 }
Пример #4
0
 protected NodeBase(NodeBase target)
 {
     this.Target = target;
 }
Пример #5
0
 protected abstract NodeBase ReduceTerminalItem(NodeBase node);
Пример #6
0
 protected abstract NodeBase ReduceTerminalList(NodeBase node);
Пример #7
0
 public DistinctNode(NodeBase target) : this(target, null)
 {
 }
Пример #8
0
 public DistinctNode(NodeBase target, IEqualityComparer <TIn> equalityComparer)
     : base(target)
 {
     this.equalityComparer = equalityComparer ?? EqualityComparer <TIn> .Default;
 }
Пример #9
0
        protected override NodeBase ReduceTerminalItem(NodeBase node)
        {
            var value = node.GetTerminalValue <TIn>();

            return(value is TOut?CreateTerminal((TOut)(object)value) : Null);
        }
Пример #10
0
 public OfTypeNode(NodeBase target) : base(target)
 {
 }
Пример #11
0
        protected override NodeBase ReduceTerminalList(NodeBase node)
        {
            var values = node.GetTerminalValues <TIn>();

            return(CreateTerminal(values.Where(this.predicate)));
        }
Пример #12
0
        protected override NodeBase ReduceTerminalItem(NodeBase node)
        {
            var value = node.GetTerminalValue <TIn>();

            return(this.predicate(value) ? CreateTerminal(value) : Null);
        }
Пример #13
0
 public WhereNode(NodeBase target, Func <TIn, bool> predicate) : base(target)
 {
     this.predicate = predicate;
 }