internal override IEnumerable <Int32> Match(XLWorkbook.PivotTableInfo pti, IXLPivotTable pt)
 {
     return(new Int32[]
     {
         pt.Values.IndexOf(Value.ToString())
     });
 }
Пример #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());
        }
    }
Пример #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);