Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-12-23 07:55:56 +0300
committerJan Kotas <jkotas@microsoft.com>2017-12-23 07:55:56 +0300
commit2ceb7312863ba9daf91ee497b0a252dc2f16ec9a (patch)
tree7ce052513c2c6adcc8c7b77c2f76eb7146f81cf8
parented675760469aae13ae39b2452fcf283e07e2cf63 (diff)
Move HandleRef and GuidAttribute to shared CoreLib partition
[tfs-changeset: 1684531]
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems2
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs (renamed from src/System.Private.Interop/src/System/Runtime/InteropServices/GuidAttribute.cs)10
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs (renamed from src/System.Private.Interop/src/System/Runtime/InteropServices/HandleRef.cs)25
-rw-r--r--src/System.Private.Interop/src/System.Private.Interop.csproj2
-rw-r--r--src/System.Private.Interop/src/TypeForwarders.cs7
5 files changed, 18 insertions, 28 deletions
diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
index 90587d2bd..aaf6bfcf7 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -422,6 +422,8 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\DllImportSearchPath.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ExternalException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\FieldOffsetAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\GuidAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\HandleRef.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\LayoutKind.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MarshalAsAttribute.cs" />
diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/GuidAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs
index b6be0decc..cf60b9bf7 100644
--- a/src/System.Private.Interop/src/System/Runtime/InteropServices/GuidAttribute.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs
@@ -2,18 +2,16 @@
// 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;
-
namespace System.Runtime.InteropServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)]
public sealed class GuidAttribute : Attribute
{
- internal String _val;
- public GuidAttribute(String guid)
+ public GuidAttribute(string guid)
{
- _val = guid;
+ Value = guid;
}
- public String Value { get { return _val; } }
+
+ public string Value { get; }
}
}
diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/HandleRef.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs
index 41eb1c24b..b8dc0c0db 100644
--- a/src/System.Private.Interop/src/System/Runtime/InteropServices/HandleRef.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs
@@ -2,31 +2,27 @@
// 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;
-
namespace System.Runtime.InteropServices
{
public struct HandleRef
{
// ! Do not add or rearrange fields as the EE depends on this layout.
//------------------------------------------------------------------
- internal Object m_wrapper;
- internal IntPtr m_handle;
+ internal object _wrapper;
+ internal IntPtr _handle;
//------------------------------------------------------------------
-
- public HandleRef(Object wrapper, IntPtr handle)
+ public HandleRef(object wrapper, IntPtr handle)
{
- m_wrapper = wrapper;
- m_handle = handle;
+ _wrapper = wrapper;
+ _handle = handle;
}
- public Object Wrapper
+ public object Wrapper
{
get
{
- return m_wrapper;
+ return _wrapper;
}
}
@@ -34,19 +30,18 @@ namespace System.Runtime.InteropServices
{
get
{
- return m_handle;
+ return _handle;
}
}
-
public static explicit operator IntPtr(HandleRef value)
{
- return value.m_handle;
+ return value._handle;
}
public static IntPtr ToIntPtr(HandleRef value)
{
- return value.m_handle;
+ return value._handle;
}
}
}
diff --git a/src/System.Private.Interop/src/System.Private.Interop.csproj b/src/System.Private.Interop/src/System.Private.Interop.csproj
index a16d0f8ec..03ca92928 100644
--- a/src/System.Private.Interop/src/System.Private.Interop.csproj
+++ b/src/System.Private.Interop/src/System.Private.Interop.csproj
@@ -62,8 +62,6 @@
<Compile Include="System\Runtime\InteropServices\DispatchWrapper.cs" />
<Compile Include="System\Runtime\InteropServices\DispIdAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ErrorWrapper.cs" />
- <Compile Include="System\Runtime\InteropServices\HandleRef.cs" />
- <Compile Include="System\Runtime\InteropServices\GuidAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ICustomAdapter.cs" />
<Compile Include="System\Runtime\InteropServices\ICustomFactory.cs" />
<Compile Include="System\Runtime\InteropServices\ICustomMarshaler.cs" />
diff --git a/src/System.Private.Interop/src/TypeForwarders.cs b/src/System.Private.Interop/src/TypeForwarders.cs
index 064ea9589..03271b59a 100644
--- a/src/System.Private.Interop/src/TypeForwarders.cs
+++ b/src/System.Private.Interop/src/TypeForwarders.cs
@@ -2,8 +2,5 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.DefaultCharSetAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.DllImportSearchPath))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.OptionalAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.PreserveSigAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.GuidAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.HandleRef))]