Commit Graph
471 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
Zoltan Varga 184818e5cd 2008-01-29 Zoltan Varga <[email protected]>
* Assembly.cs: Make GetTypes () virtual so it can be overriden by AssemblyBuilder.

svn path=/trunk/mcs/; revision=94300
2008-01-29 19:37:21 +00:00
Zoltan Varga 90be51fd5b 2008-01-29 Zoltan Varga <[email protected]>
* Assembly.cs: Make GetModulesInternal () virtual so it can be overriden by
	AssemblyBuilder.

svn path=/trunk/mcs/; revision=94284
2008-01-29 18:43:46 +00:00
Zoltan Varga a3a9264c4d 2008-01-22 Zoltan Varga <[email protected]>
* MonoGenericClass.cs: Make this NET 2.0 only.

svn path=/trunk/mcs/; revision=93516
2008-01-22 12:22:24 +00:00
Zoltan Varga 17a15a354b 2008-01-22 Zoltan Varga <[email protected]>
* MonoGenericClass.cs (Initialize): Simplify this a bit and add comments for this
	class.

svn path=/trunk/mcs/; revision=93507
2008-01-22 11:24:48 +00:00
Gert Driesen a0065f3330 * AppDomainTest.cs: Added test for DefineDynamicAssembly overload
taking IEnumerable<CustomAttributeBuilder>.
* AssemblyBuilderTest.cs: Added tests for DefineUnmanagedResource and  
DefineVersionInfoResource overloads that check whether only a single
unmanaged resource can be defined. Improved test for SetCustomAttribute.
* AssemblyNameTest.cs: Added test for effect of AssemblyNameFlags on
FullName. Added test for PublicKey with value "null". Added ctor test
for Retargetable spec.
* AssemblyName.cs: Added support for Retargetable spec in FullName.

svn path=/trunk/mcs/; revision=93348
2008-01-20 15:51:42 +00:00
Zoltan Varga cf37916ae0 2008-01-17 Zoltan Varga <[email protected]>
* Assembly.cs AssemblyFlagsAttribute.cs ICustomAttributeProvider.cs
	MemberInfo.cs FieldInfo.cs DefaultMemberAttribute.cs 
	CustomAttributeNamedArgument.cs TargetException.cs MethodInfo.cs
	IReflect.cs CustomAttributeTypedArgument.cs Module.cs: Change some parameter
	names to match MS.

svn path=/trunk/mcs/; revision=93188
2008-01-17 19:22:02 +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
Sebastien Pouliot 6135a17f72 2008-01-06 Sebastien Pouliot <[email protected]>
* Assembly.cs: Fix typo in setter found with Gendarme (was used in a
	single place, AppDomain, and set to true so it never caused a problem)

2008-01-04  Gert Driesen  <[email protected]>


svn path=/trunk/mcs/; revision=92343
2008-01-06 15:39:22 +00:00
Gert Driesen 75fa72c63c * AssemblyBuilder.cs (UnprotectedGetName): Set the public key token
as well.
* AssemblyBuilderTest.cs: Improved existing AssemblyName related tests.
Enabled AssemblyName tests that previously failed.
* AssemblyNameCas.cs: Sync test methods with AssemblyNameTest.cs.
* AssemblyNameTest.cs: Removed AssertEqualsByteArrays method since
NUnit supports this out-of-the-box. Use more meaningful names for
some existing tests. Improved existing tests and added lots more.
Enabled tests that were previously failing.  Fixed and improved
tests for public key; the original "public key" was actually a         
key pair.
* AssemblyName.cs: Fixed default value for ProcessorArchitecture to
match MS. On 2.0 profile, return zero-length in FullName is no name
is set, and throw a SecurityException in FullName and GetPublicKeyToken
if a public key is set with no corresponding public key token. 
Fixed FullName to also include PublicKeyToken spec with "null" value
if public key is empty byte array. Fixed corlib part of bug #351057.   
In SetPublicKey, modify Flags accordingly. On the 2.0 profile, verify
the public key when the public key token is computed.

svn path=/trunk/mcs/; revision=92314
2008-01-05 19:35:02 +00:00
Zoltan Varga 69f6e13614 2007-12-26 Zoltan Varga <[email protected]>
* Assembly.cs (GetSatelliteAssembly): Search in the assembly directory as well.
	Fixes ##345627.

svn path=/trunk/mcs/; revision=91907
2007-12-26 21:16:51 +00:00
Zoltan Varga 80a2b9f902 2007-12-03 Zoltan Varga <[email protected]>
* MonoField.cs: Implement GetRawConstantValue ().

svn path=/trunk/mcs/; revision=90543
2007-12-03 14:00:37 +00:00
Marek Habersack 316c7d93c7 2007-11-24 Marek Habersack <[email protected]>
* CustomAttributeTypedArgument.cs: value can be null in ToString.

svn path=/trunk/mcs/; revision=90249
2007-11-24 02:03:05 +00:00
Zoltan Varga 9b0a11a54e 2007-11-16 Zoltan Varga <[email protected]>
* Assembly.cs (GetFiles): Include the assembly itself as the first entry.

svn path=/trunk/mcs/; revision=89725
2007-11-15 23:36:24 +00:00
Atsushi Eno e5e54f36c0 2007-11-13 Atsushi Enomoto <[email protected]>
* AssemblyName.cs : remove extraneous MonoTODO.


svn path=/trunk/mcs/; revision=89527
2007-11-13 08:58:57 +00:00
Atsushi Eno 5e41ea9c05 2007-11-13 Atsushi Enomoto <[email protected]>
* ExceptionHandlingClause.cs : implemented ToString().


svn path=/trunk/mcs/; revision=89526
2007-11-13 08:41:21 +00:00
Atsushi Eno ecf194e93e 2007-11-13 Atsushi Enomoto <[email protected]>
* MethodBase.cs : (Invoke) removed extra interface implementation.


svn path=/trunk/mcs/; revision=89522
2007-11-13 05:33:28 +00:00
Atsushi Eno d3050f910c 2007-11-13 Atsushi Enomoto <[email protected]>
* StrongNameKeyPair.cs : implemented 2.0 runtime serialization stuff.


svn path=/trunk/mcs/; revision=89521
2007-11-13 05:24:26 +00:00
Mark Probst 1a313377dc 2007-11-05 Mark Probst <[email protected]>
* Binder.cs: Treat matches with different argument types as
	ambiguous, too.  Fixes #324998.

2007-11-05  Mark Probst  <[email protected]>

	* BinderTests.cs: Add test for bug #324998.

svn path=/trunk/mcs/; revision=88879
2007-11-05 16:03:42 +00:00
Zoltan Varga a7e976e2a7 2007-11-01 Zoltan Varga <[email protected]>
* Binder.cs: Avoid returning a method with a ParamArray attribute when a normal
	method exists. Fixes #338266.

svn path=/trunk/mcs/; revision=88661
2007-11-01 16:31:45 +00:00
Zoltan Varga 16fbfc464f 2007-10-30 Zoltan Varga <[email protected]>
* Binder.cs: Applied patch from Mario A Chavez <[email protected]>. Add
	support for binding to methods with ParamArray attribute. Fixes #336841.

svn path=/trunk/mcs/; revision=88521
2007-10-30 22:08:59 +00:00
Zoltan Varga 293505b23f 2007-10-27 Zoltan Varga <[email protected]>
* MonoGenericClass.cs: Override GetPropertyImpl too.

svn path=/trunk/mcs/; revision=88293
2007-10-26 23:05:40 +00:00
Atsushi Eno f5982eb128 2007-10-24 Atsushi Enomoto <[email protected]>
* Assembly.cs : include ReflectionOnlyLoad() as part of 2.0
	  bootstrap build.


svn path=/trunk/mcs/; revision=88064
2007-10-24 12:44:33 +00:00
Zoltan Varga 8fd8307c59 2007-09-23 Zoltan Varga <[email protected]>
* Assembly.cs (GetManifestModule): New virtual method overridden by 
	AssemblyBuilder.

svn path=/trunk/mcs/; revision=86224
2007-09-22 23:37:08 +00:00
Gert Driesen 059ba0a94d * Assembly.cs: In GetManifestResourceStream, throw ANE with type as
paramname when both name and type are null. Use String.Length to check
for zero-length string.
* AssemblyTest.cs: Added tests for GetManifestResourceStream argument
checks.

svn path=/trunk/mcs/; revision=85935
2007-09-17 19:56:56 +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 cb62cc77f9 2007-07-15 Zoltan Varga <[email protected]>
* FieldInfo.cs: Implement GetOptional/RequiredCustomModifiers ().

svn path=/trunk/mcs/; revision=82012
2007-07-15 14:53:38 +00:00
Zoltan Varga 0dae33a017 2007-07-15 Zoltan Varga <[email protected]>
* MethodInfo.cs: Remove an unneccesary MonoTODO.

svn path=/trunk/mcs/; revision=82010
2007-07-15 14:22:29 +00:00
Zoltan Varga 43a539903b 2007-07-15 Zoltan Varga <[email protected]>
* Module.cs: Implement ResolveSignature.

svn path=/trunk/mcs/; revision=82008
2007-07-15 14:18:42 +00:00
Zoltan Varga d61b566152 2007-07-14 Zoltan Varga <[email protected]>
* Module.cs: Implement the generic versions of the ResolveXXX methods.

svn path=/trunk/mcs/; revision=81989
2007-07-14 20:32:19 +00:00
Zoltan Varga 970c5c4f50 2007-07-10 Zoltan Varga <[email protected]>
* Module.cs: Add new internal method GetMDStreamVersion ().

svn path=/trunk/mcs/; revision=81635
2007-07-09 13:00:52 +00:00
Atsushi Eno 63411a166f 2007-07-09 Atsushi Enomoto <[email protected]>
* CustomAttributeNamedArgument.cs, CustomAttributeTypedArgument.cs:
	  added missing operator == and !=.


svn path=/trunk/mcs/; revision=81619
2007-07-09 07:55:18 +00:00
Atsushi Eno 63b76a58b7 oops, it is S.R.E, not S.R.
2007-07-04  Atsushi Enomoto  <[email protected]>

	* DynamicMethod.cs : 2.0 API fix.


svn path=/trunk/mcs/; revision=81312
2007-07-04 02:21:10 +00:00
Atsushi Eno 5fe6a5b42d 2007-07-04 Atsushi Enomoto <[email protected]>
* Type.cs : 2.0 TypeHandle and ContainsGenericParameters are virtual
	  (required fix for 2.0 reflection API fixes).

	* CustomAttributeNamedArgument.cs CustomAttributeTypedArgument.cs
	  CustomAttributeData.cs : implemented Equals() and GetHashCode().
	* Missing.cs : ISerializable.
	* AssemblyName.cs : ReferenceMatchesDefinition() stub.
	* Module.cs : missing method stubs with generic type/method args.
	* ExceptionHandlingClause.cs : ToString() stub.
	* MethodBase.cs TypeDelegator.cs ModuleResolveEventHandler.cs
	  TypeFilter.cs MemberFilter.cs
	  FieldInfo.cs ParameterInfo.cs MethodInfo.cs DynamicMethod.cs :
	  miscellaneous cosmetic API fixes.


svn path=/trunk/mcs/; revision=81311
2007-07-04 02:19:18 +00:00
Paolo Molaro 758612aea9 Tue May 8 13:04:35 CEST 2007 Paolo Molaro <[email protected]>
* FieldInfo.cs, MethodBase.cs: implemented new GetFieldFromHandle and
	GetMethodFromHandle overloads (bug #78637).


svn path=/trunk/mcs/; revision=76915
2007-05-08 10:58:12 +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
Miguel de Icaza 503b6175e1 2007-03-05 Peter Dettman <[email protected]>
* Binder.cs: The patch changes Binder.Default.GetBetterMethod to
	prefer methods in subclasses if the arg types can't disambiguate
	them.

	Also fixes a typo in the CallingConventions comparison.

svn path=/trunk/mcs/; revision=73780
2007-03-06 04:46:30 +00:00
Alp Toker 60234bbb23 2007-03-01 Alp Toker <[email protected]>
* FieldInfo.cs:
	Add GetFieldFromHandle() 2.0 overload stub (NotImplemented).

svn path=/trunk/mcs/; revision=73589
2007-03-01 14:23:46 +00:00
Alp Toker cff66adc25 2007-03-01 Alp Toker <[email protected]>
* MethodBase.cs: Add missing ComVisible attr.
	Add GetMethodFromHandle() 2.0 overload stub (NotImplemented).


svn path=/trunk/mcs/; revision=73588
2007-03-01 14:13:50 +00:00
Marek Safar ff86a1046b 2006-12-30 Marek Safar <[email protected]>
* MonoProperty.cs: Cache frequently used properties.

svn path=/trunk/mcs/; revision=70262
2006-12-30 17:51:57 +00:00
Paolo Molaro 017bd0e881 Thu Dec 14 13:50:48 CET 2006 Paolo Molaro <[email protected]>
* *.cs: added missing Serializable attributes.


svn path=/trunk/mcs/; revision=69483
2006-12-14 12:51:31 +00:00
Paolo Molaro ce39fd6eb6 Thu Dec 14 12:52:27 CET 2006 Paolo Molaro <[email protected]>
* MonoProperty.cs, ParameterInfo.cs, PropertyInfo.cs:
	GetRequiredCustomModifiers()/GetOptionalCustomModifiers()
	implementations.


svn path=/trunk/mcs/; revision=69474
2006-12-14 11:53:12 +00:00