add vista genomics to the tool
This commit is contained in:
11
BGS/LogGenerator/LogFormatter.cs
Normal file
11
BGS/LogGenerator/LogFormatter.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EliteBGS.BGS.LogGenerator {
|
||||
public interface LogFormatter {
|
||||
string GenerateLog(Objective objective);
|
||||
}
|
||||
}
|
||||
22
BGS/LogGenerator/VistaGenomics.cs
Normal file
22
BGS/LogGenerator/VistaGenomics.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace EliteBGS.BGS.LogGenerator {
|
||||
class VistaGenomics : LogFormatter {
|
||||
public string GenerateLog(Objective objective) {
|
||||
IEnumerable<OrganicData> logs = objective.LogEntries.OfType<OrganicData>();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
if (logs == null || logs.Count() < 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
foreach(OrganicData log in logs) {
|
||||
builder.AppendLine(log.ToString());
|
||||
}
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user