Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="fixedRecordDataElement"></param>
        public HLAFixedRecordData(System.Xml.XmlElement fixedRecordDataElement)
            : base(fixedRecordDataElement)
        {
            Encoding       = fixedRecordDataElement.GetAttribute("encoding");
            EncodingNotes  = fixedRecordDataElement.GetAttribute("encodingNotes");
            Semantics      = ReplaceNewLines(fixedRecordDataElement.GetAttribute("semantics"));
            SemanticsNotes = fixedRecordDataElement.GetAttribute("semanticsNotes");

            System.Xml.XmlNodeList nl = fixedRecordDataElement.GetElementsByTagName("field");
            for (int i = 0; i < nl.Count; i++)
            {
                System.Xml.XmlElement enumeratorElement = (System.Xml.XmlElement)nl.Item(i);
                HLARecordField        field             = new HLARecordField(enumeratorElement);
                fields.Add(field);
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fixedRecordDataElement"></param>
        public HLAFixedRecordData(System.Xml.XmlElement fixedRecordDataElement)
            : base(fixedRecordDataElement)
        {
            Encoding = fixedRecordDataElement.GetAttribute("encoding");
            EncodingNotes = fixedRecordDataElement.GetAttribute("encodingNotes");
            Semantics = ReplaceNewLines(fixedRecordDataElement.GetAttribute("semantics"));
            SemanticsNotes = fixedRecordDataElement.GetAttribute("semanticsNotes");

            System.Xml.XmlNodeList nl = fixedRecordDataElement.GetElementsByTagName("field");
            for (int i = 0; i < nl.Count; i++)
            {
                System.Xml.XmlElement enumeratorElement = (System.Xml.XmlElement)nl.Item(i);
                HLARecordField field = new HLARecordField(enumeratorElement);
                fields.Add(field);
            }
        }
Exemple #3
0
 /// <summary> 
 /// Generates a <code>HLARecordFieldAttribute</code>.
 /// </summary>
 private void GenerateHLARecordFieldAttribute(int localIndentLevel, System.IO.StreamWriter ps, HLARecordField field)
 {
     string indentStr = GenerateIndentString(localIndentLevel);
     string newLine = "," + Environment.NewLine + indentStr + "                ";
     ps.Write(indentStr + "[HLARecordField(Name = \"" + field.Name + "\"");
     if (!String.IsNullOrEmpty(field.DataType))
     {
         ps.Write(newLine);
         ps.Write("DataType = \"" + field.DataType + "\"");
     }
     if (!String.IsNullOrEmpty(field.DataTypeNotes))
     {
         ps.Write(newLine);
         ps.Write("DataTypeNotes = \"" + field.DataTypeNotes + "\"");
     }
     if (!String.IsNullOrEmpty(field.Semantics))
     {
         ps.Write(newLine);
         ps.Write("Semantics = \"" + field.Semantics + "\"");
     }
     if (!String.IsNullOrEmpty(field.SemanticsNotes))
     {
         ps.Write(newLine);
         ps.Write("SemanticsNotes = \"" + field.SemanticsNotes + "\"");
     }
     if (!String.IsNullOrEmpty(field.NameNotes))
     {
         ps.Write(newLine);
         ps.Write("NameNotes = \"" + field.NameNotes + "\"");
     }
     ps.WriteLine(")]");
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 public HLARecordFieldAttribute()
 {
     baseInfo = new HLARecordField();
 }
Exemple #5
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 public HLARecordFieldAttribute()
 {
     baseInfo = new HLARecordField();
 }