[bcl] Add more reflection types to monotouch
authorMarek Safar <marek.safar@gmail.com>
Mon, 19 Sep 2016 11:20:41 +0000 (13:20 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 19 Sep 2016 11:23:16 +0000 (13:23 +0200)
24 files changed:
mcs/class/Facades/System.Reflection.Emit.Lightweight/DynamicMethod.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.dll.sources
mcs/class/Facades/System.Reflection.Emit.Lightweight/TypeForwarders.cs
mcs/class/Facades/subdirs.make
mcs/class/Mono.CSharp/mobile_static_Mono.CSharp.dll.sources
mcs/class/Mono.CSharp/monotouch.cs
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/EventBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/FieldBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/ILGenerator.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/Label.cs
mcs/class/corlib/System.Reflection.Emit/LocalBuilder.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/SignatureHelper.pns.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.pns.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources

diff --git a/mcs/class/Facades/System.Reflection.Emit.Lightweight/DynamicMethod.cs b/mcs/class/Facades/System.Reflection.Emit.Lightweight/DynamicMethod.cs
new file mode 100644 (file)
index 0000000..6a0f53c
--- /dev/null
@@ -0,0 +1,136 @@
+//
+// DynamicMethod.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if MONOTOUCH
+
+namespace System.Reflection.Emit
+{
+       public abstract class DynamicMethod : MethodInfo, ICustomAttributeProvider
+       {
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes, bool restrictedSkipVisibility)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override MethodAttributes Attributes { 
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override CallingConventions CallingConvention {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type DeclaringType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public bool InitLocals { get; set; }
+
+               public override MethodImplAttributes MethodImplementationFlags {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }                               
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }                               
+
+               public override ParameterInfo ReturnParameter {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type ReturnType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public ILGenerator GetILGenerator ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ILGenerator GetILGenerator (int streamSize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override ParameterInfo[] GetParameters ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 7cd359e90a0d8fcce5eb4df48242bc4d11378507..9cc6712cb48a9aef4393ed1182f5fd9ca3ad0e4b 100644 (file)
@@ -20,5 +20,6 @@
 // THE SOFTWARE.
 // 
 
+#if !MONOTOUCH
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.DynamicMethod))]
-
+#endif
index c980d70840d4d7c2def8ece1b62f4ce110d13c8c..7c6c5d092f1d91b07ff931bff7d8b335c1838cd7 100644 (file)
@@ -24,7 +24,7 @@ System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encrypt
 System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \
 System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
 System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
-System.IO.FileSystem.AccessControl System.Reflection.TypeExtensions \
+System.IO.FileSystem.AccessControl System.Reflection.TypeExtensions System.Reflection.Emit.Lightweight System.Reflection.Emit.ILGeneration System.Reflection.Emit \
 System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument \
 System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
 System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
@@ -34,8 +34,6 @@ common_DEPS_SUBDIRS = System.Security.Cryptography.X509Certificates System.Servi
 
 drawing_DEPS_SUBDIRS = System.Drawing.Primitives
 
-reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
-
 monotouch_SUBDIRS = $(common_DEPS_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
 monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
 
@@ -43,10 +41,10 @@ mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
 mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
 net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
-net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
+net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS)
 
 monodroid_SUBDIRS = $(monotouch_SUBDIRS)
-monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
+monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
 xammac_SUBDIRS = $(monotouch_SUBDIRS)
 xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
index bd7397407ae304e5fd8aa32fdf5e7b533a8f9c7a..4c30fc6e1485b984dac425d97a47c9d1b938889a 100644 (file)
@@ -1,13 +1,4 @@
 #include Mono.CSharp.dll.sources
-../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
-../corlib/System.Reflection.Emit/FlowControl.cs
-../corlib/System.Reflection.Emit/OpCode.cs
-../corlib/System.Reflection.Emit/OpCodeNames.cs
-../corlib/System.Reflection.Emit/OpCodes.cs
-../corlib/System.Reflection.Emit/OpCodeType.cs
-../corlib/System.Reflection.Emit/OperandType.cs
 ../corlib/System.Reflection.Emit/PEFileKinds.cs
-../corlib/System.Reflection.Emit/Label.cs
 ../corlib/System.Reflection.Emit/MethodToken.cs
-../corlib/System.Reflection.Emit/StackBehaviour.cs
 monotouch.cs
index a8260819907e8cef35ea7e90ed327970965f6c00..06feb3cc396d5ceddd3255f98dd2e0a839a880e6 100644 (file)
 
 namespace System.Reflection.Emit
 {
-       public class ILGenerator
-       {
-               public void BeginCatchBlock (Type exceptionType)                
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public Label BeginExceptionBlock ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void BeginExceptFilterBlock ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void BeginFinallyBlock ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public LocalBuilder DeclareLocal (params object[] args)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public Label DefineLabel ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void Emit (OpCode opcode)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void Emit (OpCode opcode, object args)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public  void EmitCall (OpCode opcode, params object[] args)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void EndExceptionBlock ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void MarkLabel (Label loc)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public int ILOffset { get; set; }
-       }
-
        public class TypeBuilder : Type
        {
                #region implemented abstract members of MemberInfo
@@ -528,230 +468,6 @@ namespace System.Reflection.Emit
                }
        }
 
-       public class LocalBuilder : LocalVariableInfo
-       {       
-       }
-
-       public class GenericTypeParameterBuilder : Type
-       {
-               #region implemented abstract members of MemberInfo
-
-               public override bool IsDefined (Type attributeType, bool inherit)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override object[] GetCustomAttributes (bool inherit)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override object[] GetCustomAttributes (Type attributeType, bool inherit)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override string Name {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               #endregion
-
-               #region implemented abstract members of Type
-
-               public override Type GetInterface (string name, bool ignoreCase)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override Type[] GetInterfaces ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override Type GetElementType ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override EventInfo[] GetEvents (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override FieldInfo GetField (string name, BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override FieldInfo[] GetFields (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override Type GetNestedType (string name, BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override Type[] GetNestedTypes (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override TypeAttributes GetAttributeFlagsImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool HasElementTypeImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool IsArrayImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool IsByRefImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool IsCOMObjectImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool IsPointerImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               protected override bool IsPrimitiveImpl ()
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public override Assembly Assembly {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override string AssemblyQualifiedName {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override Type BaseType {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override string FullName {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override Guid GUID {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override Module Module {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override string Namespace {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               public override Type UnderlyingSystemType {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               #endregion
-
-               public void SetCustomAttribute (params object[] args)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void SetGenericParameterAttributes (GenericParameterAttributes genericParameterAttributes)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void SetInterfaceConstraints (params Type[] interfaceConstraints)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void SetBaseTypeConstraint (Type baseTypeConstraint)
-               {
-                       throw new NotSupportedException ();
-               }               
-       }
-
        public class ConstructorBuilder : MethodBase
        {
                #region implemented abstract members of MemberInfo
@@ -1087,19 +803,6 @@ namespace System.Reflection.Emit
                }
        }
 
-       public class ParameterBuilder : ParameterInfo
-       {
-               public void SetConstant (object arg)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               public void SetCustomAttribute (params object[] args)
-               {
-                       throw new NotSupportedException ();
-               }
-       }
-
        public class EventBuilder
        {
                public void SetAddOnMethod (MethodBuilder mdBuilder)
@@ -1118,11 +821,4 @@ namespace System.Reflection.Emit
                }
        }
 
-       public class CustomAttributeBuilder
-       {
-               public CustomAttributeBuilder (params object[] args)
-               {
-                       throw new NotSupportedException ();
-               }
-       }
 }
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.pns.cs
new file mode 100644 (file)
index 0000000..e10784c
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// AssemblyBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class AssemblyBuilder : Assembly
+       {
+               public static AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, System.Collections.Generic.IEnumerable<CustomAttributeBuilder> assemblyAttributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ModuleBuilder DefineDynamicModule (string name)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ModuleBuilder GetDynamicModule (string name)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+       }
+}
+
+#endif
\ No newline at end of file
index 3d1bdf152830e8d3618747e975b890c27de06c04..d9d588bdac8cb05966ca4f8046433022ba109ae3 100644 (file)
@@ -28,7 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit
@@ -44,4 +43,3 @@ namespace System.Reflection.Emit
                RunAndCollect = 9
   }
 }
-#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.pns.cs
new file mode 100644 (file)
index 0000000..2432a64
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// ConstructorBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class ConstructorBuilder : ConstructorInfo
+       {
+               public bool InitLocals { get; set; }
+
+               public override MethodAttributes Attributes { 
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type DeclaringType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public ParameterBuilder DefineParameter (int iSequence, ParameterAttributes attributes, string strParamName)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ILGenerator GetILGenerator ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ILGenerator GetILGenerator (int streamSize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override ParameterInfo[] GetParameters ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetImplementationFlags (MethodImplAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.pns.cs
new file mode 100644 (file)
index 0000000..fe74950
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// CustomAttributeBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class CustomAttributeBuilder
+       {
+               public CustomAttributeBuilder (ConstructorInfo con, object[] constructorArgs)
+               {
+                       throw new PlatformNotSupportedException ();                     
+               }
+
+               public CustomAttributeBuilder (ConstructorInfo con, object[] constructorArgs, FieldInfo[] namedFields, object[] fieldValues)
+               {
+                       throw new PlatformNotSupportedException ();                     
+               }
+
+               public CustomAttributeBuilder (ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues)
+               {
+                       throw new PlatformNotSupportedException ();                     
+               }
+
+               public CustomAttributeBuilder (ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues, FieldInfo[] namedFields, object[] fieldValues)
+               {
+                       throw new PlatformNotSupportedException ();                     
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.pns.cs
new file mode 100644 (file)
index 0000000..e518bc4
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// EnumBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class EnumBuilder : TypeInfo
+       {
+               public FieldBuilder UnderlyingField {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Assembly Assembly {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string AssemblyQualifiedName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type BaseType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string FullName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Guid GUID {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Module Module {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+               
+               public override string Namespace {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public TypeInfo CreateTypeInfo ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineLiteral (string literalName, object literalValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override System.Type GetElementType ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }               
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+               
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/EventBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/EventBuilder.pns.cs
new file mode 100644 (file)
index 0000000..159585c
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// EventBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class EventBuilder
+       {               
+               public void AddOtherMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetAddOnMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetRaiseMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetRemoveOnMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.pns.cs
new file mode 100644 (file)
index 0000000..c25a5e3
--- /dev/null
@@ -0,0 +1,86 @@
+//
+// FieldBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class FieldBuilder : FieldInfo
+       {
+               public override FieldAttributes Attributes {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type DeclaringType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type FieldType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override object GetValue (object obj)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetConstant (object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetOffset (int iOffset)
+               {
+                       throw new PlatformNotSupportedException ();
+               }               
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs
new file mode 100644 (file)
index 0000000..7729596
--- /dev/null
@@ -0,0 +1,115 @@
+//
+// GenericTypeParameterBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class GenericTypeParameterBuilder : TypeInfo
+       {
+               public override Assembly Assembly {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string AssemblyQualifiedName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type BaseType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string FullName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Guid GUID {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Module Module {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Namespace {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type GetElementType ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetBaseTypeConstraint (Type baseTypeConstraint)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetGenericParameterAttributes (GenericParameterAttributes genericParameterAttributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetInterfaceConstraints (Type[] interfaceConstraints)
+               {
+                       throw new PlatformNotSupportedException ();
+               }       
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.pns.cs b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.pns.cs
new file mode 100644 (file)
index 0000000..3be336f
--- /dev/null
@@ -0,0 +1,229 @@
+//
+// ILGenerator.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class ILGenerator
+       {
+               ILGenerator ()
+               {
+               }
+
+               public int ILOffset {
+                       get     {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public virtual void BeginCatchBlock (Type exceptionType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void BeginExceptFilterBlock ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual Label BeginExceptionBlock ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void BeginFaultBlock ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void BeginFinallyBlock ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void BeginScope ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual LocalBuilder DeclareLocal (Type localType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual LocalBuilder DeclareLocal (Type localType, bool pinned)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual Label DefineLabel ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, byte arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, double arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, short arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, int arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, long arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, ConstructorInfo con)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, Label label)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, Label[] labels)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, LocalBuilder local)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, SignatureHelper signature)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, FieldInfo field)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, MethodInfo meth)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               [CLSCompliant (false)]
+               public void Emit (OpCode opcode, sbyte arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, float arg)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, string str)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void Emit (OpCode opcode, Type cls)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EmitCall (OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EmitCalli (OpCode opcode, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EmitWriteLine (LocalBuilder localBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EmitWriteLine (FieldInfo fld)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EmitWriteLine (string value)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EndExceptionBlock ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void EndScope ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void MarkLabel (Label loc)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void ThrowException (Type excType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public virtual void UsingNamespace (string usingNamespace)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+       }
+}
+
+#endif
\ No newline at end of file
index 427b93d98dbb2fe9b63cfc439e1df18e5b749a18..4834aa2cf2d837e8352424331589e1a66f5f7af9 100644 (file)
@@ -30,7 +30,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -73,4 +72,3 @@ namespace System.Reflection.Emit {
                }
        }
 }
-#endif
index 98c9addf5042a6b7e3e1c3de26954577bbfcc4b8..0c56edfb369ebfe7f56973b0d55eee044d7b76ad 100644 (file)
 // (C) 2001, 2002 Ximian, Inc.  http://www.ximian.com
 //
 
-#if !FULL_AOT_RUNTIME
 using System;
 using System.Reflection;
-using System.Reflection.Emit;
 using System.Globalization;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
@@ -44,10 +42,16 @@ using System.Diagnostics.SymbolStore;
 
 namespace System.Reflection.Emit {
        [ComVisible (true)]
+#if !FULL_AOT_RUNTIME
        [ComDefaultInterface (typeof (_LocalBuilder))]
+#endif
        [ClassInterface (ClassInterfaceType.None)]
        [StructLayout (LayoutKind.Sequential)]
-       public sealed class LocalBuilder : LocalVariableInfo, _LocalBuilder {
+       public sealed class LocalBuilder : LocalVariableInfo
+#if !FULL_AOT_RUNTIME
+               , _LocalBuilder
+#endif
+       {
 
                // Some fields are already defined in LocalVariableInfo
                #region Sync with reflection.h
@@ -108,7 +112,7 @@ namespace System.Reflection.Emit {
                internal int EndOffset {
                        get { return endOffset; }
                }
-
+#if !FULL_AOT_RUNTIME
                void _LocalBuilder.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
                {
                        throw new NotImplementedException ();
@@ -128,6 +132,6 @@ namespace System.Reflection.Emit {
                {
                        throw new NotImplementedException ();
                }
+#endif
        }
 }
-#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.pns.cs
new file mode 100644 (file)
index 0000000..49ef26b
--- /dev/null
@@ -0,0 +1,112 @@
+//
+// MethodBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class MethodBuilder : MethodInfo
+       {
+               public bool InitLocals { get; set; }
+
+               public override MethodAttributes Attributes {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type DeclaringType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public GenericTypeParameterBuilder[] DefineGenericParameters (string[] names)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ParameterBuilder DefineParameter (int position, ParameterAttributes attributes, string strParamName)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ILGenerator GetILGenerator ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ILGenerator GetILGenerator (int size)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override System.Reflection.ParameterInfo[] GetParameters ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetImplementationFlags (MethodImplAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetParameters (Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetReturnType (Type returnType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetSignature (Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.pns.cs
new file mode 100644 (file)
index 0000000..88d741d
--- /dev/null
@@ -0,0 +1,122 @@
+//
+// ModuleBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class ModuleBuilder : Module
+       {
+               public void CreateGlobalFunctions ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public EnumBuilder DefineEnum (string name, TypeAttributes visibility, Type underlyingType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineInitializedData (string name, byte[] data, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, int typesize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize packsize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, Type[] interfaces)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize packingSize, int typesize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineUninitializedData (string name, int size, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodInfo GetArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.pns.cs
new file mode 100644 (file)
index 0000000..d9b1bab
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// ParameterBuilder.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class ParameterBuilder
+       {
+               ParameterBuilder ()
+               {
+               }
+
+               public int Attributes {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public bool IsIn {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public bool IsOptional {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public bool IsOut {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public int Position {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public virtual void SetConstant (object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.pns.cs
new file mode 100644 (file)
index 0000000..f0e709d
--- /dev/null
@@ -0,0 +1,108 @@
+//
+// PropertyBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class PropertyBuilder : PropertyInfo
+       {
+               public override PropertyAttributes Attributes {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override bool CanRead {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override bool CanWrite {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type DeclaringType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+               
+               public override Type PropertyType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public void AddOtherMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetConstant (object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetGetMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetSetMethod (MethodBuilder mdBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override ParameterInfo[] GetIndexParameters ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.pns.cs b/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.pns.cs
new file mode 100644 (file)
index 0000000..7aa0a27
--- /dev/null
@@ -0,0 +1,116 @@
+//
+// SignatureHelper.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public class SignatureHelper
+       {
+               SignatureHelper ()
+               {                       
+               }
+               
+               public void AddArgument (Type clsArgument)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void AddArgument (Type argument, bool pinned)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void AddArgument (Type argument, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void AddArguments (Type[] arguments, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void AddSentinel ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetFieldSigHelper (Module mod)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetLocalVarSigHelper ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetLocalVarSigHelper (Module mod)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetMethodSigHelper (CallingConventions callingConvention, Type returnType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetMethodSigHelper (Module mod, CallingConventions callingConvention, Type returnType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetMethodSigHelper (Module mod, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetPropertySigHelper (Module mod, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetPropertySigHelper (Module mod, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static SignatureHelper GetPropertySigHelper (Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public byte[] GetSignature ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.pns.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.pns.cs
new file mode 100644 (file)
index 0000000..ba97e01
--- /dev/null
@@ -0,0 +1,284 @@
+//
+// TypeBuilder.pns.cs
+//
+// Authors:
+//   Marek Safar (marek.safar@gmail.com)
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if FULL_AOT_RUNTIME
+
+namespace System.Reflection.Emit
+{
+       public abstract class TypeBuilder : TypeInfo
+       {
+               public const int UnspecifiedTypeSize = 0;
+
+               public PackingSize PackingSize {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public int Size {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Assembly Assembly {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string AssemblyQualifiedName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Type BaseType {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string FullName {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Guid GUID {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override Module Module {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Name {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public override string Namespace {
+                       get {
+                               throw new PlatformNotSupportedException ();
+                       }
+               }
+
+               public void AddInterfaceImplementation (Type interfaceType)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeInfo CreateTypeInfo ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ConstructorBuilder DefineConstructor (MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ConstructorBuilder DefineConstructor (MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ConstructorBuilder DefineDefaultConstructor (MethodAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public EventBuilder DefineEvent (string name, EventAttributes attributes, Type eventtype)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineField (string fieldName, Type type, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineField (string fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public GenericTypeParameterBuilder[] DefineGenericParameters (string[] names)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineInitializedData (string name, byte[] data, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineMethod (string name, MethodAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineMethod (string name, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void DefineMethodOverride (MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, int typeSize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packSize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, Type[] interfaces)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public ConstructorBuilder DefineTypeInitializer ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public FieldBuilder DefineUninitializedData (string name, int size, FieldAttributes attributes)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static ConstructorInfo GetConstructor (Type type, ConstructorInfo constructor)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static FieldInfo GetField (Type type, FieldInfo field)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static MethodInfo GetMethod (Type type, MethodInfo method)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public bool IsCreated ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetParent (Type parent)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public override Type GetElementType ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index dab16f74fb90ea18cb75a58f8766c82d6d8913d7..9dbb35f5773c119b527b16c2cd6532f8cc1e866c 100644 (file)
@@ -270,6 +270,7 @@ System.Reflection.Emit/AssemblyBuilderAccess.cs
 System.Reflection.Emit/ConstructorBuilder.cs
 System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
 System.Reflection.Emit/CustomAttributeBuilder.cs
+System.Reflection.Emit/CustomAttributeBuilder.pns.cs
 System.Reflection.Emit/DerivedTypes.cs
 System.Reflection.Emit/DynamicILInfo.cs
 System.Reflection.Emit/DynamicMethod.cs
@@ -283,6 +284,7 @@ System.Reflection.Emit/FieldToken.cs
 System.Reflection.Emit/FlowControl.cs
 System.Reflection.Emit/GenericTypeParameterBuilder.cs
 System.Reflection.Emit/ILGenerator.cs
+System.Reflection.Emit/ILGenerator.pns.cs
 System.Reflection.Emit/Label.cs
 System.Reflection.Emit/LocalBuilder.cs
 System.Reflection.Emit/MethodBuilder.cs
@@ -298,18 +300,34 @@ System.Reflection.Emit/OpCodeType.cs
 System.Reflection.Emit/OperandType.cs
 System.Reflection.Emit/PackingSize.cs
 System.Reflection.Emit/ParameterBuilder.cs
+System.Reflection.Emit/ParameterBuilder.pns.cs
 System.Reflection.Emit/ParameterToken.cs
 System.Reflection.Emit/PEFileKinds.cs
 System.Reflection.Emit/PropertyBuilder.cs
 System.Reflection.Emit/PropertyOnTypeBuilderInst.cs
 System.Reflection.Emit/PropertyToken.cs
 System.Reflection.Emit/SignatureHelper.cs
+System.Reflection.Emit/SignatureHelper.pns.cs
 System.Reflection.Emit/SignatureToken.cs
 System.Reflection.Emit/StackBehaviour.cs
 System.Reflection.Emit/StringToken.cs
 System.Reflection.Emit/TypeBuilder.cs
 System.Reflection.Emit/TypeToken.cs
 System.Reflection.Emit/UnmanagedMarshal.cs
+System.Reflection.Emit/AssemblyBuilder.pns.cs
+System.Reflection.Emit/ConstructorBuilder.pns.cs
+System.Reflection.Emit/CustomAttributeBuilder.pns.cs
+System.Reflection.Emit/EnumBuilder.pns.cs
+System.Reflection.Emit/EventBuilder.pns.cs
+System.Reflection.Emit/FieldBuilder.pns.cs
+System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs
+System.Reflection.Emit/ILGenerator.pns.cs
+System.Reflection.Emit/MethodBuilder.pns.cs
+System.Reflection.Emit/ModuleBuilder.pns.cs
+System.Reflection.Emit/ParameterBuilder.pns.cs
+System.Reflection.Emit/PropertyBuilder.pns.cs
+System.Reflection.Emit/SignatureHelper.pns.cs
+System.Reflection.Emit/TypeBuilder.pns.cs
 System.Reflection.Metadata/AssemblyExtensions.cs
 System.Resources/Win32Resources.cs
 System.Runtime/GCLargeObjectHeapCompactionMode.cs