Пример #1
0
        public override int Read(System.Xml.XmlReader reader)
        {
            int depth = reader.Depth;

            while (reader.Read())
            {
                int ret = 0;

                if ((reader.NodeType == XmlNodeType.Comment) ||
                    (reader.NodeType == XmlNodeType.Whitespace))
                {
                    continue;
                }

                if ((string.Compare(reader.Name, Name) == 0) &&
                    (reader.NodeType == XmlNodeType.EndElement) &&
                    (reader.Depth == depth))
                {
                    return(0);
                }
                else if (string.Compare(reader.Name, aECGControlVariable.ControlVariableName) == 0)
                {
                    aECGControlVariable var = new aECGControlVariable();

                    ret = var.Read(reader);

                    if (ret == 0)
                    {
                        ControlVariable = var;
                    }
                }
                else if (string.Compare(reader.Name, aECGRelatedObservation.RelatedObservationName) == 0)
                {
                    aECGRelatedObservation robs = new aECGRelatedObservation();

                    ret = robs.Read(reader);

                    if (ret == 0)
                    {
                        RelatedObservation = robs;
                    }
                }
                else if (string.Compare(reader.Name, aECGRelatedObservation.RelatedObservationName) == 0)
                {
                    aECGTransactionType tt = new aECGTransactionType();

                    ret = tt.Read(reader);

                    if (ret == 0)
                    {
                        TransactionType = tt;
                    }
                }
                else
                {
                    ret = aECGElement.ReadOne(this, reader);
                }

                if (ret != 0)
                {
                    return(ret > 0 ? 1 + ret : ret);
                }
            }

            return(-1);
        }
Пример #2
0
 public aECGControlVariableHolder(aECGRelatedObservation robs) : base(ControlVariableHolderName)
 {
     RelatedObservation = robs;
 }