예제 #1
0
        public bool Quitar(TipoComplejoXsd tipo)
        {
            bool quitado = true;

            if (declaracionTiposComplejos.ContainsKey(tipo))
            {
                declaracionTiposComplejos.Remove(tipo);
            }
            else
            {
                quitado = false;
            }
            return(quitado);
        }
예제 #2
0
        public bool Añadir(TipoComplejoXsd tipo)
        {
            if (tipo.Nombre == null)
            {
                throw new XsdException("El tipo complejo tiene que tener nombre o estar dentro de la declaracion de un elemento");
            }
            bool añadir = true;

            if (!declaracionTiposComplejos.ContainsKey(tipo))
            {
                declaracionTiposComplejos.Add(tipo, null);
            }
            else
            {
                añadir = false;
            }
            return(añadir);
        }
예제 #3
0
 public void Reemplazar(TipoComplejoXsd tipo)
 {
     Quitar(tipo);
     Añadir(tipo);
 }
예제 #4
0
 public ElementoXsd(string nombre, TipoComplejoXsd tipoComplejo)
     : this(nombre, tipoComplejo.Nombre)
 {
 }