Beispiel #1
0
        protected override void ElementLoader(XElement stbElem, StbVersion version, string xmlns)
        {
            base.ElementLoader(stbElem, version, xmlns);
            switch (version)
            {
            case StbVersion.Ver1:
                IdNodeStart.Add((int)stbElem.Attribute("idNode_start"));
                IdNodeEnd.Add((int)stbElem.Attribute("idNode_end"));
                break;

            case StbVersion.Ver2:
                IdNodeStart.Add((int)stbElem.Attribute("id_node_start"));
                IdNodeEnd.Add((int)stbElem.Attribute("id_node_end"));
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(version), version, "The STB version is not set");
            }

            if (stbElem.Attribute("level") != null)
            {
                Level.Add((double)stbElem.Attribute("level"));
            }
            else
            {
                Level.Add(0d);
            }
        }
Beispiel #2
0
        protected override void ElementLoader(XElement stbElem, StbVersion version, string xmlns)
        {
            base.ElementLoader(stbElem, version, xmlns);
            switch (version)
            {
            case StbVersion.Ver1:
                IdNodeStart.Add((int)stbElem.Attribute("idNode_bottom"));
                IdNodeEnd.Add((int)stbElem.Attribute("idNode_top"));
                break;

            case StbVersion.Ver2:
                IdNodeStart.Add((int)stbElem.Attribute("id_node_bottom"));
                IdNodeEnd.Add((int)stbElem.Attribute("id_node_top"));
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(version), version, "The STB version is not set");
            }
        }