Removes PNSE version of DispatchWrapper and keep only single version with ifdef
authorMarek Safar <marek.safar@gmail.com>
Wed, 9 Jan 2019 09:44:46 +0000 (10:44 +0100)
committerJan Kotas <jkotas@microsoft.com>
Wed, 9 Jan 2019 17:23:32 +0000 (09:23 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/006771e3e7d2037a66093008b9c17e4927cd4745

src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NonPortable.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs

index 49047a8..590a551 100644 (file)
@@ -203,16 +203,6 @@ namespace System.Runtime.InteropServices
         }
     }
 
-    public class DispatchWrapper
-    {
-        public DispatchWrapper(object obj)
-        {
-            throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
-        }
-
-        public object WrappedObject => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
-    }
-
     public static class ComEventsHelper
     {
         public static void Combine(object rcw, Guid iid, int dispid, Delegate d)
index b5c1d2b..12f0abc 100644 (file)
@@ -24,7 +24,7 @@ namespace System.Runtime.InteropServices
         {
             if (obj != null)
             {
-#if CORERT
+#if CORERT || !FEATURE_COMINTEROP
                 throw new PlatformNotSupportedException();
 #else
                 // Make sure this guy has an IDispatch