[Mono-dev] Bug in default site
Brian Crowell
mono-devel at fluggo.com
Mon Jan 30 13:29:53 EST 2006
The default site created by the System.ComponentModel.Container class does not
pass service requests (IServiceProvider.GetService()) to its container unless
the requested service is of type ISite. That's just batty, because anyone trying
to get the site this way won't get it, and anyone trying to get any other
service from the container won't get it.
The offending code is in Container.cs:
105 if (typeof(ISite) != t) {
106 return null;
107 }
The fix is simple:
105 if (typeof(ISite) == t) {
106 return this;
107 }
I've also attached a test program so you can see the difference between the .NET
implementation and the Mono implementation of this class.
--Brian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestSite.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060130/a32cbc40/attachment.pl
More information about the Mono-devel-list
mailing list