Ejemplo n.º 1
0
 public static SingleReader <TRoot> ThenChildren <TRoot, TParent, TChild>(
     this SingleReader <TRoot> previous,
     RecordReader <TChild> recordReader,
     Func <TRoot, IEnumerable <TParent> > parents,
     Action <TParent, List <TChild> > into = null)
 {
     return(previous.ThenChildren(recordReader.GroupByAuto <TParent, object>(), parents, null, into));
 }
Ejemplo n.º 2
0
 public static SingleReader <T1> ThenChildren <T1, T2, TId>(
     this SingleReader <T1> previous,
     RecordReader <T2> recordReader,
     Func <T1, TId> id,
     Action <T1, List <T2> > into = null)
 {
     return(previous.ThenChildren(recordReader.GroupByAuto <T1, TId>(), id, into));
 }
Ejemplo n.º 3
0
        public static SingleReader <T1> ThenChildren <T1, T2>(
            this SingleReader <T1> previous,
            IRecordReader <T2> recordReader,
            Action <T1, List <T2> > into = null)
        {
            if (previous == null)
            {
                throw new ArgumentNullException("previous");
            }
            if (recordReader == null)
            {
                throw new ArgumentNullException("recordReader");
            }

            return(previous.AddChild(new SingleChildren <T1, T2>(recordReader, new SingleChildMapper <T1, T2>(into))));
        }
Ejemplo n.º 4
0
        public static SingleReader <TRoot> ThenChildren <TRoot, TParent, TChild>(
            this SingleReader <TRoot> previous,
            RecordReader <TChild> recordReader,
            Func <TRoot, IEnumerable <TParent> > parents,
            Action <TParent, List <TChild> > into = null)
        {
            if (previous == null)
            {
                throw new ArgumentNullException("previous");
            }
            if (recordReader == null)
            {
                throw new ArgumentNullException("recordReader");
            }

            return(previous.ThenChildren(recordReader.GroupByAuto <TParent, object>(), parents, null, into));
        }
Ejemplo n.º 5
0
        public static SingleReader <T1> ThenChildren <T1, T2, TId>(
            this SingleReader <T1> previous,
            RecordReader <T2> recordReader,
            Func <T1, TId> id,
            Action <T1, List <T2> > into = null)
        {
            if (previous == null)
            {
                throw new ArgumentNullException("previous");
            }
            if (recordReader == null)
            {
                throw new ArgumentNullException("recordReader");
            }

            return(previous.ThenChildren(recordReader.GroupByAuto <T1, TId>(), id, into));
        }
Ejemplo n.º 6
0
        public static SingleReader <T1> ThenChildren <T1, T2, TId>(
            this SingleReader <T1> previous,
            IChildRecordReader <T2> recordReader,
            Func <T1, TId> id,
            Action <T1, List <T2> > into = null)
        {
            if (previous == null)
            {
                throw new ArgumentNullException("previous");
            }
            if (recordReader == null)
            {
                throw new ArgumentNullException("recordReader");
            }

            return(previous.AddChild(new Children <T1, T2, TId>(recordReader.GetGuardianReader <TId>(), new ChildMapper <T1, T2, TId>(id, into))));
        }
Ejemplo n.º 7
0
        public static SingleReader <TRoot> ThenChildren <TRoot, TParent, TChild, TId>(
            this SingleReader <TRoot> previous,
            IChildRecordReader <TChild, TId> recordReader,
            Func <TRoot, IEnumerable <TParent> > parents,
            Func <TParent, TId> id = null,
            Action <TParent, List <TChild> > into = null)
        {
            if (previous == null)
            {
                throw new ArgumentNullException("previous");
            }
            if (recordReader == null)
            {
                throw new ArgumentNullException("recordReader");
            }

            return(previous.AddChild(new Children <TRoot, TChild, TId>(recordReader, new ChildMapper <TRoot, TParent, TChild, TId>(parents, id, into))));
        }