/// <summary>Parse common data in profile structure (eg SegGroup, Segment) </summary> private void parseProfileStuctureData(ProfileStructure struct_Renamed, System.Xml.XmlElement elem) { struct_Renamed.Name = elem.GetAttribute("Name"); struct_Renamed.LongName = elem.GetAttribute("LongName"); struct_Renamed.Usage = elem.GetAttribute("Usage"); System.String min = elem.GetAttribute("Min"); System.String max = elem.GetAttribute("Max"); try { struct_Renamed.Min = System.Int16.Parse(min); if (max.IndexOf('*') >= 0) { struct_Renamed.Max = (short)(-1); } else { struct_Renamed.Max = System.Int16.Parse(max); } } catch (System.FormatException e) { throw new NuGenProfileException("Min and max must be short integers: " + min + ", " + max, e); } struct_Renamed.ImpNote = getValueOfFirstElement("ImpNote", elem); struct_Renamed.Description = getValueOfFirstElement("Description", elem); struct_Renamed.Reference = getValueOfFirstElement("Reference", elem); struct_Renamed.Predicate = getValueOfFirstElement("Predicate", elem); }
/// <summary>Parse common data in profile structure (eg SegGroup, Segment) </summary> private void parseProfileStuctureData(ProfileStructure struct_Renamed, System.Xml.XmlElement elem) { struct_Renamed.Name = elem.GetAttribute("Name"); struct_Renamed.LongName = elem.GetAttribute("LongName"); struct_Renamed.Usage = elem.GetAttribute("Usage"); System.String min = elem.GetAttribute("Min"); System.String max = elem.GetAttribute("Max"); try { struct_Renamed.Min = System.Int16.Parse(min); if (max.IndexOf('*') >= 0) { struct_Renamed.Max = (short) (- 1); } else { struct_Renamed.Max = System.Int16.Parse(max); } } catch (System.FormatException e) { throw new NuGenProfileException("Min and max must be short integers: " + min + ", " + max, e); } struct_Renamed.ImpNote = getValueOfFirstElement("ImpNote", elem); struct_Renamed.Description = getValueOfFirstElement("Description", elem); struct_Renamed.Reference = getValueOfFirstElement("Reference", elem); struct_Renamed.Predicate = getValueOfFirstElement("Predicate", elem); }