Beispiel #1
0
 /// <summary>
 /// Constructor where each dependent component can be passed as input.
 /// This is useful in the unit tests.
 /// </summary>
 /// <param name="jester">Reference to the component which holds data and predicts precipitation</param>
 /// <param name="ingester">Reference to the component which ingests data</param>
 /// <param name="outgester">Reference to the component which serializes precipitation data to JSON</param>
 public DigestionProcess(Jester jester, Ingester ingester, Outgester outgester)
 {
     DataCollector  = jester;
     DataIngester   = ingester;
     JsonSerializer = outgester;
 }
Beispiel #2
0
 /// <summary>
 /// Constructor where dependencies are passed as input
 /// </summary>
 /// <param name="collector">Reference to the class which holds the ingested precipitation data</param>
 /// <param name="importer">Reference to the class which imports data from a text file</param>
 public Ingester(Jester collector, FileContentImporter importer)
 {
     this.Collector = collector;
     this.Importer  = importer;
 }
Beispiel #3
0
 /// <summary>
 /// Default constructor. Each dependent component is constructed.
 /// </summary>
 public DigestionProcess()
 {
     DataCollector  = new Jester();
     DataIngester   = new Ingester(DataCollector, new FileContentImporter());
     JsonSerializer = new Outgester();
 }