[Mono-bugs] [Bug 39926][Nor] Changed - Activation attribute and IContextAttribute interface

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 11 May 2003 09:19:00 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jaime@gnome.org.

http://bugzilla.ximian.com/show_bug.cgi?id=39926

--- shadow/39926	Fri May  9 23:39:51 2003
+++ shadow/39926.tmp.24375	Sun May 11 09:19:00 2003
@@ -10,13 +10,12 @@
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: jean-marc.andre@polymtl.ca               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: Activation attribute and  IContextAttribute interface
 
 Description of Problem:
 The Activator.CreateInstance methods should accept a null value as first
 parameter (the one describing the assembly name).
 If the parameter is null, the runtime looks for the desired type in the
@@ -118,7 +117,43 @@
 (string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
 in [0x00024] (at
 /home/gpanjav/go-mono/mcs/class/corlib/System/Activator.cs:104) 00
 System.Activator:CreateInstance (string,string,object[])
 in [0x0001f] (at /home/gpanjav/go-mono/bugs/bug39926.cs:35) 00
 ActivatorTest.ActivatorTest:Main ()
+
+
+------- Additional Comments From jaime@gnome.org  2003-05-11 09:18 -------
+After doing some research I think there is not such a bug. 
+
+The user is trying to use Activator.CreateInstance (string
+assemblyName, string type, object[] activationAttributes) with
+something as:
+
+object args = new object[2];
+args[0] = 1;
+args[1] = "cocoa";
+Activator.CreateInstance (null, "ActivatorTest.ActivatorTestObject",
+args);
+
+If you take a look at the Activator class:
+
+We have to methods that are quite similar and thus can cause confusion:
+
+* CreateInstance (string assemblyName, string type, object[]
+activationAttributes)
+
+* CreateInstance (Type type, object[] args, object[] activationAttributes)
+
+So if you want to use the fist one, there is no doubt. The object
+array is filled with ActivationAttributes (but the user passes an
+array that are not such but parameter).
+
+Gonzalo told me that he could compile this on Windows. And that's
+weird, I really can't imagine how that test can compile on Windows
+unless "1", and "coucou" are ActivationAttributes or MS implementation
+is buggy. I got two URLs that might help.
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemactivatorclasscreateinstancetopic.asp
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgrfclient-sideactivation.asp