<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\CriticalHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\GcHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\GCHandleCookieTable.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\HandleRef.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\ICustomMarshaler.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\InvalidOleVariantTypeException.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\Marshal.cs" />
<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" />
--- /dev/null
+// 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
+{
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)]
+ public sealed class GuidAttribute : Attribute
+ {
+ public GuidAttribute(string guid)
+ {
+ Value = guid;
+ }
+
+ public string Value { get; }
+ }
+}
// 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;
}
}
{
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;
}
}
}
}
}
- [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)
- {
- _val = guid;
- }
- public String Value { get { return _val; } }
- }
-
[AttributeUsage(AttributeTargets.Interface, Inherited = false)]
public sealed class CoClassAttribute : Attribute
{