Beispiel #1
0
        internal decimal GetMinEffectiveTotalRangeAllAndSequence()
        {
            if (this.minEffectiveTotalRange >= 0m)
            {
                return(this.minEffectiveTotalRange);
            }
            decimal num = 0m;
            XmlSchemaObjectCollection items;

            if (this is XmlSchemaAll)
            {
                items = ((XmlSchemaAll)this).Items;
            }
            else
            {
                items = ((XmlSchemaSequence)this).Items;
            }
            foreach (XmlSchemaObject xmlSchemaObject in items)
            {
                XmlSchemaParticle xmlSchemaParticle = (XmlSchemaParticle)xmlSchemaObject;
                num += xmlSchemaParticle.GetMinEffectiveTotalRange();
            }
            this.minEffectiveTotalRange = num;
            return(num);
        }
        internal override decimal GetMinEffectiveTotalRange()
        {
            if (this.minEffectiveTotalRange >= 0m)
            {
                return(this.minEffectiveTotalRange);
            }
            decimal num = 0m;

            if (this.Items.Count == 0)
            {
                num = 0m;
            }
            else
            {
                foreach (XmlSchemaObject xmlSchemaObject in this.Items)
                {
                    XmlSchemaParticle xmlSchemaParticle = (XmlSchemaParticle)xmlSchemaObject;
                    decimal           num2 = xmlSchemaParticle.GetMinEffectiveTotalRange();
                    if (num > num2)
                    {
                        num = num2;
                    }
                }
            }
            this.minEffectiveTotalRange = num;
            return(num);
        }