Commit Graph
63 Commits
Author SHA1 Message Date
Gert Driesen 9da08cb6dc * MethodInfoTest.cs: Numbered tests. Improved existing tests.
* ParameterInfoTest.cs: Added test for bug #342536.
* MonoMethod.cs (MakeGenericMethod): Modified argument name to match
MS. When one of the types is null, throw ArgumentNullException instead
of ArgumentException.      
* MethodInfo.cs (MakeGenericMethod): Modified argument name to match
MS.

svn path=/trunk/mcs/; revision=94641
2008-02-02 18:31:00 +00:00
Jb Evain 2d80e1d6e7 2008-01-15 Jb Evain <[email protected]>
* MonoMethod.cs (MakeGenericMethod): check for null values
	in the types arguments. Fixes #353849.


svn path=/trunk/mcs/; revision=92929
2008-01-15 10:05:30 +00:00
Mark Probst 1a94285f85 2007-09-11 Mark Probst <[email protected]>
* MonoMethod.cs: Catch and re-throw MethodAccessException from
	InternalInvoke for CoreCLR security.

svn path=/trunk/mcs/; revision=85651
2007-09-11 18:17:29 +00:00
Paolo Molaro f788987fc5 Thu Sep 6 19:49:34 CEST 2007 Paolo Molaro <[email protected]>
* MonoMethod.cs: name is used as a cache: provide an icall to get the
	name from the runtime.


svn path=/trunk/mcs/; revision=85431
2007-09-06 17:23:22 +00:00
Robert Jordan c76ea13748 In .:
2007-08-23  Robert Jordan  <[email protected]>

	* corlib.dll.sources: Added MemberInfoSerializationHolder.cs.

In System.Runtime.Serialization.Formatters.Binary:
2007-08-23  Robert Jordan  <[email protected]>

	* ObjectReader.cs, ObjectReader.cs: Map between System.MonoType[] and
	MS.NET's System.RuntimeType[].
	
	* ObjectReader.cs (ReadType): When a type couldn't be found, emit
	a more useful exception.

In System.Reflection:
2007-08-23  Robert Jordan  <[email protected]>

	* MemberInfoSerializationHolder.cs: created from
	ReflectionSerializationHolder to match MS (fixes bug #80761).
	Add support for	fields, events, properties and generic methods.

	* MonoMethod.cs (GetObjectData): handle generic arguments.

	* MonoGenericMethod.cs: mark as [Serializable].

	* MonoProperty.cs (GetObjectData): implemented.

	* MonoField.cs: ditto.

	* MonoEvent.cs: ditto.


svn path=/trunk/mcs/; revision=84732
2007-08-23 18:40:17 +00:00
Atsushi Eno 80a0ce7133 2007-07-19 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : parameter types should be fixed as well.

	* MethodInfoTest.cs : fix incorrect parameter type output.


svn path=/trunk/mcs/; revision=82271
2007-07-19 11:23:20 +00:00
Atsushi Eno b1879f67db 2007-07-19 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : ToString() did not show correct return type when
	  it is generic.

	* MethodInfoTest.cs : added ToString() test for generic return type.


svn path=/trunk/mcs/; revision=82268
2007-07-19 09:33:53 +00:00
Zoltan Varga 4d03852f26 2007-05-07 Zoltan Varga <[email protected]>
* MonoMethod.cs (Invoke): Fix a warning.

svn path=/trunk/mcs/; revision=76840
2007-05-07 15:40:35 +00:00
Zoltan Varga 43861d2253 2007-05-07 Zoltan Varga <[email protected]>
* MonoMethod.cs (Invoke): Don't wrap ThreadAbortException inside a 
	TargetInvocationException on the 2.0 profile. Fixes #81538.

svn path=/trunk/mcs/; revision=76833
2007-05-07 15:13:32 +00:00
Alp Toker 7e2393d03d 2007-04-09 Alp Toker <[email protected]>
* MonoMethod.cs: Use StringBuilder for the entire ToString() methods
	to reduce allocations and increase performance.

svn path=/trunk/mcs/; revision=75532
2007-04-09 02:47:00 +00:00
Alp Toker 102e1b9db1 2007-04-09 Alp Toker <[email protected]>
* MonoMethod.cs: Use StringBuilder for parms in ToString() methods.


svn path=/trunk/mcs/; revision=75530
2007-04-09 01:35:29 +00:00
Alp Toker f9d61aea34 2007-04-09 Alp Toker <[email protected]>
* MethodBase.cs: IsGenericMethodDefinition() and IsGenericMethod()
	should return false, not throw NotSupportedException. This matches MS
	behaviour and introduces simplifications in subclasses.
	* MonoMethod.cs: MonoCMethod: Remove redundant overrides.


svn path=/trunk/mcs/; revision=75528
2007-04-09 00:45:14 +00:00
Zoltan Varga a01e55c26d 2006-09-02 Zoltan Varga <[email protected]>
* ParameterInfo.cs MethodInfo.cs MonoMethod.cs: Applied patch from 
	Peter Dettman ([email protected]). Implement ReturnParameter
	property.

svn path=/trunk/mcs/; revision=64762
2006-09-02 10:22:28 +00:00
Raja R Harinath 0427d7b00c * MonoMethod.cs (ToString): Update to handle change in byref type names.
svn path=/trunk/mcs/; revision=64702
2006-09-01 13:25:13 +00:00
Zoltan Varga 9cce5c413e 2006-07-12 Zoltan Varga <[email protected]>
* MonoMethod.cs (ContainsGenericParameters): Implement.

svn path=/trunk/mcs/; revision=62502
2006-07-12 14:42:27 +00:00
Zoltan Varga 191f6a1149 2006-07-12 Zoltan Varga <[email protected]>
* MonoMethod.cs (Invoke): Prevent invoking of open generic methods.

svn path=/trunk/mcs/; revision=62499
2006-07-12 14:20:43 +00:00
Zoltan Varga f4b31a94cc 2006-03-09 Zoltan Varga <[email protected]>
* MonoMethod.cs (ReturnTypeCustomAttributes): Compute the marshalAs attribute
	for the return type as well. Fixes #77668.

svn path=/trunk/mcs/; revision=57737
2006-03-09 18:31:06 +00:00
Martin Baulig dea11e73b6 2006-02-15 Martin Baulig <[email protected]>
* MethodBase.cs (MethodBase.GetGenericMethodDefinition): Removed.
	(MethodBase.Mono_IsInflatedMethod): Removed.
	(MethodBase.HasGenericParameters): Removed.

	* MethodInfo.cs (MethodInfo.GetGenericMethodDefinition): Moved
	here from MethodBase.

	* MonoMethod.cs
	(MonoMethod.IsGenericMethodDefinition): This is now an icall.
	(MonoMethod.IsGenericMethod): Likewise.


svn path=/trunk/mcs/; revision=56897
2006-02-15 19:51:04 +00:00
Martin Baulig 9d37fb1160 2006-02-14 Martin Baulig <[email protected]>
* MonoMethod.cs
	(MonoCMethod.IsGenericMethod): Override this and return false; the
	MS runtime doesn't throw an exception here.


svn path=/trunk/mcs/; revision=56855
2006-02-14 15:39:59 +00:00
Martin Baulig eccff06b7f 2006-02-07 Martin Baulig <[email protected]>
* MonoMethod.cs
	(MonoMethod.IsGenericMethod): Only return true for "real" generic
	methods and not for arbitrary instantiated methods.
	(MonoMethod.IsGenericMethodDefinition): Only return true for
	generic method definitions, but not for instantiated generic
	methods.  Fixes #77466.


svn path=/trunk/mcs/; revision=56645
2006-02-07 22:11:52 +00:00
Zoltan Varga 57c0d7f27c 2006-02-03 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Implement IsGenericMethod property.
	Fixes #77460.

svn path=/trunk/mcs/; revision=56548
2006-02-03 22:28:25 +00:00
Raja R Harinath a748b47257 make line-endings uniform, set svn:eol-style=native for unix line-endings
svn path=/trunk/mcs/; revision=56214
2006-01-29 08:35:17 +00:00
Atsushi Eno 2cce175f4e 2005-11-16 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : made MakeGenericMethod() indirect icall to
	  MakeGenericMethod_impl() and raise an error when it returns null.

	* MethodInfoTest.cs : added MakeGenericMethod test for #76575.


svn path=/trunk/mcs/; revision=53143
2005-11-16 20:01:34 +00:00
Atsushi Eno 53c071946f 2005-10-26 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : (ToString) add suffix " ByRef" for byref parameters.
	  Fixed bug #76541.

	* MethodInfoTest.cs : added test for bug #76541.


svn path=/trunk/mcs/; revision=52253
2005-10-26 19:11:39 +00:00
Martin Baulig f5908bb299 Reflect latest generics API changes in the August CTP.
svn path=/trunk/mcs/; revision=49476
2005-09-05 15:03:33 +00:00
Sebastien Pouliot 2ed96fd845 2005-03-11 Sebastien Pouliot <[email protected]>
* MonoMethod.cs: Promote a LinkDemand (if present) to a full Demand 
	(i.e. stack walk) when reflection is being used to invoke a method.


svn path=/trunk/mcs/; revision=41692
2005-03-11 13:10:43 +00:00
Carlos Alberto Cortez 2251dc33e4 2005-02-24 Carlos Alberto Cortez <[email protected]>
* Assembly.cs: LoadFrom: Change signature to support reflection only
	methods; ReflectionOnlyLoad, ReflectionOnlyLoadFrom 2.0 methods
	implemented; InvalidOperationException's re-thrown by CreateInstance.
	Also ReflectionOnly 2.0 property added.

	* MonoMethod.cs: InvalidOperationException's are re-thrown when calling 
	Invoke method on reflection only assemblies.
	

svn path=/trunk/mcs/; revision=41142
2005-02-24 08:43:28 +00:00
Raja R Harinath e809a07446 remove svn:executable
svn path=/trunk/mcs/; revision=41039
2005-02-22 13:59:31 +00:00
Zoltan Varga f598eece9d 2005-01-18 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Hopefully fix the build.

svn path=/trunk/mcs/; revision=39114
2005-01-18 19:51:10 +00:00
Zoltan Varga 90a4f0719d 2005-01-18 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Implement 2.0 GetMethodBody ().

svn path=/trunk/mcs/; revision=39110
2005-01-18 19:20:03 +00:00
Zoltan Varga 7de18ce3d8 2004-09-24 Zoltan Varga <[email protected]>
* MonoMethod.cs FieldInfo.cs: Add GetPseudoAttributes () method.

svn path=/trunk/mcs/; revision=34374
2004-09-24 19:05:46 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Atsushi Eno 5fad7c3594 2004-04-23 Atsushi Enomoto <[email protected]>
* MethodBase.cs, MonoMethod.cs, TypeDelegator.cs :
	  The fix should be easier ;)

svn path=/trunk/mcs/; revision=25882
2004-04-23 04:35:37 +00:00
Atsushi Eno 26b01be2d4 2004-04-23 Atsushi Enomoto <[email protected]>
* MethodBase.cs, MonoMethod.cs, TypeDelegator.cs :
	  NET_2_0 related build fix.

svn path=/trunk/mcs/; revision=25880
2004-04-23 04:18:45 +00:00
Martin Baulig 84a08e67be 2004-04-22 Martin Baulig <[email protected]>
Use `#if NET_2_0 || BOOTSTRAP_2_0' for the generic reflection stuff.

svn path=/trunk/mcs/; revision=25878
2004-04-23 02:40:05 +00:00
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00
Martin Baulig e4b9d98583 2004-04-07 Martin Baulig <[email protected]>
* MethodBase.cs
	(MethodBase.GetGenericParameters): Renamed to GetGenericArguments().

	* MonoGenericInst.cs (MonoGenericInst.DeclaringType): Removed.
	(MonoGenericInst.GetNestedTypes): Just call
	`generic_type.GetNestedTypes (bf)' here.

	* MonoMethod.cs (MonoMethod.ToString): If we're a generic method,
	include the type arguments.

svn path=/trunk/mcs/; revision=25131
2004-04-07 03:57:02 +00:00
Martin Baulig 95c7c99b76 2004-03-29 Martin Baulig <[email protected]>
* MethodBase.cs (MethodBase.Mono_IsInflatedMethod): New public
	virtual property.
	(MethodBase.HasGenericParameters): Use the "official" behavior
	here, ie. return false if we're not a generic method.

svn path=/trunk/mcs/; revision=24740
2004-03-30 00:27:57 +00:00
Martin Baulig 0f0cba4028 2004-03-29 Martin Baulig <[email protected]>
* MethodBase.cs: Moved the generics stuff here, made it virtual
	where neccessary and use the correct API.

svn path=/trunk/mcs/; revision=24736
2004-03-30 00:12:32 +00:00
Martin Baulig 6949d3ce57 2004-03-23 Martin Baulig <[email protected]>
* MonoMethod.cs (MonoMethod.ToString): Don't include the namespace
	if it's the empty string.

svn path=/trunk/mcs/; revision=24483
2004-03-23 18:38:22 +00:00
Zoltan Varga 6a7eecfe83 2003-11-24 Zoltan Varga <[email protected]>
* MonoMethod.cs: Add missing constructor.

svn path=/trunk/mcs/; revision=20399
2003-11-24 20:18:28 +00:00
Miguel de Icaza 0b4938b5a6 Kill GENERICS as the define to use to build the GENERICS build, that is now
part of the NET_1_2 build.

svn path=/trunk/mcs/; revision=20152
2003-11-18 05:33:34 +00:00
Zoltan Varga cbfcae3ec1 2003-11-11 Zoltan Varga <[email protected]>
* MonoMethod.cs: Implement CallingConvention member.

svn path=/trunk/mcs/; revision=19830
2003-11-11 18:53:12 +00:00
Martin Baulig e627e841c6 2003-10-18 Martin Baulig <[email protected]>
* MethodInfo.cs (MethodInfo.GetGenericArguments): Make this method
	abstract; use an interncall in MonoMethod and a custom
	implementation in MethodBuilder.

svn path=/trunk/mcs/; revision=19160
2003-10-18 07:13:03 +00:00
Pedro Martínez Juliá c99b864e88 2003-10-17 Pedro Mart�nez Juli� <[email protected]>
* MonoEvent.cs: implement ToString method as in MS.NET.

    * MonoMethod.cs: fix some differences between mono and MS.NET
    implementation of ToString.

svn path=/trunk/mcs/; revision=19139
2003-10-17 17:04:16 +00:00
Gonzalo Paniagua Javier 151739af64 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* System/MonoCustomAttrs.cs: fixed shortcut in GetCustomAttributes.
	The argument ICustomAttributeProvider can be of other types different
	from Type. Handle it.

	* System.Reflection/MonoMethod.cs: implemented GetBaseDefinition ().
	* System.Reflection.Emit/MethodBuilder.cs: GetBaseDefinition () returns
	this.

	Fixes bug #37380.

svn path=/trunk/mcs/; revision=11035
2003-01-30 00:55:23 +00:00
Patrik Torstensson 2f52562d4f 2003-01-28 Patrik Torstensson
* MonoMethod.cs: Added support for serialization for MonoMethod and MonoCMethod
	* ReflectionSerializationHolder.cs: Support class for serialization

svn path=/trunk/mcs/; revision=11030
2003-01-29 22:14:58 +00:00
Paolo Molaro 31fd17e8a2 Sat Jan 4 18:26:41 CET 2003 Paolo Molaro <[email protected]>
* MonoMethod.cs: propagate exceptions from the internal invoke
	code that need to be propagated.

svn path=/trunk/mcs/; revision=10143
2003-01-04 17:29:40 +00:00
Paolo Molaro fe58460445 Thu Dec 19 16:43:19 CET 2002 Paolo Molaro <[email protected]>
* MonoMethod.cs, ParameterInfo.cs: return a custom attribute
	provider for the return type of a method.

svn path=/trunk/mcs/; revision=9769
2002-12-19 15:46:00 +00:00
Paolo Molaro cf3b279815 Wed Sep 11 12:49:51 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs, Type.cs: implemented InvokeMember.


Wed Sep 11 12:50:54 CEST 2002 Paolo Molaro <[email protected]>

	* Binder.cs: more default binder implementation.
	* FieldInfo.cs, MonoField.cs: fixed SetValue () implementation.
	* MonoMethod.cs: use the binder in the Invoke () implementation.
	Implemented custom attributes methods and ToString for constructors.

svn path=/trunk/mcs/; revision=7355
2002-09-11 10:57:34 +00:00