[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Type.cs,1.22,1.23
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Type.cs,1.22,1.23 |
Date: |
Wed, 23 Apr 2003 20:50:37 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System
In directory subversions:/tmp/cvs-serv24645/runtime/System
Modified Files:
Type.cs
Log Message:
Signature-compatibility fixes.
Index: Type.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Type.cs,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** Type.cs 23 Apr 2003 05:39:48 -0000 1.22
--- Type.cs 24 Apr 2003 00:50:35 -0000 1.23
***************
*** 2,6 ****
* Type.cs - Implementation of the "System.Type" class.
*
! * Copyright (C) 2001 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
--- 2,6 ----
* Type.cs - Implementation of the "System.Type" class.
*
! * Copyright (C) 2001, 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
***************
*** 28,31 ****
--- 28,32 ----
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+ using System.Diagnostics;
#if !ECMA_COMPAT
***************
*** 34,41 ****
public abstract class Type
#if CONFIG_REFLECTION
! : MemberInfo
! #if !ECMA_COMPAT
! , IReflect
! #endif
#endif
{
--- 35,39 ----
public abstract class Type
#if CONFIG_REFLECTION
! : MemberInfo, IReflect
#endif
{
***************
*** 358,361 ****
--- 356,395 ----
#if !ECMA_COMPAT
+ // Find the interfaces that match a set of filter criteria.
+ public virtual Type[] FindInterfaces(TypeFilter filter,
+
Object filterCriteria)
+ {
+ if(filter == null)
+ {
+ throw new
ArgumentNullException("filter");
+ }
+ Type[] interfaces = GetInterfaces();
+ if(interfaces == null)
+ {
+ return EmptyTypes;
+ }
+ int posn, posn2;
+ posn = 0;
+ posn2 = 0;
+ while(posn < interfaces.Length)
+ {
+ if(filter(interfaces[posn],
filterCriteria))
+ {
+ interfaces[posn2++] =
interfaces[posn];
+ }
+ ++posn;
+ }
+ if(posn2 == interfaces.Length)
+ {
+ return interfaces;
+ }
+ else
+ {
+ Type[] list = new Type [posn2];
+ Array.Copy(interfaces, 0, list, 0,
posn2);
+ return list;
+ }
+ }
+
/* convenience function wrapping over the other abstract stuff */
public virtual MemberInfo[] FindMembers (MemberTypes memberType,
***************
*** 691,696 ****
public
#endif
! abstract MemberInfo[] GetMember(String name, MemberTypes type,
!
BindingFlags bindingAttr);
// Get all members from this type.
--- 725,733 ----
public
#endif
! virtual MemberInfo[] GetMember(String name, MemberTypes type,
! BindingFlags
bindingAttr)
! {
! throw new
NotSupportedException(_("NotSupp_SubClass"));
! }
// Get all members from this type.
***************
*** 704,708 ****
// Get a method from this type.
! public virtual MethodInfo GetMethod(String name, BindingFlags
bindingAttr)
{
if(name == null)
--- 741,745 ----
// Get a method from this type.
! public MethodInfo GetMethod(String name, BindingFlags bindingAttr)
{
if(name == null)
***************
*** 713,719 ****
CallingConventions.Any, null, null);
}
! public virtual MethodInfo GetMethod(String name, BindingFlags
bindingAttr,
!
Binder binder, Type[] types,
!
ParameterModifier[] modifiers)
{
if(name == null)
--- 750,756 ----
CallingConventions.Any, null, null);
}
! public MethodInfo GetMethod(String name, BindingFlags bindingAttr,
! Binder binder,
Type[] types,
!
ParameterModifier[] modifiers)
{
if(name == null)
***************
*** 875,880 ****
null, returnType, types, null);
}
! public virtual PropertyInfo GetProperty(String name,
!
BindingFlags bindingAttr)
{
if(name == null)
--- 912,916 ----
null, returnType, types, null);
}
! public PropertyInfo GetProperty(String name, BindingFlags bindingAttr)
{
if(name == null)
***************
*** 904,912 ****
null, returnType, types, modifiers);
}
! public virtual PropertyInfo GetProperty(String name,
!
BindingFlags bindingAttr,
!
Binder binder,
!
Type returnType, Type[] types,
!
ParameterModifier[] modifiers)
{
if(name == null)
--- 940,948 ----
null, returnType, types, modifiers);
}
! public PropertyInfo GetProperty(String name,
! BindingFlags
bindingAttr,
! Binder
binder,
! Type
returnType, Type[] types,
!
ParameterModifier[] modifiers)
{
if(name == null)
***************
*** 998,1001 ****
--- 1034,1041 ----
return GetTypeFromCLSID(clsid, server, false);
}
+ public static Type GetTypeFromCLSID(Guid clsid)
+ {
+ return GetTypeFromCLSID(clsid, null, false);
+ }
#endif // !ECMA_COMPAT
***************
*** 1021,1024 ****
--- 1061,1068 ----
return GetTypeFromProgID(progID, server, false);
}
+ public static Type GetTypeFromProgID(String progID)
+ {
+ return GetTypeFromProgID(progID, null, false);
+ }
// Implementation of the "HasElementType" property.
***************
*** 1031,1034 ****
--- 1075,1082 ----
ParameterModifier[] modifiers,
CultureInfo culture, String[]
namedParameters);
+ #if !ECMA_COMPAT
+ [DebuggerStepThrough]
+ [DebuggerHidden]
+ #endif
public Object InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object
target, Object[] args)
***************
*** 1037,1040 ****
--- 1085,1092 ----
null,
null, null);
}
+ #if !ECMA_COMPAT
+ [DebuggerStepThrough]
+ [DebuggerHidden]
+ #endif
public Object InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object
target, Object[] args,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Type.cs,1.22,1.23,
Rhys Weatherley <address@hidden> <=