[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection AssemblyNam
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection AssemblyNameProxy.cs,NONE,1.1CustomAttributeFormatException.cs,NONE,1.1 ModuleResolveEventHandler.cs,NONE,1.1 Pointer.cs,NONE,1.1 ReflectionTypeLoadException.cs,NONE,1.1 TypeDelegator.cs,NONE,1.1 TypeFilter.cs,NONE,1.1 Assembly.cs,1.23,1.24MemberFilter.cs,1.1,1.2 |
Date: |
Sat, 19 Apr 2003 00:03:06 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection
In directory subversions:/tmp/cvs-serv10170/runtime/System/Reflection
Modified Files:
Assembly.cs MemberFilter.cs
Added Files:
AssemblyNameProxy.cs CustomAttributeFormatException.cs
ModuleResolveEventHandler.cs Pointer.cs
ReflectionTypeLoadException.cs TypeDelegator.cs TypeFilter.cs
Log Message:
Add various missing classes.
--- NEW FILE ---
/*
* AssemblyNameProxy.cs - Implementation of the
* "System.Reflection.AssemblyNameProxy" class.
*
* Copyright (C) 2001 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if !ECMA_COMPAT
using System;
public class AssemblyNameProxy : MarshalByRefObject
{
// Get the name of an assembly from a filename.
public AssemblyName GetAssemblyName(String assemblyFile)
{
return
AssemblyName.GetAssemblyName(assemblyFile);
}
}; // class AssemblyNameProxy
#endif // !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* CustomAttributeFormatException.cs - Implementation of the
* "System.Reflection.CustomAttributeFormatException"
class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if CONFIG_REFLECTION && !ECMA_COMPAT
using System;
using System.Runtime.Serialization;
public class CustomAttributeFormatException : FormatException
{
// Constructors.
public CustomAttributeFormatException()
: base(_("Exception_CustomAttrFormat")) {}
public CustomAttributeFormatException(String msg)
: base(msg) {}
public CustomAttributeFormatException(String msg, Exception inner)
: base(msg, inner) {}
protected CustomAttributeFormatException(SerializationInfo info,
StreamingContext context)
: base(info, context) {}
// Get the default message to use for this exception type.
internal override String MessageDefault
{
get
{
return _("Exception_CustomAttrFormat");
}
}
// Get the default HResult value for this type of exception.
internal override uint HResultDefault
{
get
{
return 0x80131605;
}
}
}; // class CustomAttributeFormatException
#endif // CONFIG_REFLECTION && !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* ModuleResolveEventHandler.cs - Implementation of the
* "System.Reflection.ModuleResolveEventHandler" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if CONFIG_REFLECTION && !ECMA_COMPAT
public delegate Module ModuleResolveEventHandler
(Object sender, ResolveEventArgs args);
#endif // CONFIG_REFLECTION && !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* Pointer.cs - Implementation of the "System.Reflection.Pointer" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if CONFIG_REFLECTION && !ECMA_COMPAT
using System;
using System.Runtime.Serialization;
public unsafe sealed class Pointer : ISerializable
{
// Internal state.
private void *ptr;
private Type type;
// Constructor.
private Pointer(void *ptr, Type type)
{
this.ptr = ptr;
this.type = type;
}
// Box a pointer value.
public static Object Box(void *ptr, Type type)
{
if(type == null)
{
throw new ArgumentNullException("type");
}
else if(!(type.IsPointer))
{
throw new
ArgumentException(_("Arg_PointerType"));
}
else
{
return new Pointer(ptr, type);
}
}
// Unbox a pointer value.
public static void *Unbox(Object ptr)
{
if(!(ptr is Pointer))
{
throw new
ArgumentException(_("Arg_PointerValue"));
}
return ((Pointer)ptr).ptr;
}
// Implement the ISerializable interface.
void ISerializable.GetObjectData(SerializationInfo info,
StreamingContext context)
{
throw new NotSupportedException
(_("NotSupp_SerializePointer"));
}
}; // class Pointer
#endif // CONFIG_REFLECTION && !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* ReflectionTypeLoadException.cs - Implementation of the
* "System.Reflection.ReflectionTypeLoadException" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if CONFIG_REFLECTION && !ECMA_COMPAT
using System;
using System.Runtime.Serialization;
[Serializable]
public sealed class ReflectionTypeLoadException
: SystemException, ISerializable
{
// Internal state.
private Type[] classes;
private Exception[] exceptions;
// Constructors.
public ReflectionTypeLoadException(Type[] classes, Exception[]
exceptions)
: this(classes, exceptions, null) {}
public ReflectionTypeLoadException
(Type[] classes, Exception[] exceptions, String
message)
: base(message)
{
this.classes = classes;
this.exceptions = exceptions;
}
internal ReflectionTypeLoadException(SerializationInfo info,
StreamingContext context)
: base(info, context) {}
// Exception properties.
public Type[] Types
{
get
{
return classes;
}
}
public Exception[] LoaderExceptions
{
get
{
return exceptions;
}
}
// Get the default message to use for this exception type.
internal override String MessageDefault
{
get
{
return
_("Exception_ReflectionTypeLoad");
}
}
// Get the default HResult value for this type of exception.
internal override uint HResultDefault
{
get
{
return 0x80131602;
}
}
// Implement the ISerializable interface.
public override void GetObjectData(SerializationInfo info,
StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Types", classes, typeof(Type[]));
info.AddValue("Exceptions", exceptions,
typeof(Exception[]));
}
}; // class ReflectionTypeLoadException
#endif // CONFIG_REFLECTION && !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* TypeDelegator.cs - Implementation of the
* "System.Reflection.TypeDelegator" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if CONFIG_REFLECTION && !ECMA_COMPAT
using System;
using System.Globalization;
public class TypeDelegator : Type
{
// Internal state.
protected Type typeImpl;
// Constructors.
protected TypeDelegator() {}
public TypeDelegator(Type delegatingType)
{
if(delegatingType == null)
{
throw new
ArgumentNullException("delegatingType");
}
typeImpl = delegatingType;
}
// Get the attribute flags for this type.
protected override TypeAttributes GetAttributeFlagsImpl()
{
return typeImpl.Attributes;
}
// Get the element type for this type.
public override Type GetElementType()
{
return typeImpl.GetElementType();
}
// Get all interfaces that this type implements.
public override Type[] GetInterfaces()
{
return typeImpl.GetInterfaces();
}
// Get an interface mapping for a specific interface type.
public override InterfaceMapping GetInterfaceMap(Type interfaceType)
{
return typeImpl.GetInterfaceMap(interfaceType);
}
// Implementation of the "IsArray" property.
protected override bool IsArrayImpl()
{
return typeImpl.IsArray;
}
// Implementation of the "IsPointer" property.
protected override bool IsPointerImpl()
{
return typeImpl.IsPointer;
}
// Implementation of the "IsPrimitive" property.
protected override bool IsPrimitiveImpl()
{
return typeImpl.IsPrimitive;
}
// General properties.
public override String AssemblyQualifiedName
{
get
{
return typeImpl.AssemblyQualifiedName;
}
}
public override Type BaseType
{
get
{
return typeImpl.BaseType;
}
}
public override String FullName
{
get
{
return typeImpl.FullName;
}
}
public override RuntimeTypeHandle TypeHandle
{
get
{
return typeImpl.TypeHandle;
}
}
public override System.Reflection.Assembly Assembly
{
get
{
return typeImpl.Assembly;
}
}
// Get the custom attributes for this type.
public override Object[] GetCustomAttributes(bool inherit)
{
return typeImpl.GetCustomAttributes(inherit);
}
public override Object[] GetCustomAttributes(Type type, bool inherit)
{
return typeImpl.GetCustomAttributes(type,
inherit);
}
// Determine if custom attributes are defined for this type.
public override bool IsDefined(Type type, bool inherit)
{
return typeImpl.IsDefined(type, inherit);
}
// Get an interface that this type implements.
public override Type GetInterface(String name, bool ignoreCase)
{
return typeImpl.GetInterface(name, ignoreCase);
}
// Implementation of "GetConstructor" provided by subclasses.
protected override ConstructorInfo
GetConstructorImpl(BindingFlags
bindingAttr,
Binder
binder,
CallingConventions callingConventions,
Type[]
types,
ParameterModifier[] modifiers)
{
return typeImpl.GetConstructorImpl
(bindingAttr, binder,
callingConventions,
types, modifiers);
}
// Get all constructors for this type.
public override ConstructorInfo[] GetConstructors(BindingFlags
bindingAttr)
{
return typeImpl.GetConstructors(bindingAttr);
}
// Get an event from this type.
public override EventInfo GetEvent(String name, BindingFlags
bindingAttr)
{
return typeImpl.GetEvent(name, bindingAttr);
}
// Get all events from this type.
public override EventInfo[] GetEvents(BindingFlags bindingAttr)
{
return typeImpl.GetEvents(bindingAttr);
}
// Get a field from this type.
public override FieldInfo GetField(String name, BindingFlags
bindingAttr)
{
return typeImpl.GetField(name, bindingAttr);
}
// Get all fields from this type.
public override FieldInfo[] GetFields(BindingFlags bindingAttr)
{
return typeImpl.GetFields(bindingAttr);
}
// Get a member from this type.
public override MemberInfo[] GetMember
(String name, MemberTypes type, BindingFlags
bindingAttr)
{
return typeImpl.GetMember(name, type,
bindingAttr);
}
// Get all members from this type.
public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
{
return typeImpl.GetMembers(bindingAttr);
}
// Implementation of "GetMethod" provided by subclasses.
protected override MethodInfo
GetMethodImpl(String name,
BindingFlags
bindingAttr, Binder binder,
CallingConventions callingConventions,
Type[] types,
ParameterModifier[] modifiers)
{
return typeImpl.GetMethodImpl
(name, bindingAttr, binder,
callingConventions,
types, modifiers);
}
// Get all methods from this type.
public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
{
return typeImpl.GetMethods(bindingAttr);
}
// Get a nested type from this type.
public override Type GetNestedType(String name, BindingFlags
bindingAttr)
{
return typeImpl.GetNestedType(name,
bindingAttr);
}
// Get all nested types from this type.
public override Type[] GetNestedTypes(BindingFlags bindingAttr)
{
return typeImpl.GetNestedTypes(bindingAttr);
}
// Implementation of "GetProperty" provided by subclasses.
protected override PropertyInfo
GetPropertyImpl(String name,
BindingFlags bindingAttr, Binder binder,
Type
returnType, Type[] types,
ParameterModifier[] modifiers)
{
return typeImpl.GetPropertyImpl
(name, bindingAttr, binder, returnType,
types, modifiers);
}
// Get all properties from this type.
public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
{
return typeImpl.GetProperties(bindingAttr);
}
// Implementation of the "HasElementType" property.
protected override bool HasElementTypeImpl()
{
return typeImpl.HasElementType;
}
// Invoke a member.
public override Object InvokeMember
(String name, BindingFlags
invokeAttr,
Binder binder, Object target,
Object[] args,
ParameterModifier[] modifiers,
CultureInfo culture, String[]
namedParameters)
{
return typeImpl.InvokeMember
(name, invokeAttr, binder, target, args,
modifiers, culture, namedParameters);
}
// Implementation of the "IsByRef" property.
protected override bool IsByRefImpl()
{
return typeImpl.IsByRef;
}
// Implementation of the "IsCOMObject" property.
protected override bool IsCOMObjectImpl()
{
return typeImpl.IsCOMObject;
}
// Implementation of the "IsContextful" property.
protected override bool IsContextfulImpl()
{
return typeImpl.IsContextful;
}
// Implementation of the "IsMarshalByRef" property.
protected override bool IsMarshalByRefImpl()
{
return typeImpl.IsMarshalByRef;
}
// Implement overridden properties.
public override Guid GUID
{
get
{
return typeImpl.GUID;
}
}
public override System.Reflection.Module Module
{
get
{
return typeImpl.Module;
}
}
public override String Name
{
get
{
return typeImpl.Name;
}
}
public override String Namespace
{
get
{
return typeImpl.Namespace;
}
}
public override Type UnderlyingSystemType
{
get
{
return typeImpl.UnderlyingSystemType;
}
}
public override Type DeclaringType
{
get
{
return typeImpl.DeclaringType;
}
}
public override Type ReflectedType
{
get
{
return typeImpl.ReflectedType;
}
}
// Internal methods that support generic types.
protected override bool IsGenericTypeImpl()
{
return typeImpl.IsGenericType;
}
protected override int ArityImpl()
{
return typeImpl.Arity;
}
public override Type[] GetInstantiation()
{
return typeImpl.GetInstantiation();
}
public override Type Instantiate(Type[] inst)
{
return typeImpl.Instantiate(inst);
}
public override Type GetGenericType()
{
return typeImpl.GetGenericType();
}
}; // class TypeDelegator
#endif // CONFIG_REFLECTION && !ECMA_COMPAT
}; // namespace System.Reflection
--- NEW FILE ---
/*
* TypeFilter.cs - Implementation of "System.Reflection.TypeFilter"
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Reflection
{
#if !ECMA_COMPAT
[Serializable]
public delegate bool TypeFilter(Type m, Object filterCriteria);
#endif // !ECMA_COMPAT
}; // namespace System.Reflection
Index: Assembly.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection/Assembly.cs,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** Assembly.cs 15 Apr 2003 11:22:32 -0000 1.23
--- Assembly.cs 19 Apr 2003 04:03:04 -0000 1.24
***************
*** 479,482 ****
--- 479,489 ----
extern internal String GetSatellitePath(String filename);
+ #if CONFIG_REFLECTION && !ECMA_COMPAT
+
+ // Module resolution event.
+ public event ModuleResolveEventHandler ModuleResolve;
+
+ #endif // CONFIG_REFLECTION && !ECMA_COMPAT
+
}; // class Assembly
Index: MemberFilter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection/MemberFilter.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MemberFilter.cs 19 Jan 2003 16:22:57 -0000 1.1
--- MemberFilter.cs 19 Apr 2003 04:03:04 -0000 1.2
***************
*** 25,28 ****
--- 25,29 ----
#if !ECMA_COMPAT
+ [Serializable]
public delegate bool MemberFilter ( MemberInfo m, Object
filterCriteria);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection AssemblyNameProxy.cs,NONE,1.1CustomAttributeFormatException.cs,NONE,1.1 ModuleResolveEventHandler.cs,NONE,1.1 Pointer.cs,NONE,1.1 ReflectionTypeLoadException.cs,NONE,1.1 TypeDelegator.cs,NONE,1.1 TypeFilter.cs,NONE,1.1 Assembly.cs,1.23,1.24MemberFilter.cs,1.1,1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System ContextMarshalException.cs,NONE,1.1 ContextStaticObject.cs,NONE,1.1 DllNotFoundException.cs,NONE,1.1 ICustomFormatter.cs,NONE,1.1 TimeZone.cs,NONE,1.1DateTime.cs,1.21,1.22
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO/IsolatedStorage INormalizeForIsolatedStorage.cs,NONE,1.1 IsolatedStorage.cs,NONE,1.1 IsolatedStorageException.cs,NONE,1.1 IsolatedStorageFile.cs,NONE,1.1IsolatedStorageFileStream.cs,NONE,1.1 IsolatedStorageScope.cs,NONE,1.1 Makefile,NONE,1.1
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System ContextMarshalException.cs,NONE,1.1 ContextStaticObject.cs,NONE,1.1 DllNotFoundException.cs,NONE,1.1 ICustomFormatter.cs,NONE,1.1 TimeZone.cs,NONE,1.1DateTime.cs,1.21,1.22
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO/IsolatedStorage INormalizeForIsolatedStorage.cs,NONE,1.1 IsolatedStorage.cs,NONE,1.1 IsolatedStorageException.cs,NONE,1.1 IsolatedStorageFile.cs,NONE,1.1IsolatedStorageFileStream.cs,NONE,1.1 IsolatedStorageScope.cs,NONE,1.1 Makefile,NONE,1.1
- Index(es):