Exemplo n.º 1
0
        protected override void AddNewFieldElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            string tagName = reader.Name;

            switch (tagName)
            {
            case GroupElement.ElementName:
                BaseAdd(FieldElementBase.Create <GroupElement>(reader));
                break;

            case FieldElement.ElementName:
                BaseAdd(FieldElementBase.Create <FieldElement>(reader));
                break;

            case LoopElement.ElementName:
                BaseAdd(FieldElementBase.Create <LoopElement>(reader));
                break;

            case ConstantElement.ElementName:
                BaseAdd(FieldElementBase.Create <ConstantElement>(reader));
                break;

            default:
                throw new ConfigurationErrorsException(Invariant($"Unsupported tag '{tagName}'"));
            }
        }
        private void AddNewFieldElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            string tagName = reader.Name;

            switch (tagName)
            {
            case CaseElement.ElementName:
                Add(FieldElementBase.Create <CaseElement>(reader));
                break;

            case ElseElement.ElementName:
                Add(FieldElementBase.Create <ElseElement>(reader));
                break;

            default:
                throw new ConfigurationErrorsException(Invariant($"Unsupported tag '{tagName}'"));
            }
        }
Exemplo n.º 3
0
 public void Add(FieldElementBase feb)
 {
     BaseAdd(feb);
 }