示例#1
0
        public ReferenceRange(Text.DvText meaning, DvInterval <T> range) : this()
        {
            this.meaning = meaning;
            this.range   = range;

            this.CheckInvariants();
        }
示例#2
0
        internal void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();
            reader.MoveToContent();

            Check.Assert(reader.LocalName == "meaning",
                         "Expected LocalName is meaning rather than " + reader.LocalName);
            if (this.meaning == null)
            {
                string meaningType = RmXmlSerializer.ReadXsiType(reader);
                if (meaningType == null)
                {
                    this.meaning = new DvText();
                }
                else
                {
                    this.meaning = RmFactory.DataValue(meaningType) as DvText;
                }
            }
            this.meaning.ReadXml(reader);

            DesignByContract.Check.Assert(reader.LocalName == "range",
                                          "Expected LocalName is range rather than " + reader.LocalName);
            if (this.range == null)
            {
                this.range = new DvInterval <T>();
            }
            this.range.ReadXml(reader);

            if (!reader.IsStartElement())
            {
                reader.ReadEndElement();
            }
            reader.MoveToContent();

            this.CheckInvariants();
        }