コード例 #1
0
        /// <summary>
        /// Configures the statistics for the specified <typeparamref name="TModel"/>. Only for vertical, not for horizontal statistics.
        /// </summary>
        /// <returns>The <see cref="FluentConfiguration{TModel}"/>.</returns>
        /// <param name="name">The statistics name. (e.g. Total). In current version, the default name location is (last row, first cell)</param>
        /// <param name="formula">The cell formula, such as SUM, AVERAGE and so on, which applyable for vertical statistics..</param>
        /// <param name="columnIndexes">The column indexes for statistics. if <paramref name="formula"/>is SUM, and <paramref name="columnIndexes"/> is [1,3],
        /// for example, the column No. 1 and 3 will be SUM for first row to last row.</param>
        public FluentConfiguration <TModel> HasStatisticsHead(string name, string formula, int startCell, int endCell, int rows)
        {
            var statistics = new StatisticsHeadConfig
            {
                Name      = name,
                Formula   = formula,
                Rows      = rows,
                StartCell = startCell,
                EndCell   = endCell
            };

            _statisticsHeadConfigs.Add(statistics);

            return(this);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatisticsAttribute"/> class.
 /// </summary>
 public StatisticsHeadAttribute()
 {
     StatisticsConfig = new StatisticsHeadConfig();
 }