Ejemplo n.º 1
0
        public int CompareDate(GeneDiseaseValidityItem other)
        {
            var date      = DateTime.ParseExact(_classificationDate, "yyyy-MM-dd", CultureInfo.InvariantCulture);
            var otherDate = DateTime.ParseExact(other._classificationDate, "yyyy-MM-dd", CultureInfo.InvariantCulture);

            return(date.CompareTo(otherDate));
        }
 private static void AddLatest(Dictionary <string, GeneDiseaseValidityItem> annotations, GeneDiseaseValidityItem geneAnnotation)
 {
     if (!annotations.TryGetValue(geneAnnotation.DiseaseId, out var diseaseItem))
     {
         annotations.Add(geneAnnotation.DiseaseId, geneAnnotation);
     }
     else
     {
         if (diseaseItem.CompareDate(geneAnnotation) < 0)
         {
             annotations[geneAnnotation.DiseaseId] = geneAnnotation;
         }
     }
 }