コード例 #1
0
 public OutputData Analyze(InputData inputData)
 {
     return new OutputData
     {
         Rows = Aggregate(inner.Analyze(inputData), inputData)
     };
 }
コード例 #2
0
        private IEnumerable<string> GetDataLines(InputData data)
        {
            yield return string.Join(",", data.Configuration.GetAllHeaders());

            foreach (var row in data.Rows)
            {
                yield return string.Join(",", row);
            }
        }
コード例 #3
0
        private IEnumerable<IEnumerable<string>> Aggregate(OutputData data, InputData inputData)
        {
            var groups =
                ExtractGroupCombinations(inputData.Configuration.GroupVariables.ToList())
                    .Distinct(comparer)
                    .ToList();
            var tables = GetTables(data).ToList();

            yield return GetHeaders(groups.SelectMany(g => g.Select(t => t.Name)).Distinct(), tables.First());

            for (var i = 0; i < groups.Count; i++)
            {
                yield return GetRow(groups[i], tables[i]);
            }
        }
コード例 #4
0
 public OutputData Analyze(InputData inputData, AnalyzeType analyzeType)
 {
     return AnalyzeCommandFactory.CreateCommand(analyzeType, directory).Analyze(inputData);
 }
コード例 #5
0
        public string WriteToFile(InputData data, string filePath)
        {
            var lines = GetDataLines(data);

            return WriteLinesToFile(lines, filePath);
        }
コード例 #6
0
 public AnalyzeDataMessage(InputData inputData, AnalyzeType type)
 {
     InputData = inputData;
     Type = type;
 }