CheckTotalAndFractionDigits() private method

private CheckTotalAndFractionDigits ( decimal value, int totalDigits, int fractionDigits, bool checkTotal, bool checkFraction ) : Exception
value decimal
totalDigits int
fractionDigits int
checkTotal bool
checkFraction bool
return System.Exception
Exemplo n.º 1
0
        public override object ParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr)
        {
            Exception exception;

            try
            {
                Numeric10FacetsChecker facetsChecker = this.FacetsChecker as Numeric10FacetsChecker;
                decimal num = XmlConvert.ToDecimal(s);
                exception = facetsChecker.CheckTotalAndFractionDigits(num, 0x12, 4, true, true);
                if (exception == null)
                {
                    return(num);
                }
            }
            catch (XmlSchemaException exception2)
            {
                throw exception2;
            }
            catch (Exception exception3)
            {
                throw new XmlSchemaException(Res.GetString("Sch_InvalidValue", new object[] { s }), exception3);
            }
            throw exception;
        }