[corlib] MonoAssembly.LoadWithPartialNameInternal.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 2 Jun 2015 13:52:02 +0000 (14:52 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 2 Jun 2015 13:52:02 +0000 (14:52 +0100)
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.

mcs/class/corlib/System.Reflection/MonoAssembly.cs

index 96ded2372d338f791db6fd2e2c1f4571d4ca4422..34051bd8368e1e1cebe60a5e72d0aa6ad65a4a76 100644 (file)
@@ -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)]