Exemplo n.º 1
0
 public void AddObservation(int timestamp, string data)
 {
     var obsToCheck = new Observation(timestamp);
     if (this.ObservationList.ContainsKey(obsToCheck))
     {
         this.ObservationList[obsToCheck].Data = data;
     }
     else {
         var obs = new Observation(timestamp, data);
         this.ObservationList.Add(obs, obs);
     }
 }
Exemplo n.º 2
0
        public Observation GetObservation(int timestamp)
        {
            var observation = new Observation(timestamp);
            if (this.ObservationList.ContainsKey(observation))
            {
                observation = this.ObservationList[observation];
            }
            else {
                observation = this.GetPriorObservation(timestamp);
            }

            return observation;
        }