summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-01-08 22:55:58 -0800
committerJan Kotas <jkotas@microsoft.com>2019-01-09 09:23:32 -0800
commitb2ea27c2959f2d50702cffb6cb0698a36da8167e (patch)
treea63622fec7d903d006fe6f58dc730bdf5f805442 /src
parentc44b38fec5db8c0957cd15dd17164084b4af4011 (diff)
downloadcoreclr-b2ea27c2959f2d50702cffb6cb0698a36da8167e.tar.gz
coreclr-b2ea27c2959f2d50702cffb6cb0698a36da8167e.tar.bz2
coreclr-b2ea27c2959f2d50702cffb6cb0698a36da8167e.zip
Delete files moved to shared partition
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/System.Private.CoreLib.csproj13
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs5
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs52
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs26
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComMemberType.cs13
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs31
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs29
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs36
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs15
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomFactory.cs11
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomMarshaler.cs22
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs25
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs6
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs21
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs21
15 files changed, 4 insertions, 322 deletions
diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index d901db3355..0be3c65690 100644
--- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -252,22 +252,12 @@
<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" />
@@ -277,8 +267,6 @@
<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" />
@@ -338,7 +326,6 @@
<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" />
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
index d246f55748..3bef38a0b7 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
@@ -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
index dd2ec7bd9d..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs
+++ /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
index ae7e6e445c..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs
+++ /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
index 4be75b03b9..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComMemberType.cs
+++ /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
index 429e65f0af..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs
+++ /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
index b96ba43a0e..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs
+++ /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
index af139f83fa..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs
+++ /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
index 9ef34004c6..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs
+++ /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
index 799db6a2d3..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomFactory.cs
+++ /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
index 164304512a..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomMarshaler.cs
+++ /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
index b0e6534aab..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs
+++ /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);
- }
-}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs
index ed3d648586..5e9fd31081 100644
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs
+++ b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs
@@ -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
index 4f5a6b3bcd..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs
+++ /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
index 0266987316..0000000000
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs
+++ /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;
- }
-}