internal TupleSet ToTupleSet() { var ts = new TupleSet(); if (Tuples.Count > 0) { ts.Count = (uint)Tuples.Count; } ts.MaxRank = MaxRank; ts.SetDefinition = SetDefinition; if (SortType != SortValues.None) { ts.SortType = SortType; } if (QueryFailed) { ts.QueryFailed = QueryFailed; } if (Tuples.Count > 0) { foreach (var tt in Tuples) { ts.Append(tt.ToTuples()); } } if (HasSortByTuple) { ts.Append(SortByTuple.ToSortByTuple()); } return(ts); }
internal SortByTuple ToSortByTuple() { var sbt = new SortByTuple(); if (MemberNameCount != null) { sbt.MemberNameCount = MemberNameCount.Value; } foreach (var t in Tuples) { sbt.Append(t.ToTuple()); } return(sbt); }
internal SortByTuple ToSortByTuple() { SortByTuple sbt = new SortByTuple(); if (this.MemberNameCount != null) { sbt.MemberNameCount = this.MemberNameCount.Value; } foreach (SLTuple t in this.Tuples) { sbt.Append(t.ToTuple()); } return(sbt); }
internal void FromSortByTuple(SortByTuple sbt) { this.SetAllNull(); if (sbt.MemberNameCount != null) this.MemberNameCount = sbt.MemberNameCount.Value; SLTuple t; using (OpenXmlReader oxr = OpenXmlReader.Create(sbt)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Tuple)) { t = new SLTuple(); t.FromTuple((Tuple)oxr.LoadCurrentElement()); this.Tuples.Add(t); } } } }
internal SLTupleSet Clone() { var ts = new SLTupleSet(); ts.MaxRank = MaxRank; ts.SetDefinition = SetDefinition; ts.SortType = SortType; ts.QueryFailed = QueryFailed; ts.Tuples = new List <SLTuplesType>(); foreach (var tt in Tuples) { ts.Tuples.Add(tt.Clone()); } ts.HasSortByTuple = HasSortByTuple; ts.SortByTuple = SortByTuple.Clone(); return(ts); }
internal void FromTupleSet(TupleSet ts) { SetAllNull(); if (ts.MaxRank != null) { MaxRank = ts.MaxRank.Value; } if (ts.SetDefinition != null) { SetDefinition = ts.SetDefinition.Value; } if (ts.SortType != null) { SortType = ts.SortType.Value; } if (ts.QueryFailed != null) { QueryFailed = ts.QueryFailed.Value; } SLTuplesType tt; using (var oxr = OpenXmlReader.Create(ts)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Tuples)) { tt = new SLTuplesType(); tt.FromTuples((Tuples)oxr.LoadCurrentElement()); Tuples.Add(tt); } else if (oxr.ElementType == typeof(SortByTuple)) { SortByTuple.FromSortByTuple((SortByTuple)oxr.LoadCurrentElement()); HasSortByTuple = true; } } } }
internal void FromSortByTuple(SortByTuple sbt) { SetAllNull(); if (sbt.MemberNameCount != null) { MemberNameCount = sbt.MemberNameCount.Value; } SLTuple t; using (var oxr = OpenXmlReader.Create(sbt)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Tuple)) { t = new SLTuple(); t.FromTuple((Tuple)oxr.LoadCurrentElement()); Tuples.Add(t); } } } }
internal SortByTuple ToSortByTuple() { SortByTuple sbt = new SortByTuple(); if (this.MemberNameCount != null) sbt.MemberNameCount = this.MemberNameCount.Value; foreach (SLTuple t in this.Tuples) { sbt.Append(t.ToTuple()); } return sbt; }