System.Xml.Schema.XmlSchemaInference.SetMinMaxOccurs C# (CSharp) Méthode

SetMinMaxOccurs() private méthode

private SetMinMaxOccurs ( XmlSchemaElement el, bool setMaxOccurs ) : void
el XmlSchemaElement
setMaxOccurs bool
Résultat void
            internal void SetMinMaxOccurs(XmlSchemaElement el, bool setMaxOccurs)
            {
                if (this.Occurrence == InferenceOption.Relaxed)
                {
                    if (setMaxOccurs || el.MaxOccurs > 1)
                    {
                        el.MaxOccurs = decimal.MaxValue;    //set it to unbounded
                    }
                    el.MinOccurs = 0;
                }
                else if (el.MinOccurs > 1)
                {
                    el.MinOccurs = 1;
                }
            }