Delete files moved to shared partition
authorJan Kotas <jkotas@microsoft.com>
Wed, 9 Jan 2019 06:55:58 +0000 (22:55 -0800)
committerJan Kotas <jkotas@microsoft.com>
Wed, 9 Jan 2019 17:23:32 +0000 (09:23 -0800)
15 files changed:
src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComMemberType.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomFactory.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomMarshaler.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs
src/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs [deleted file]
src/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs [deleted file]

index d901db3..0be3c65 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeHelpers.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\TypeDependencyAttribute.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\GcSettings.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ArrayWithOffset.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Attributes.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\BStrWrapper.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\COMException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ComMemberType.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ComTypes\IEnumerable.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CriticalHandle.CoreCLR.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CurrencyWrapper.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ErrorWrapper.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Expando\IExpando.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\GcHandle.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\GCHandleCookieTable.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomAdapter.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomFactory.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomMarshaler.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomQueryInterface.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\InvalidComObjectException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\InvalidOleVariantTypeException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Marshal.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\SafeArrayTypeMismatchException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\SafeHandle.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\SEHException.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\UnknownWrapper.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\VariantWrapper.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\Loader\AssemblyLoadContext.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\MemoryFailPoint.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\Serialization\FormatterServices.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CustomMarshalers\EnumeratorViewOfEnumVariant.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CustomMarshalers\ExpandoToDispatchExMarshaler.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CustomMarshalers\TypeToTypeInfoMarshaler.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\DispatchWrapper.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\IDispatch.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\WindowsRuntime\Attributes.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\WindowsRuntime\BindableVectorToCollectionAdapter.cs" />
index d246f55..3bef38a 100644 (file)
@@ -45,7 +45,10 @@ namespace System.Runtime.InteropServices
             return !(a == b);
         }
 
-#if !CORECLR // TODO: Cleanup
+#if CORECLR // TODO: Cleanup
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private extern int CalculateCount();
+#else
         private int CalculateCount()
         {
             if (m_array == null)
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs
deleted file mode 100644 (file)
index dd2ec7b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices
-{
-    public struct ArrayWithOffset
-    {
-        public ArrayWithOffset(object array, int offset)
-        {
-            m_array = array;
-            m_offset = offset;
-            m_count = 0;
-            m_count = CalculateCount();
-        }
-
-        public object GetArray() => m_array;
-
-        public int GetOffset() => m_offset;
-
-        public override int GetHashCode() => m_count + m_offset;
-
-        public override bool Equals(object obj)
-        {
-            return obj is ArrayWithOffset && Equals((ArrayWithOffset)obj);
-        }
-
-        public bool Equals(ArrayWithOffset obj)
-        {
-            return obj.m_array == m_array && obj.m_offset == m_offset && obj.m_count == m_count;
-        }
-
-        public static bool operator ==(ArrayWithOffset a, ArrayWithOffset b)
-        {
-            return a.Equals(b);
-        }
-
-        public static bool operator !=(ArrayWithOffset a, ArrayWithOffset b)
-        {
-            return !(a == b);
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private extern int CalculateCount();
-
-        private object m_array;
-        private int m_offset;
-        private int m_count;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs
deleted file mode 100644 (file)
index ae7e6e4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_BSTR.
-    /// </summary>
-    public sealed class BStrWrapper
-    {
-        public BStrWrapper(string value)
-        {
-            m_WrappedObject = value;
-        }
-
-        public BStrWrapper(object value)
-        {
-            m_WrappedObject = (string)value;
-        }
-
-        public string WrappedObject => m_WrappedObject;
-
-        private string m_WrappedObject;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComMemberType.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComMemberType.cs
deleted file mode 100644 (file)
index 4be75b0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    public enum ComMemberType
-    {
-        Method = 0,
-        PropGet = 1,
-        PropSet = 2
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs
deleted file mode 100644 (file)
index 429e65f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_CURRENCY.
-    /// </summary>
-    public sealed class CurrencyWrapper
-    {
-        public CurrencyWrapper(decimal obj)
-        {
-            m_WrappedObject = obj;
-        }
-
-        public CurrencyWrapper(object obj)
-        {
-            if (!(obj is decimal))
-            {
-                throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
-            }
-
-            m_WrappedObject = (decimal)obj;
-        }
-
-        public decimal WrappedObject => m_WrappedObject;
-
-        private decimal m_WrappedObject;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs
deleted file mode 100644 (file)
index b96ba43..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_DISPATCH.
-    /// </summary>
-    public sealed class DispatchWrapper
-    {
-        public DispatchWrapper(object obj)
-        {
-            if (obj != null)
-            {
-                // 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);
-            }
-            m_WrappedObject = obj;
-        }
-
-        public object WrappedObject => m_WrappedObject;
-
-        private object m_WrappedObject;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs
deleted file mode 100644 (file)
index af139f8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_ERROR.
-    /// </summary>
-    public sealed class ErrorWrapper
-    {
-        public ErrorWrapper(int errorCode)
-        {
-            m_ErrorCode = errorCode;
-        }
-
-        public ErrorWrapper(object errorCode)
-        {
-            if (!(errorCode is int))
-            {
-                throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
-            }
-
-            m_ErrorCode = (int)errorCode;
-        }
-
-        public ErrorWrapper(Exception e)
-        {
-            m_ErrorCode = Marshal.GetHRForException(e);
-        }
-
-        public int ErrorCode => m_ErrorCode;
-
-        private int m_ErrorCode;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs
deleted file mode 100644 (file)
index 9ef3400..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// The base interface that custom adapters can chose to implement
-    /// when they want to expose the underlying object.
-    /// </summary>
-    public interface ICustomAdapter
-    {
-        [return: MarshalAs(UnmanagedType.IUnknown)] object GetUnderlyingObject();
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomFactory.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomFactory.cs
deleted file mode 100644 (file)
index 799db6a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    public interface ICustomFactory
-    {
-        MarshalByRefObject CreateInstance(Type serverType);
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomMarshaler.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomMarshaler.cs
deleted file mode 100644 (file)
index 1643045..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// The base interface that must be implemented by all custom marshalers.
-    /// </summary>
-    public interface ICustomMarshaler
-    {
-        object MarshalNativeToManaged(IntPtr pNativeData);
-
-        IntPtr MarshalManagedToNative(object ManagedObj);
-
-        void CleanUpNativeData(IntPtr pNativeData);
-
-        void CleanUpManagedData(object ManagedObj);
-
-        int GetNativeDataSize();
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs
deleted file mode 100644 (file)
index b0e6534..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// The enum of the return value of IQuerable.GetInterface.
-    /// </summary>
-    public enum CustomQueryInterfaceResult
-    {
-        Handled = 0,
-        NotHandled = 1,
-        Failed = 2,
-    }
-
-    /// <summary>
-    /// the interface that be implemented by class that want to 
-    /// customize the behavior of QueryInterface.
-    /// </summary>
-    public interface ICustomQueryInterface
-    {
-        CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv);
-    }
-}
index ed3d648..5e9fd31 100644 (file)
@@ -16,12 +16,6 @@ using System.StubHelpers;
 
 namespace System.Runtime.InteropServices
 {
-    public enum CustomQueryInterfaceMode
-    {
-        Ignore = 0,
-        Allow = 1
-    }
-
     /// <summary>
     /// This class contains methods that are mainly used to marshal between unmanaged
     /// and managed types.
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs
deleted file mode 100644 (file)
index 4f5a6b3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_UNKNOWN.
-    /// </summary>
-    public sealed class UnknownWrapper
-    {
-        public UnknownWrapper(object obj)
-        {
-            m_WrappedObject = obj;
-        }
-
-        public object WrappedObject => m_WrappedObject;
-
-        private object m_WrappedObject;
-    }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs
deleted file mode 100644 (file)
index 0266987..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.Runtime.InteropServices
-{
-    /// <summary>
-    /// Wrapper that is converted to a variant with VT_BYREF | VT_VARIANT.
-    /// </summary>
-    public sealed class VariantWrapper
-    {
-        public VariantWrapper(object obj)
-        {
-            m_WrappedObject = obj;
-        }
-
-        public object WrappedObject => m_WrappedObject;
-
-        private object m_WrappedObject;
-    }
-}