Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if MONO_FEATURE_SRE
using System;
using System.Reflection;
using System.Resources;
@ -45,6 +45,7 @@ using System.Runtime.InteropServices;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Threading;
using Mono.Security;
using Mono.Security.Cryptography;
@ -207,11 +208,37 @@ namespace System.Reflection.Emit
}
#if !MOBILE
[ComVisible (true)]
[ComDefaultInterface (typeof (_AssemblyBuilder))]
[ClassInterface (ClassInterfaceType.None)]
partial class AssemblyBuilder : _AssemblyBuilder
{
void _AssemblyBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.GetTypeInfoCount (out uint pcTInfo)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException ();
}
}
#endif
[StructLayout (LayoutKind.Sequential)]
public sealed class AssemblyBuilder : Assembly, _AssemblyBuilder {
public sealed partial class AssemblyBuilder : Assembly
{
#pragma warning disable 169, 414, 649
#region Sync with object-internals.h
private UIntPtr dynamic_assembly; /* GC-tracked */
@ -263,6 +290,7 @@ namespace System.Reflection.Emit
/* Keep this in sync with codegen.cs in mcs */
private const AssemblyBuilderAccess COMPILER_ACCESS = (AssemblyBuilderAccess) 0x800;
[PreserveDependency ("RuntimeResolve", "System.Reflection.Emit.ModuleBuilder")]
internal AssemblyBuilder (AssemblyName n, string directory, AssemblyBuilderAccess access, bool corlib_internal)
{
/* This is obsolete now, as mcs doesn't use SRE any more */
@ -1063,26 +1091,6 @@ namespace System.Reflection.Emit
return new TypeBuilderInstantiation (gtd, typeArguments);
}
void _AssemblyBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.GetTypeInfoCount (out uint pcTInfo)
{
throw new NotImplementedException ();
}
void _AssemblyBuilder.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException ();
}
public override Type GetType (string name, bool throwOnError, bool ignoreCase)
{
if (name == null)
@ -1154,15 +1162,19 @@ namespace System.Reflection.Emit
}
//FIXME MS has issues loading satelite assemblies from SRE
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public override Assembly GetSatelliteAssembly (CultureInfo culture)
{
return GetSatelliteAssembly (culture, null, true);
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return GetSatelliteAssembly (culture, null, true, ref stackMark);
}
//FIXME MS has issues loading satelite assemblies from SRE
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public override Assembly GetSatelliteAssembly (CultureInfo culture, Version version)
{
return GetSatelliteAssembly (culture, version, true);
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return GetSatelliteAssembly (culture, version, true, ref stackMark);
}
public override Module ManifestModule {