[Mono-bugs] [Bug 654721] New: IntegerValidator defaults to 0 >= x >= 0, instead of the range of integers.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 18 14:21:04 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=654721

https://bugzilla.novell.com/show_bug.cgi?id=654721#c0


           Summary: IntegerValidator defaults to 0 >= x >= 0, instead of
                    the range of integers.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: 64bit
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dbenson at tunewiki.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12)
Gecko/20101026 Firefox/3.6.12

Enyim.Memcached demonstrates this issue with mono. (The value for the property
'minPoolSize' is not valid. The error is: The value must be in the range 0 - 0)

when using
(MyClass)System.Configuration.ConfigurationManager.GetSection("abc/def"), if an
integer property of myclass does not define a IntegerValidator, it defaults to
only accepting 0 as a result, instead of the range of integers (this is
different then ms.net behavior)

public class MyClass{
    private int test=10;

    int Test {
    get { return test;}
    set { test= value;}
    }
}

fails in mono (but not in .net) when specifying a configuration setting as
follows:

<abc>
    <def Test="123">
</abc>

It seems like a default integer validator is being added with defaults
something like
[IntegerValidator(ExcludeRange = false, MaxValue = 0, MinValue = 0)]

Reproducible: Always

Steps to Reproduce:
1. Create a class that includes an integer property.
2. create an assembly that gets a section in web.config and puts the data into
the class.
3. run the project on a webserver, and read the error
Actual Results:  
The value for the property 'minPoolSize' is not valid. The error is: The value
must be in the range 0 - 0

Expected Results:  
to read the integer value

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list