Пример #1
0
        internal DataSet Build()
        {
            var builtDataSet = new DataSet(_projectAndCommitUrl);

            if (_includeClasses)
            {
                builtDataSet.AddInstances(BuildClasses());
            }
            if (_includeMembers)
            {
                builtDataSet.AddInstances(BuildMembers());
            }
            return(builtDataSet);
        }
Пример #2
0
        /// <summary>
        /// This logic is highly dependent on the appropriate excel file structure.
        /// It examines excel documents in the sourceFolder directory and its subdirectories.
        /// The excel documents must be formatted following these guidelines https://github.com/Clean-CaDET/platform/wiki/Dataset-Explorer#building-your-dataset
        /// </summary>
        /// <param name="dataSetName">Name of the returned dataset.</param>
        /// <returns>A dataset constructed from one or more excel documents.</returns>
        public DataSet Import(string dataSetName)
        {
            var dataSet = new DataSet(dataSetName);

            var sheets = GetWorksheets(GetExcelDocuments());

            foreach (var excelWorksheet in sheets)
            {
                dataSet.AddInstances(ExtractInstances(excelWorksheet));
            }

            return(dataSet);
        }