Example #1
0
        /// <summary>
        /// 检查所有的表格配置。
        /// </summary>
        private void CheckAllTable()
        {
            List <Task> tasks = new List <Task>();

            foreach (var table in _excelDataTables.Values)
            {
                tasks.Add(
                    Task.Factory.StartNew(
                        () =>
                {
                    ExcelDataTableCheck check = new ExcelDataTableCheck(this, table);
                    check.CheckDataTable();
                }, CancellationToken.None, TaskCreationOptions.PreferFairness, _scheduler
                        )
                    );
            }

            Task.WaitAll(tasks.ToArray());
        }
Example #2
0
        public void LoadTest()
        {
            BeforeLoad();

            _selectExcelFileInfos = FilterFile(_excelExcelDataDirectory, ExcelContext.ExcelSuffix);

            LoadAllEnumTables();

            LoadDataTable();

            CheckAllTable();

            foreach (var table in _excelDataTables.Values)
            {
                if (table.DataFileName.Contains("static_vip_template"))
                {
                    ExcelDataTableCheck check = new ExcelDataTableCheck(this, table);
                    check.CheckDataTable();
                }
            }
        }