示例#1
0
 public TaggedOefOifArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     arrays = new TaggedOefOifArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (MdwsUtils.isException(t.GetValue(i)))
         {
             fault = new FaultTO((Exception)t.GetValue(i));
         }
         else if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedOefOifArray((string)t.GetKey(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedOefOifArray((string)t.GetKey(i), (OEF_OIF[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedOefOifArray((string)t.GetKey(i), (OEF_OIF)t.GetValue(i));
         }
     }
     count = t.Count;
 }
 public TaggedMentalHealthInstrumentAdministrationArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     arrays = new TaggedMentalHealthInstrumentAdministrationArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i), (MentalHealthInstrumentAdministration[])t.GetValue(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             fault = new FaultTO((Exception)t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedMentalHealthInstrumentAdministrationArray((string)t.GetKey(i), (List <MentalHealthInstrumentAdministration>)t.GetValue(i));
         }
     }
     count = t.Count;
 }
示例#3
0
 public UserSecurityKeyTO(AbstractPermission p)
 {
     if (p.Type != PermissionType.SecurityKey)
     {
         fault = new FaultTO(p.Name + " is not a Security Key");
         return;
     }
     this.id   = p.PermissionId;
     this.name = p.Name;
 }
示例#4
0
 public TaggedPersonArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     if (t.Count == 1 && MdwsUtils.isException(t.GetValue(0)))
     {
         fault = new FaultTO((Exception)t.GetValue(0));
         return;
     }
     arrays = new TaggedPersonArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         string ky = (string)t.GetKey(i);
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedPersonArray(ky);
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedPersonArray(ky, (Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedPersonArray(ky, (Person[])t.GetValue(i));
         }
         else if (t.GetValue(i).GetType().IsInstanceOfType(new List <Person>()))
         {
             arrays[i] = new TaggedPersonArray(ky, (List <Person>)t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedPersonArray(ky, (Person)t.GetValue(i));
         }
     }
     count = t.Count;
 }
示例#5
0
 public TaggedPatientArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     if (t.Count == 1 && MdwsUtils.isException(t.GetValue(0)))
     {
         fault = new FaultTO((Exception)t.GetValue(0));
         return;
     }
     arrays = new TaggedPatientArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedPatientArray((string)t.GetKey(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedPatientArray((string)t.GetKey(i), (Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType() == typeof(System.Collections.Hashtable))
         {
             arrays[i] = new TaggedPatientArray((string)t.GetKey(i), ((System.Collections.Hashtable)t.GetValue(i))["demographics"] as Patient);
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedPatientArray((string)t.GetKey(i), (Patient[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedPatientArray((string)t.GetKey(i), (Patient)t.GetValue(i));
         }
     }
     count = t.Count;
 }
示例#6
0
 public DataSourceArray(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     items = new DataSourceTO[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i).GetType().IsAssignableFrom(typeof(Exception)))
         {
             fault = new FaultTO((Exception)t.GetValue(i));
         }
         //else if (t.GetValue(i) == null)
         //{
         //    items[i] = new TaggedAdtArray((string)t.GetKey(i));
         //}
         else
         {
             items[i] = new DataSourceTO((DataSource)t.GetValue(i));
         }
     }
     count = items.Length;
 }
示例#7
0
 public TaggedFault(string tag, Exception exc)
 {
     this.tag   = tag;
     this.fault = new FaultTO(exc);
 }