public TaggedDemographicsRecordArray(string tag, DemographicsRecord[] rex)
 {
     this.tag = tag;
     if (rex == null)
     {
         this.count = 0;
         return;
     }
     this.rex = rex;
     this.count = rex.Length;
 }
Exemple #2
0
 internal IndexedHashtable removeDups(IndexedHashtable t)
 {
     IndexedHashtable result = new IndexedHashtable();
     for (int i = 0; i < t.Count; i++)
     {
         string source = (string)t.GetKey(i);
         if (t.GetValue(i) == null)
         {
             result.Add(source, null);
             continue;
         }
         if (t.GetValue(i).GetType().Name.EndsWith("Exception"))
         {
             gov.va.medora.mdo.exceptions.MdoException e = new gov.va.medora.mdo.exceptions.MdoException(
                 gov.va.medora.mdo.exceptions.MdoExceptionCode.DATA_INVALID, (Exception)t.GetValue(i));
             result.Add(source,e);
             continue;
         }
         List<Person> persons = (List<Person>)t.GetValue(i);
         List<DemographicsRecord> rex = new List<DemographicsRecord>(persons.Count);
         Hashtable ht = new Hashtable(persons.Count);
         foreach (Person p in persons)
         {
             PersonTO pto = new PersonTO(p);
             DemographicsRecord rec = new DemographicsRecord(pto, source);
             long hashcode = new TOReflection.TOEqualizer(rec).HashCode;
             if (!ht.ContainsKey(hashcode))
             {
                 ht.Add(hashcode, rec);
                 rex.Add(rec);
             }
         }
         result.Add(source, rex);
     }
     return result;
 }