public void AddCanalPointResult(string canalStretchId, double x, double waterLevel) { if (!CanalStretchResults.ContainsKey(canalStretchId)) { CanalStretchResults.Add(canalStretchId, new CanalStretchResult()); } CanalStretchResults[canalStretchId].CanalPointResults.Add(new CanalPointResult(x, waterLevel)); }
public void AddRangeCanalPointResult(string canalStretchId, List <CanalPointResult> canalPointResults) { if (!CanalStretchResults.ContainsKey(canalStretchId)) { CanalStretchResults.Add(canalStretchId, new CanalStretchResult()); } CanalStretchResults[canalStretchId].CanalPointResults.AddRange(canalPointResults); }
public CanalStretchResult GetCanalStretchResult(string canalStretchId) { if (CanalStretchResults.TryGetValue(canalStretchId, out CanalStretchResult result)) { return(result); } else { result = new CanalStretchResult(); CanalStretchResults.Add(canalStretchId, result); return(result); } }