Beispiel #1
0
 public void RegisterResult(AggregationResult localResult)
 {
     foreach (var(key, value) in localResult.Contributions)
     {
         GlobalResult.RegisterContribution(key, value);
     }
 }
Beispiel #2
0
        public static AggregationResult Parse(string output)
        {
            var result = new AggregationResult();

            foreach (var match in output
                     .Split("\n", StringSplitOptions.RemoveEmptyEntries)
                     .Select(line => line.Substring(0, line.IndexOf(')') + 1))
                     .Select(metadata => LineRegex.Match(metadata))
                     )
            {
                if (!match.Success)
                {
                    Console.WriteLine("ERROR");
                }

                string name = match.Groups["name"].Value.Trim();
                result.RegisterContribution(name);
            }

            return(result);
        }