summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/System.Private.CoreLib.csproj1
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems63
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs11
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs14
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs2
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs2
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs21
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs17
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs48
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs (renamed from src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumerable.cs)0
10 files changed, 98 insertions, 81 deletions
diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index 07f25c67ca..d901db3355 100644
--- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -257,6 +257,7 @@
<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" />
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 4d89fb0d4c..d0d7d8edea 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -556,9 +556,28 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\ExceptionServices\ExceptionNotification.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\ExceptionServices\HandleProcessCorruptedStateExceptionsAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IBindCtx.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IConnectionPoint.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IConnectionPointContainer.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IEnumConnectionPoints.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IEnumConnections.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IEnumMoniker.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IEnumString.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IEnumVARIANT.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IMoniker.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IPersistFile.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IRunningObjectTable.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\IStream.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\ITypeComp.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\ITypeInfo.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\ITypeInfo2.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\ITypeLib.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComTypes\ITypeLib2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\BestFitMappingAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\CallingConvention.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\CharSet.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComImportAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComInterfaceType.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ComVisibleAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\CriticalHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\DefaultCharSetAttribute.cs" />
@@ -568,13 +587,15 @@
<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\LCIDConversionAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\HandleRef.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InterfaceTypeAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\LayoutKind.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MarshalAsAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MarshalDirectiveException.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MemoryMarshal.Fast.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MemoryMarshal.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MemoryMarshal.Fast.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\NativeCallableAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\OptionalAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\OutAttribute.cs" />
@@ -942,26 +963,6 @@
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.Win32.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TimeZoneInfo.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(IsProjectNLibrary)' != 'true'">
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IBindCtx.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IConnectionPoint.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IConnectionPointContainer.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumConnectionPoints.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumConnections.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumerable.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumMoniker.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumString.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IEnumVARIANT.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IMoniker.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IPersistFile.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IRunningObjectTable.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\IStream.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\ITypeComp.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\ITypeInfo.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\ITypeInfo2.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\ITypeLib.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\InteropServices\ComTypes\ITypeLib2.cs" />
- </ItemGroup>
<ItemGroup Condition="$(TargetsWindows) and '$(EnableWinRT)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStream.WinRT.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.CreateFile2.cs" />
@@ -1073,17 +1074,17 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\X86\Ssse3.PlatformNotSupported.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' == 'true' AND '$(Platform)' == 'arm64'">
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Aes.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Base.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Sha1.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Sha256.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Simd.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Aes.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Base.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Sha1.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Sha256.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Simd.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureHardwareIntrinsics)' != 'true' OR '$(Platform)' != 'arm64'">
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Aes.PlatformNotSupported.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Base.PlatformNotSupported.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Sha1.PlatformNotSupported.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Sha256.PlatformNotSupported.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)\System\Runtime\Intrinsics\Arm\Arm64\Simd.PlatformNotSupported.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Aes.PlatformNotSupported.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Base.PlatformNotSupported.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Sha1.PlatformNotSupported.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Sha256.PlatformNotSupported.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Arm\Arm64\Simd.PlatformNotSupported.cs" />
</ItemGroup>
</Project>
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs
new file mode 100644
index 0000000000..a290bf4510
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs
@@ -0,0 +1,11 @@
+// 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.Class | AttributeTargets.Interface, Inherited = false)]
+ public sealed class ComImportAttribute : Attribute
+ {
+ }
+}
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs
new file mode 100644
index 0000000000..03b8ae534a
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs
@@ -0,0 +1,14 @@
+// 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 ComInterfaceType
+ {
+ InterfaceIsDual = 0,
+ InterfaceIsIUnknown = 1,
+ InterfaceIsIDispatch = 2,
+ InterfaceIsIInspectable = 3,
+ }
+}
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs
index fcca685ad8..b2ce1928a1 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs
@@ -5,7 +5,7 @@
namespace System.Runtime.InteropServices.ComTypes
{
[Guid("B196B286-BAB4-101A-B69C-00AA00341D07")]
- [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface IConnectionPoint
{
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs
index 76ff8a9be5..61703d1cfe 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs
@@ -23,7 +23,7 @@ namespace System.Runtime.InteropServices.ComTypes
[PreserveSig]
new void ReleaseTLibAttr(IntPtr pTLibAttr);
void GetCustData(ref Guid guid, out object pVarVal);
- [LCIDConversionAttribute(1)]
+ [LCIDConversion(1)]
void GetDocumentation2(int index, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll);
void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames);
void GetAllCustData(IntPtr pCustData);
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs
new file mode 100644
index 0000000000..695faa7937
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs
@@ -0,0 +1,21 @@
+// 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.Interface, Inherited = false)]
+ public sealed class InterfaceTypeAttribute : Attribute
+ {
+ public InterfaceTypeAttribute(ComInterfaceType interfaceType)
+ {
+ Value = interfaceType;
+ }
+ public InterfaceTypeAttribute(short interfaceType)
+ {
+ Value = (ComInterfaceType)interfaceType;
+ }
+
+ public ComInterfaceType Value { get; }
+ }
+}
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs
new file mode 100644
index 0000000000..75f8fcfc91
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs
@@ -0,0 +1,17 @@
+// 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.Method, Inherited = false)]
+ public sealed class LCIDConversionAttribute : Attribute
+ {
+ public LCIDConversionAttribute(int lcid)
+ {
+ Value = lcid;
+ }
+
+ public int Value { get; }
+ }
+}
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs
index d1396d7d2c..ed7a28d6f6 100644
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs
+++ b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs
@@ -40,33 +40,6 @@ namespace System.Runtime.InteropServices
public int Value => _val;
}
- public enum ComInterfaceType
- {
- InterfaceIsDual = 0,
- InterfaceIsIUnknown = 1,
- InterfaceIsIDispatch = 2,
-
- InterfaceIsIInspectable = 3,
- }
-
- [AttributeUsage(AttributeTargets.Interface, Inherited = false)]
- public sealed class InterfaceTypeAttribute : Attribute
- {
- internal ComInterfaceType _val;
-
- public InterfaceTypeAttribute(ComInterfaceType interfaceType)
- {
- _val = interfaceType;
- }
-
- public InterfaceTypeAttribute(short interfaceType)
- {
- _val = (ComInterfaceType)interfaceType;
- }
-
- public ComInterfaceType Value => _val;
- }
-
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ComDefaultInterfaceAttribute : Attribute
{
@@ -105,19 +78,6 @@ namespace System.Runtime.InteropServices
public ClassInterfaceType Value => _val;
}
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class LCIDConversionAttribute : Attribute
- {
- internal int _val;
-
- public LCIDConversionAttribute(int lcid)
- {
- _val = lcid;
- }
-
- public int Value => _val;
- }
-
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ProgIdAttribute : Attribute
{
@@ -164,14 +124,6 @@ namespace System.Runtime.InteropServices
public string Value => _val;
}
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
- public sealed class ComImportAttribute : Attribute
- {
- public ComImportAttribute()
- {
- }
- }
-
[AttributeUsage(AttributeTargets.Interface, Inherited = false)]
public sealed class CoClassAttribute : Attribute
{
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumerable.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs
index e541960cae..e541960cae 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumerable.cs
+++ b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs