Exemplo n.º 1
0
 public PlivoElement Add(PlivoElement element)
 {
     int posn = Nestables.FindIndex(n => n == element.GetType().Name);
     if (posn >= 0)
     {
         Element.Add(element.Element);
         return element;
     }
     else
         throw new PlivoException(String.Format("Element {0} cannot be nested within {1}", element.GetType().Name, this.GetType().Name));
 }
Exemplo n.º 2
0
        public PlivoElement Add(PlivoElement element)
        {
            int posn = Nestables.FindIndex(n => n == element.GetType().Name);

            if (posn >= 0)
            {
                Element.Add(element.Element);
                return(element);
            }
            else
            {
                throw new PlivoException(String.Format("Element {0} cannot be nested within {1}", element.GetType().Name, this.GetType().Name));
            }
        }
Exemplo n.º 3
0
        public PlivoElement Add(PlivoElement element)
        {
            int posn = Nestables.FindIndex(n => n == element.GetType().Name);

            if (posn >= 0)
            {
                Element.Add(element.Element);
                return(element);
            }
            else
            {
                throw new PlivoXMLException(
                          $"Element {element.GetType().Name} cannot be nested within {GetType().Name}");
            }
        }