Quellcode durchsuchen

[corlib] MonoAssembly.LoadWithPartialNameInternal.

Implemented MonoAssembly.LoadWithPartialNameInternal.
Implementation is not 100% correct without handling stackMark properly.
Improving this would require the generous amount of work of adding
StackCrawlMark support to the runtime.

Fixes #27103.
Marcos Henrich vor 10 Jahren
Ursprung
Commit
360f2deff8
1 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. 5 3
      mcs/class/corlib/System.Reflection/MonoAssembly.cs

+ 5 - 3
mcs/class/corlib/System.Reflection/MonoAssembly.cs

@@ -139,14 +139,16 @@ namespace System.Reflection {
 
 		internal static RuntimeAssembly LoadWithPartialNameInternal (String partialName, Evidence securityEvidence, ref StackCrawlMark stackMark)
 		{
-			AssemblyName an = new AssemblyName(partialName);
-			return LoadWithPartialNameInternal (an, securityEvidence, ref stackMark);
+			// Mono runtime does not support StackCrawlMark
+			//FIXME stackMark should probably change method behavior in some cases.
+			return (RuntimeAssembly) Assembly.LoadWithPartialName (partialName, securityEvidence);
 		}
 
 		internal static RuntimeAssembly LoadWithPartialNameInternal (AssemblyName an, Evidence securityEvidence, ref StackCrawlMark stackMark)
 		{
-			throw new NotImplementedException ("LoadWithPartialNameInternal");
+			return LoadWithPartialNameInternal (an.ToString (), securityEvidence, ref stackMark);
 		}
+
 	}
 
 	[ComVisible (true)]