[bcl] More netstandard api matching
authorMarek Safar <marek.safar@gmail.com>
Tue, 23 Aug 2016 22:26:23 +0000 (00:26 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 23 Aug 2016 22:27:01 +0000 (00:27 +0200)
mcs/class/Facades/System.Reflection.Emit.ILGeneration/AssemblyInfo.cs
mcs/class/Facades/System.Reflection.Emit.Lightweight/AssemblyInfo.cs
mcs/class/Facades/System.Reflection.Emit/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
mcs/class/System.Runtime.InteropServices.RuntimeInformation/Assembly/AssemblyInfo.cs
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/dispatchwrapper.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/errorwrapper.cs

index d9427c8562df6487a46975c45099eedec21584ca..8b9f6f86f5e9d2c2b029e77d896c9f54396a0f10 100644 (file)
@@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany ("Xamarin, Inc.")]
 [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
 [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
 [assembly: AssemblyInformationalVersion ("4.0.0.0")]
 [assembly: AssemblyFileVersion ("4.0.0.0")]
 [assembly: AssemblyDelaySign (true)]
index 11f62613d08ffd5a2322a42016e8873a974d4740..cd48993eda733461a63b78affd8406309de47df9 100644 (file)
@@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany ("Xamarin, Inc.")]
 [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
 [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
 [assembly: AssemblyInformationalVersion ("4.0.0.0")]
 [assembly: AssemblyFileVersion ("4.0.0.0")]
 [assembly: AssemblyDelaySign (true)]
index 2acf0c84993cad35d47963bf436d471d0641ed3d..03e71faf4b5db5a0e72c47d9fbad04ad216a95b2 100644 (file)
@@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany ("Xamarin, Inc.")]
 [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
 [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
 [assembly: AssemblyInformationalVersion ("4.0.0.0")]
 [assembly: AssemblyFileVersion ("4.0.0.0")]
 [assembly: AssemblyDelaySign (true)]
index 94249720f6a1a2130d71d6bacff177e3bd5d47d0..361d3326ff581e40103016493acc53ccd59a4407 100644 (file)
 // THE SOFTWARE.
 // 
 
-#if !FULL_AOT_RUNTIME
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComImportAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ErrorWrapper))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DataMisalignedException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DllNotFoundException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))]
index 21e80b5733e436012cda6b5477f9ef220c5c93c0..1a408f27117fac1a5cbac388c0d2d7cbd09aa258 100644 (file)
@@ -46,7 +46,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
 [assembly: SatelliteContractVersion (Consts.FxVersion)]
 [assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
 [assembly: AssemblyFileVersion (Consts.FxFileVersion)]
index d1958f33eb26c47bb90f110544c0a88326d30685..548915c83a503ceb94dc38ad263a9753e85c147a 100644 (file)
@@ -37,10 +37,10 @@ using System;
 using System.Security;
 using System.Reflection;
 using System.Threading;
+using System.Runtime.InteropServices.ComTypes;
 
 using System.Runtime.ConstrainedExecution;
 #if !FULL_AOT_RUNTIME
-using System.Runtime.InteropServices.ComTypes;
 using Mono.Interop;
 #endif
 
@@ -197,9 +197,11 @@ namespace System.Runtime.InteropServices
                        return CreateAggregatedObject (pOuter, (object)o);
                }
 
-#if !FULL_AOT_RUNTIME
                public static object CreateWrapperOfType (object o, Type t)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        __ComObject co = o as __ComObject;
                        if (co == null)
                                throw new ArgumentException ("o must derive from __ComObject", "o");
@@ -213,12 +215,12 @@ namespace System.Runtime.InteropServices
                        }
 
                        return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy ();
+#endif
                }
 
                public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) {
                        return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper));
                }
-#endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                [ComVisible (true)]
@@ -335,15 +337,16 @@ namespace System.Runtime.InteropServices
                                return GetCCW (o, T);
                }
 #endif
+#endif // !FULL_AOT_RUNTIME
 
                public static IntPtr GetComInterfaceForObject (object o, Type T)
                {
-#if !MOBILE
+#if MOBILE
+                       throw new PlatformNotSupportedException ();
+#else
                        IntPtr pItf = GetComInterfaceForObjectInternal (o, T);
                        AddRef (pItf);
                        return pItf;
-#else
-                       throw new NotImplementedException ();
 #endif
                }
 
@@ -357,6 +360,7 @@ namespace System.Runtime.InteropServices
                        return GetComInterfaceForObject ((object)o, typeof (T));
                }
 
+#if !FULL_AOT_RUNTIME
                [MonoTODO]
                public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
                {
@@ -395,12 +399,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
-               public static int GetExceptionCode()
-               {
-                       throw new NotImplementedException ();
-               }
-
                [MonoTODO]
                [ComVisible (true)]
                public static IntPtr GetExceptionPointers()
@@ -417,7 +415,11 @@ namespace System.Runtime.InteropServices
                }
 #endif // !FULL_AOT_RUNTIME
 
-#if !FULL_AOT_RUNTIME
+               public static int GetExceptionCode ()
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
                public static int GetHRForException (Exception e)
                {
 #if FEATURE_COMINTEROP
@@ -425,6 +427,8 @@ namespace System.Runtime.InteropServices
                        SetErrorInfo (0, errorInfo);
 
                        return e._HResult;
+#elif FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
 #else                  
                        return -1;
 #endif
@@ -434,9 +438,14 @@ namespace System.Runtime.InteropServices
                [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
                public static int GetHRForLastWin32Error()
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        throw new NotImplementedException ();
+#endif
                }
 
+#if !FULL_AOT_RUNTIME
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static IntPtr GetIDispatchForObjectInternal (object o);
 
@@ -460,17 +469,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               private extern static IntPtr GetIUnknownForObjectInternal (object o);
-
-               public static IntPtr GetIUnknownForObject (object o)
-               {
-                       IntPtr pUnk = GetIUnknownForObjectInternal (o);
-                       // Internal method does not AddRef
-                       AddRef (pUnk);
-                       return pUnk;
-               }
-
                [MonoTODO]
                public static IntPtr GetIUnknownForObjectInContext (object o)
                {
@@ -490,25 +488,48 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               private extern static IntPtr GetIUnknownForObjectInternal (object o);
+
+#endif // !FULL_AOT_RUNTIME
+
+               public static IntPtr GetIUnknownForObject (object o)
+               {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
+                       IntPtr pUnk = GetIUnknownForObjectInternal (o);
+                       // Internal method does not AddRef
+                       AddRef (pUnk);
+                       return pUnk;
+#endif
+               }
+
                public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        Variant vt = new Variant();
                        vt.SetValue(obj);
                        Marshal.StructureToPtr(vt, pDstNativeVariant, false);
+#endif
                }
 
                public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) {
                        GetNativeVariantForObject ((object)obj, pDstNativeVariant);
                }
 
-#if !MOBILE
+#if !MOBILE && !FULL_AOT_RUNTIME
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private static extern object GetObjectForCCW (IntPtr pUnk);
 #endif
 
                public static object GetObjectForIUnknown (IntPtr pUnk)
                {
-#if !MOBILE
+#if MOBILE || FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        object obj = GetObjectForCCW (pUnk);
                        // was not a CCW
                        if (obj == null) {
@@ -516,24 +537,34 @@ namespace System.Runtime.InteropServices
                                obj = proxy.GetTransparentProxy ();
                        }
                        return obj;
-#else
-                       throw new NotImplementedException ();
 #endif
                }
 
                public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
                        return vt.GetValue();
+#endif
                }
 
-               public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant) {
+               public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant)
+               {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
                        return (T)vt.GetValue();
+#endif
                }
 
                public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        if (cVars < 0)
                                throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
                        object[] objects = new object[cVars];
@@ -541,9 +572,14 @@ namespace System.Runtime.InteropServices
                                objects[i] = GetObjectForNativeVariant ((IntPtr)(aSrcNativeVariant.ToInt64 () +
                                        i * SizeOf (typeof(Variant))));
                        return objects;
+#endif
                }
 
-               public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars) {
+               public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars)
+               {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        if (cVars < 0)
                                throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
                        T[] objects = new T[cVars];
@@ -551,14 +587,20 @@ namespace System.Runtime.InteropServices
                                objects[i] = GetObjectForNativeVariant<T> ((IntPtr)(aSrcNativeVariant.ToInt64 () +
                                        i * SizeOf (typeof(Variant))));
                        return objects;
+#endif
                }
 
                [MonoTODO]
                public static int GetStartComSlot (Type t)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        throw new NotImplementedException ();
+#endif
                }
 
+#if !FULL_AOT_RUNTIME
                [MonoTODO]
                [Obsolete ("This method has been deprecated")]
                public static Thread GetThreadFromFiberCookie (int cookie)
@@ -585,12 +627,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-               public static Type GetTypeFromCLSID (Guid clsid)
-               {
-                       throw new NotImplementedException ();                   
-               }
-
-#if !FULL_AOT_RUNTIME
                [Obsolete]
                [MonoTODO]
                public static string GetTypeInfoName (UCOMITypeInfo pTI)
@@ -598,11 +634,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-               public static string GetTypeInfoName (ITypeInfo typeInfo)
-               {
-                       throw new NotImplementedException ();
-               }
-
                [Obsolete]
                [MonoTODO]
                public static Guid GetTypeLibGuid (UCOMITypeLib pTLB)
@@ -654,12 +685,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-               public static object GetUniqueObjectForIUnknown (IntPtr unknown)
-               {
-                       throw new NotImplementedException ();
-               }
-#endif
-
                [MonoTODO]
                [Obsolete ("This method has been deprecated")]
                public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature)
@@ -667,16 +692,6 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
-#if !MOBILE
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static bool IsComObject (object o);
-#else
-               public static bool IsComObject (object o)
-               {
-                       throw new NotImplementedException ();
-               }
-#endif         
-
                [MonoTODO]
                public static bool IsTypeVisibleFromCom (Type t)
                {
@@ -688,6 +703,31 @@ namespace System.Runtime.InteropServices
                {
                        throw new NotImplementedException ();
                }
+#endif // !FULL_AOT_RUNTIME
+
+               public static Type GetTypeFromCLSID (Guid clsid)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static string GetTypeInfoName (ITypeInfo typeInfo)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static object GetUniqueObjectForIUnknown (IntPtr unknown)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+#if !MOBILE
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               public extern static bool IsComObject (object o);
+#else
+               public static bool IsComObject (object o)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
 #endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
@@ -950,16 +990,22 @@ namespace System.Runtime.InteropServices
 #if !FULL_AOT_RUNTIME
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static int ReleaseComObjectInternal (object co);
+#endif
 
                public static int ReleaseComObject (object o)
                {
+#if FULL_AOT_RUNTIME
+                       throw new PlatformNotSupportedException ();
+#else
                        if (o == null)
                                throw new ArgumentException ("Value cannot be null.", "o");
                        if (!IsComObject (o))
                                throw new ArgumentException ("Value must be a Com object.", "o");
                        return ReleaseComObjectInternal (o);
+#endif
                }
 
+#if !FULL_AOT_RUNTIME
                [Obsolete]
                [MonoTODO]
                public static void ReleaseThreadCache()
@@ -1630,13 +1676,11 @@ namespace System.Runtime.InteropServices
 #endif
                }
 
-#if !FULL_AOT_RUNTIME
                public static int FinalReleaseComObject (object o)
                {
                        while (ReleaseComObject (o) != 0);
                        return 0;
                }
-#endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private static extern Delegate GetDelegateForFunctionPointerInternal (IntPtr ptr, Type t);
index 756ff5d87c3c2ea70a8aa02a36da17e76e6eff18..17068f63bc9e4ad9cabf831cfc9067ba21bac739 100644 (file)
@@ -645,10 +645,7 @@ namespace System.Runtime.InteropServices{
 #endif
     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
     [System.Runtime.InteropServices.ComVisible(true)]
-#if !MONOTOUCH
-    public
-#endif
-    sealed class ComImportAttribute : Attribute
+    public sealed class ComImportAttribute : Attribute
     {
         internal static Attribute GetCustomAttribute(RuntimeType type)
         {
index 50740031b6196b51f4c4a4759f13bea1b1674cd7..9d0439d95cff13db05c1c63d0580266f59f70d10 100644 (file)
@@ -12,7 +12,7 @@
 **
 **
 =============================================================================*/
-#if !FULL_AOT_RUNTIME
+
 namespace System.Runtime.InteropServices {
    
     using System;
@@ -31,11 +31,15 @@ namespace System.Runtime.InteropServices {
         {
             if (obj != null)
             {
+#if FULL_AOT_RUNTIME
+                throw new PlatformNotSupportedException ();
+#else
                 // Make sure this guy has an IDispatch
                 IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
 
                 // If we got here without throwing an exception, the QI for IDispatch succeeded.
                 Marshal.Release(pdisp);
+#endif
             }
             m_WrappedObject = obj;
         }
@@ -51,4 +55,3 @@ namespace System.Runtime.InteropServices {
         private Object m_WrappedObject;
     }
 }
-#endif
\ No newline at end of file
index 0cf3823868c81c51fd13aeeb4f37ca1b889574ca..694412fd471faf0fd6eb03a415363e7e944e1393 100644 (file)
@@ -12,7 +12,7 @@
 **
 **
 =============================================================================*/
-#if !FULL_AOT_RUNTIME
+
 namespace System.Runtime.InteropServices {
    
     using System;
@@ -54,4 +54,3 @@ namespace System.Runtime.InteropServices {
         private int m_ErrorCode;
     }
 }
-#endif
\ No newline at end of file