[Mono-bugs] [Bug 353557] New: ConfigurationElementCollection constructor must be public under Mono unlike CLR
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jan 14 00:11:15 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=353557
Summary: ConfigurationElementCollection constructor must be
public under Mono unlike CLR
Product: Mono: Class Libraries
Version: 1.2.5
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: P5 - None
Component: Configuration
AssignedTo: toshok at novell.com
ReportedBy: rcook at opiumtrail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Created an attachment (id=190383)
--> (https://bugzilla.novell.com/attachment.cgi?id=190383)
Repro sources
If I create a class derived from ConfigurationElementCollection Mono cannot
consume it unless its constructor is public. The CLR allows the constructor to
be internal.
If the constructor is internal we get a MissingMethodException:
Unhandled Exception: System.MissingMethodException: Method not found: 'Default
constructor not found...ctor() of Trac103.MyCollection'.
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic)
[0x00000]
at System.Activator.CreateInstance (System.Type type) [0x00000]
at System.Configuration.PropertyInformation.get_Value () [0x00000]
at System.Configuration.PropertyInformation.Reset
(System.Configuration.PropertyInformation parentProperty) [0x00000]
at System.Configuration.ElementInformation.Reset
(System.Configuration.ElementInformation parentInfo) [0x00000]
at System.Configuration.ConfigurationElement.Reset
(System.Configuration.ConfigurationElement parentElement) [0x00000]
at System.Configuration.Configuration.GetSectionInstance
(System.Configuration.SectionInfo config, Boolean createDefaultInstance)
[0x00000]
at System.Configuration.Configuration.GetSectionInstance
(System.Configuration.SectionInfo config, Boolean createDefaultInstance)
[0x00000]
at System.Configuration.Configuration.GetSectionInstance
(System.Configuration.SectionInfo config, Boolean createDefaultInstance)
[0x00000]
at System.Configuration.ConfigurationSectionCollection.get_Item
(System.String name) [0x00000]
at System.Configuration.Configuration.GetSection (System.String path)
[0x00000]
at
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection
(System.String configKey) [0x00000]
at System.Configuration.ConfigurationManager.GetSection (System.String
sectionName) [0x00000]
at Trac103.Program.Main (System.String[] args) [0x00000]
Apologies for the volume of System.Configuration-related bugs: it seems like
there are a lot of public/internal-related inconsistencies between Mono and the
CLR.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list