Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcelStrategyReport"/>.
 /// </summary>
 /// <param name="provider">Excel provider.</param>
 /// <param name="strategy">The strategy, requiring the report generation.</param>
 /// <param name="fileName">The name of the file, in which report is generated in the Excel format.</param>
 public ExcelStrategyReport(IExcelWorkerProvider provider, Strategy strategy, string fileName)
     : this(provider, new[] { strategy }, fileName)
 {
     if (strategy == null)
     {
         throw new ArgumentNullException(nameof(strategy));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExcelStrategyReport"/>.
        /// </summary>
        /// <param name="provider">Excel provider.</param>
        /// <param name="strategies">Strategies, requiring the report generation.</param>
        /// <param name="fileName">The name of the file, in which report is generated in the Excel format.</param>
        public ExcelStrategyReport(IExcelWorkerProvider provider, IEnumerable <Strategy> strategies, string fileName)
            : base(strategies, fileName)
        {
            _provider = provider ?? throw new ArgumentNullException(nameof(provider));

            ExcelVersion  = 2007;
            IncludeOrders = true;
            Decimals      = 2;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExcelStrategyReport"/>.
        /// </summary>
        /// <param name="provider">Excel provider.</param>
        /// <param name="strategies">Strategies, requiring the report generation.</param>
        /// <param name="fileName">The name of the file, in which report is generated in the Excel format.</param>
        /// <param name="template">The template file, to be copied into <see cref="StrategyReport.FileName"/>.</param>
        public ExcelStrategyReport(IExcelWorkerProvider provider, IEnumerable <Strategy> strategies, string fileName, string template)
            : this(provider, strategies, fileName)
        {
            if (template.IsEmpty())
            {
                throw new ArgumentNullException(nameof(template));
            }

            Template = template;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcelExporter"/>.
 /// </summary>
 /// <param name="provider">Excel provider.</param>
 /// <param name="dataType">Data type info.</param>
 /// <param name="isCancelled">The processor, returning process interruption sign.</param>
 /// <param name="fileName">The path to file.</param>
 /// <param name="breaked">The processor, which will be called if maximal value of strings is exceeded.</param>
 public ExcelExporter(IExcelWorkerProvider provider, DataType dataType, Func <int, bool> isCancelled, string fileName, Action breaked)
     : base(dataType, isCancelled, fileName)
 {
     _provider = provider ?? throw new ArgumentNullException(nameof(provider));
     _breaked  = breaked ?? throw new ArgumentNullException(nameof(breaked));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcelExporter"/>.
 /// </summary>
 /// <param name="provider">Excel provider.</param>
 /// <param name="security">Security.</param>
 /// <param name="arg">The data parameter.</param>
 /// <param name="isCancelled">The processor, returning process interruption sign.</param>
 /// <param name="fileName">The path to file.</param>
 /// <param name="breaked">The processor, which will be called if maximal value of strings is exceeded.</param>
 public ExcelExporter(IExcelWorkerProvider provider, Security security, object arg, Func <int, bool> isCancelled, string fileName, Action breaked)
     : base(security, arg, isCancelled, fileName)
 {
     _provider = provider ?? throw new ArgumentNullException(nameof(provider));
     _breaked  = breaked ?? throw new ArgumentNullException(nameof(breaked));
 }