Ejemplo n.º 1
0
        /// <summary>
        /// Register an XS:Choice
        /// </summary>
        /// <param name="c">The XS:Choice to register</param>
        protected void RegisterChoice(System.Xml.Schema.XmlSchemaChoice c)
        {
            XmlSchemaChoice chce = new XmlSchemaChoice(Schema, this);

            chce.Load(c);
            content = chce;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Register a choice
        /// </summary>
        /// <param name="c"></param>
        protected void RegisterChoice(System.Xml.Schema.XmlSchemaChoice c)
        {
            if (content == null)
            {
                content = new List <XmlSchemaObject>();
            }

            XmlSchemaChoice chce = new XmlSchemaChoice(Schema, this);

            chce.Load(c);
            content.Add(chce);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Register a choice
        /// </summary>
        /// <param name="c"></param>
        protected void RegisterChoice(System.Xml.Schema.XmlSchemaChoice c)
        {
            if (content == null)
            {
                content = new List <XmlSchemaObject>();
            }

            XmlSchemaChoice chce = new XmlSchemaChoice(Schema, this);

            chce.Load(c);

            // If the choice only has one element, get rid of the choice
            if (chce.Content.Count == 1)
            {
                content.Add(chce.Content[0]);
            }
            else
            {
                content.Add(chce);
            }
        }