[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection Assembly.c
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection Assembly.cs,1.20,1.21 |
Date: |
Fri, 28 Mar 2003 20:38:09 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection
In directory subversions:/tmp/cvs-serv18774/runtime/System/Reflection
Modified Files:
Assembly.cs
Log Message:
Implement the missing parts of the "AppDomain" class.
Index: Assembly.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection/Assembly.cs,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** Assembly.cs 14 Feb 2003 05:57:41 -0000 1.20
--- Assembly.cs 29 Mar 2003 01:38:07 -0000 1.21
***************
*** 235,243 ****
// Error codes for "LoadFromName" and "LoadFromFile".
! private const int LoadError_OK = 0;
! private const int LoadError_InvalidName = 1;
! private const int LoadError_FileNotFound = 2;
! private const int LoadError_BadImage = 3;
! private const int LoadError_Security = 4;
// Internal version of "Load".
--- 235,243 ----
// Error codes for "LoadFromName" and "LoadFromFile".
! internal const int LoadError_OK = 0;
! internal const int LoadError_InvalidName = 1;
! internal const int LoadError_FileNotFound = 2;
! internal const int LoadError_BadImage = 3;
! internal const int LoadError_Security = 4;
// Internal version of "Load".
***************
*** 251,256 ****
Assembly parent);
// Throw an exception based on a load error.
! private static void ThrowLoadError(String name, int error)
{
if(error == LoadError_InvalidName)
--- 251,261 ----
Assembly parent);
+ // Internal version of "AppDomain.Load" for a byte array.
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ extern internal static Assembly LoadFromBytes(byte[] bytes, out int
error,
+
Assembly parent);
+
// Throw an exception based on a load error.
! internal static void ThrowLoadError(String name, int error)
{
if(error == LoadError_InvalidName)
***************
*** 278,281 ****
--- 283,290 ----
public static Assembly Load(String assemblyString)
{
+ return Load(assemblyString,
GetCallingAssembly());
+ }
+ internal static Assembly Load(String assemblyString, Assembly caller)
+ {
Assembly assembly;
int error;
***************
*** 289,299 ****
{
assembly =
LoadFromFile(assemblyString.Substring(7),
!
out error,
!
GetCallingAssembly());
}
else
{
! assembly = LoadFromName(assemblyString,
out error,
!
GetCallingAssembly());
}
if(error == LoadError_OK)
--- 298,306 ----
{
assembly =
LoadFromFile(assemblyString.Substring(7),
!
out error, caller);
}
else
{
! assembly = LoadFromName(assemblyString,
out error, caller);
}
if(error == LoadError_OK)
***************
*** 316,319 ****
--- 323,330 ----
static Assembly LoadFrom(String assemblyFile)
{
+ return LoadFrom(assemblyFile,
GetCallingAssembly());
+ }
+ internal static Assembly LoadFrom(String assemblyFile, Assembly caller)
+ {
if(assemblyFile == null)
{
***************
*** 322,326 ****
int error;
Assembly assembly = LoadFromFile(assemblyFile,
out error,
!
GetCallingAssembly());
if(error == LoadError_OK)
{
--- 333,337 ----
int error;
Assembly assembly = LoadFromFile(assemblyFile,
out error,
!
caller);
if(error == LoadError_OK)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection Assembly.cs,1.20,1.21,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/InteropServices GuidAttribute.cs,1.2,1.3
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Principal IIdentity.cs,NONE,1.1 IPrincipal.cs,NONE,1.1PrincipalPolicy.cs,NONE,1.1
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/InteropServices GuidAttribute.cs,1.2,1.3
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Principal IIdentity.cs,NONE,1.1 IPrincipal.cs,NONE,1.1PrincipalPolicy.cs,NONE,1.1
- Index(es):