[Mono-bugs] [Bug 694939] New: AvoidUnnecessarySpecializationRule should ignore methods decorated with WebMethod attribute

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 19 13:23:18 EDT 2011


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

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


           Summary: AvoidUnnecessarySpecializationRule should ignore
                    methods decorated with WebMethod attribute
    Classification: Mono
           Product: Mono: Tools
           Version: 2.10.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dumbass at wp.pl
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:1.9.2.17)
Gecko/20110422 Ubuntu/10.04 (lucid) Firefox/3.6.17

AvoidUnnecessarySpecialization should not report methods decorated with
[WebMethod] attribute, or at least should not suggest replacing types with
interfaces.
My example:
[WebMethod]
public void deleteRecords (List<int> listOfIdentifiers)
{
..
}
The above rule suggests replacing List<int> with IEnumerable<int>.
However, after such change, WSDL file generation fails with
InvalidOperationException: method deleteRecords can not be reflected -->
NotSupportedException: Cannot serialize interface.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
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