Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8d79b61

Browse files
hughbeAaronRobinsonMSFT
authored andcommitted
Remove devdocs from System.Runtime.InteropServices code (#36669)
* Cleanup System.Runtime.InteropServices code - Move public classes/enums to their own file - Use summary instead of devdoc - Misc
1 parent e2ecd2c commit 8d79b61

40 files changed

+547
-395
lines changed

src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,48 @@
1919
<Compile Include="$(CommonPath)\Interop\Windows\Ole32\Interop.CoGetStandardMarshal.cs">
2020
<Link>Common\Interop\Windows\Ole32\Interop.CoGetStandardMarshal.cs</Link>
2121
</Compile>
22-
<Compile Include="System\Runtime\CompilerServices\Attributes.cs" />
23-
<Compile Include="System\Runtime\InteropServices\Attributes.cs" />
24-
<Compile Include="System\Runtime\InteropServices\ComAwareEventInfo.cs" />
25-
<Compile Include="System\Runtime\InteropServices\HandleCollector.cs" Condition="'$(TargetsAOT)' != 'true'" />
26-
<Compile Include="System\Runtime\InteropServices\IMarshal.cs" />
27-
<Compile Include="System\Runtime\InteropServices\RuntimeEnvironment.cs" />
28-
<Compile Include="System\Runtime\InteropServices\ComTypes\advf.cs" Condition="'$(TargetsAOT)' != 'true'" />
29-
<Compile Include="System\Runtime\InteropServices\ComTypes\datadir.cs" Condition="'$(TargetsAOT)' != 'true'" />
30-
<Compile Include="System\Runtime\InteropServices\ComTypes\dvaspect.cs" Condition="'$(TargetsAOT)' != 'true'" />
31-
<Compile Include="System\Runtime\InteropServices\ComTypes\formatetc.cs" Condition="'$(TargetsAOT)' != 'true'" />
22+
<Compile Include="System\Runtime\CompilerServices\IDispatchConstantAttribute.cs" />
23+
<Compile Include="System\Runtime\CompilerServices\IUnknownConstantAttribute.cs" />
24+
<Compile Include="System\Runtime\InteropServices\ComTypes\ADVF.cs" Condition="'$(TargetsAOT)' != 'true'" />
25+
<Compile Include="System\Runtime\InteropServices\ComTypes\DATADIR.cs" Condition="'$(TargetsAOT)' != 'true'" />
26+
<Compile Include="System\Runtime\InteropServices\ComTypes\DVASPECT.cs" Condition="'$(TargetsAOT)' != 'true'" />
27+
<Compile Include="System\Runtime\InteropServices\ComTypes\FORMATETC.cs" Condition="'$(TargetsAOT)' != 'true'" />
3228
<Compile Include="System\Runtime\InteropServices\ComTypes\IAdviseSink.cs" Condition="'$(TargetsAOT)' != 'true'" />
3329
<Compile Include="System\Runtime\InteropServices\ComTypes\IDataObject.cs" />
3430
<Compile Include="System\Runtime\InteropServices\ComTypes\IEnumFormatETC.cs" Condition="'$(TargetsAOT)' != 'true'" />
3531
<Compile Include="System\Runtime\InteropServices\ComTypes\IEnumSTATDATA.cs" />
36-
<Compile Include="System\Runtime\InteropServices\ComTypes\statdata.cs" Condition="'$(TargetsAOT)' != 'true'" />
37-
<Compile Include="System\Runtime\InteropServices\ComTypes\stgmedium.cs" Condition="'$(TargetsAOT)' != 'true'" />
38-
<Compile Include="System\Runtime\InteropServices\ComTypes\tymed.cs" Condition="'$(TargetsAOT)' != 'true'" />
32+
<Compile Include="System\Runtime\InteropServices\ComTypes\STATDATA.cs" Condition="'$(TargetsAOT)' != 'true'" />
33+
<Compile Include="System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs" Condition="'$(TargetsAOT)' != 'true'" />
34+
<Compile Include="System\Runtime\InteropServices\ComTypes\TYMED.cs" Condition="'$(TargetsAOT)' != 'true'" />
3935
<Compile Include="System\Runtime\InteropServices\AssemblyRegistrationFlags.cs" />
36+
<Compile Include="System\Runtime\InteropServices\AutomationProxyAttribute.cs" />
37+
<Compile Include="System\Runtime\InteropServices\ComAliasNameAttribute.cs" />
38+
<Compile Include="System\Runtime\InteropServices\ComAwareEventInfo.cs" />
39+
<Compile Include="System\Runtime\InteropServices\ComCompatibleVersionAttribute.cs" />
40+
<Compile Include="System\Runtime\InteropServices\ComConversionLossAttribute.cs" />
41+
<Compile Include="System\Runtime\InteropServices\ComRegisterFunctionAttribute.cs" />
42+
<Compile Include="System\Runtime\InteropServices\ComUnregisterFunctionAttribute.cs" />
4043
<Compile Include="System\Runtime\InteropServices\ExporterEventKind.cs" />
44+
<Compile Include="System\Runtime\InteropServices\HandleCollector.cs" Condition="'$(TargetsAOT)' != 'true'" />
45+
<Compile Include="System\Runtime\InteropServices\IDispatchImplAttribute.cs" />
46+
<Compile Include="System\Runtime\InteropServices\IDispatchImplType.cs" />
47+
<Compile Include="System\Runtime\InteropServices\IMarshal.cs" />
48+
<Compile Include="System\Runtime\InteropServices\ImportedFromTypeLibAttribute.cs" />
49+
<Compile Include="System\Runtime\InteropServices\ManagedToNativeComInteropStubAttribute.cs" />
50+
<Compile Include="System\Runtime\InteropServices\PrimaryInteropAssemblyAttribute.cs" />
4151
<Compile Include="System\Runtime\InteropServices\RegistrationClassContext.cs" />
4252
<Compile Include="System\Runtime\InteropServices\RegistrationConnectionType.cs" />
53+
<Compile Include="System\Runtime\InteropServices\RuntimeEnvironment.cs" />
4354
<Compile Include="System\Runtime\InteropServices\StandardOleMarshalObject.cs" />
55+
<Compile Include="System\Runtime\InteropServices\SetWin32ContextInIDispatchAttribute.cs" />
56+
<Compile Include="System\Runtime\InteropServices\TypeLibFuncAttribute.cs" />
57+
<Compile Include="System\Runtime\InteropServices\TypeLibFuncFlags.cs" />
58+
<Compile Include="System\Runtime\InteropServices\TypeLibImportClassAttribute.cs" />
59+
<Compile Include="System\Runtime\InteropServices\TypeLibTypeAttribute.cs" />
60+
<Compile Include="System\Runtime\InteropServices\TypeLibTypeFlags.cs" />
61+
<Compile Include="System\Runtime\InteropServices\TypeLibVarAttribute.cs" />
62+
<Compile Include="System\Runtime\InteropServices\TypeLibVarFlags.cs" />
63+
<Compile Include="System\Runtime\InteropServices\TypeLibVersionAttribute.cs" />
4464
<Compile Include="System\Security\SecureStringMarshal.cs" />
4565
</ItemGroup>
4666
<ItemGroup>

src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/Attributes.cs renamed to src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@
66

77
namespace System.Runtime.CompilerServices
88
{
9-
[System.AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
10-
public sealed partial class IUnknownConstantAttribute : CustomConstantAttribute
11-
{
12-
public IUnknownConstantAttribute() { }
13-
14-
public override object Value => new UnknownWrapper(null);
15-
}
16-
17-
[System.AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
9+
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
1810
public sealed partial class IDispatchConstantAttribute : CustomConstantAttribute
1911
{
2012
public IDispatchConstantAttribute() { }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System.Runtime.InteropServices;
6+
7+
namespace System.Runtime.CompilerServices
8+
{
9+
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
10+
public sealed partial class IUnknownConstantAttribute : CustomConstantAttribute
11+
{
12+
public IUnknownConstantAttribute() { }
13+
14+
public override object Value => new UnknownWrapper(null);
15+
}
16+
}

src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/AssemblyRegistrationFlags.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System;
6-
75
namespace System.Runtime.InteropServices
86
{
97
[Flags]

src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Attributes.cs

Lines changed: 0 additions & 242 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace System.Runtime.InteropServices
6+
{
7+
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
8+
public sealed class AutomationProxyAttribute : Attribute
9+
{
10+
public AutomationProxyAttribute(bool val) => Value = val;
11+
12+
public bool Value { get; }
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace System.Runtime.InteropServices
6+
{
7+
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)]
8+
public sealed class ComAliasNameAttribute : Attribute
9+
{
10+
public ComAliasNameAttribute(string alias) => Value = alias;
11+
12+
public string Value { get; }
13+
}
14+
}

0 commit comments

Comments
 (0)