internal override IEnumerable <Int32> Match(XLWorkbook.PivotTableInfo pti, IXLPivotTable pt)
 {
     return(new Int32[]
     {
         pt.Values.IndexOf(Value.ToString())
     });
 }
Beispiel #2
0
        internal override IEnumerable <Int32> Match(XLWorkbook.PivotTableInfo pti, IXLPivotTable pt)
        {
            var values = pti.Fields[PivotField.SourceName].DistinctValues.ToList();

            if (predicate == null)
            {
                return new Int32[] { }
            }
            ;

            return(values.Select((Value, Index) => new { Value, Index })
                   .Where(v => predicate.Invoke(v.Value))
                   .Select(v => v.Index)
                   .ToList());
        }
    }
Beispiel #3
0
 /// <summary>
 ///   <P>Helper function used during saving to calculate the indices of the filtered values</P>
 /// </summary>
 /// <returns>Indices of the filtered values</returns>
 internal abstract IEnumerable <Int32> Match(XLWorkbook.PivotTableInfo pti, IXLPivotTable pt);