diff options
author | Aaron Robinson <arobins@microsoft.com> | 2022-10-01 03:04:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 03:04:49 +0300 |
commit | 26a91ad6ac02393c6c7463500c030ec07803c5e6 (patch) | |
tree | dbcc7571355a3456c79821ef3679dc9dbf816daf /src/libraries | |
parent | ecf111211ea4b7626deac65173f3cd7fe40e794c (diff) |
Remove `IDispatchImplAttribute` API (#76416)
* Remove IDispatchImplAttribute API
This type has never been supported on .NET Core.
Removing all supporting code paths.
Diffstat (limited to 'src/libraries')
7 files changed, 0 insertions, 64 deletions
diff --git a/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs b/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs index 0ad8ac99a04..ef6ab5b7f20 100644 --- a/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs +++ b/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs @@ -17,7 +17,6 @@ using System.Runtime.InteropServices; [assembly: ComVisible(true)] // not embed [assembly: TypeLibVersion(1, 0)] // not embed // [assembly: SetWin32ContextInIDispatch()] -// [assembly: IDispatchImpl(IDispatchImplType.CompatibleImpl)] // not embed namespace MockInterop01 { diff --git a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt index dd2e06b69c3..adf9d5b07e0 100644 --- a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt +++ b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt @@ -2,8 +2,6 @@ Compat issues with assembly System.Runtime.InteropServices: TypesMustExist : Type 'System.Runtime.InteropServices.AssemblyRegistrationFlags' does not exist in the reference but it does exist in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Runtime.InteropServices.ComWrappers' changed from '[UnsupportedOSPlatformAttribute("android")]' in the implementation to '[UnsupportedOSPlatformAttribute("android")]' in the reference. TypesMustExist : Type 'System.Runtime.InteropServices.ExporterEventKind' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplAttribute' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplType' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationClassContext' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationConnectionType' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute' does not exist in the reference but it does exist in the implementation. diff --git a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj index fc2048c219a..99e288f8de5 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj +++ b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj @@ -29,8 +29,6 @@ <Compile Include="System\Runtime\InteropServices\ComUnregisterFunctionAttribute.cs" /> <Compile Include="System\Runtime\InteropServices\ExporterEventKind.cs" /> <Compile Include="System\Runtime\InteropServices\HandleCollector.cs" /> - <Compile Include="System\Runtime\InteropServices\IDispatchImplAttribute.cs" /> - <Compile Include="System\Runtime\InteropServices\IDispatchImplType.cs" /> <Compile Include="System\Runtime\InteropServices\ImportedFromTypeLibAttribute.cs" /> <Compile Include="System\Runtime\InteropServices\ManagedToNativeComInteropStubAttribute.cs" /> <Compile Include="System\Runtime\InteropServices\PrimaryInteropAssemblyAttribute.cs" /> diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs deleted file mode 100644 index dfe2ad08ddb..00000000000 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Runtime.InteropServices -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] - [Obsolete("IDispatchImplAttribute has been deprecated and is not supported.")] - public sealed class IDispatchImplAttribute : Attribute - { - public IDispatchImplAttribute(short implType) : this((IDispatchImplType)implType) - { - } - - public IDispatchImplAttribute(IDispatchImplType implType) => Value = implType; - - public IDispatchImplType Value { get; } - } -} diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs deleted file mode 100644 index fe674c3954c..00000000000 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.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. - -namespace System.Runtime.InteropServices -{ - [Obsolete("IDispatchImplAttribute and IDispatchImplType have been deprecated and are not supported.")] - public enum IDispatchImplType - { - CompatibleImpl = 2, - InternalImpl = 1, - SystemDefinedImpl = 0, - } -} diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj index 34964fb33f2..867c373eea2 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj @@ -44,7 +44,6 @@ <Compile Include="System\Runtime\InteropServices\GuidAttributeTests.cs" /> <Compile Include="System\Runtime\InteropServices\HandleCollectorTests.cs" /> <Compile Include="System\Runtime\InteropServices\HandleRefTests.cs" /> - <Compile Include="System\Runtime\InteropServices\IDispatchImplAttributeTests.cs" /> <Compile Include="System\Runtime\InteropServices\InterfaceTypeAttributeTests.cs" /> <Compile Include="System\Runtime\InteropServices\LCIDConversionAttributeTests.cs" /> <Compile Include="System\Runtime\InteropServices\LibraryImportAttributeTests.cs" /> diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs deleted file mode 100644 index ac192126f64..00000000000 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Reflection; -using Xunit; - -namespace System.Runtime.InteropServices.Tests -{ - public class IDispatchImplAttributeTests - { - [Theory] - [InlineData(-1)] - [InlineData(0)] - [InlineData(2)] - public void Ctor_ImplTypeShort(short implType) - { - Type type = Type.GetType("System.Runtime.InteropServices.IDispatchImplAttribute, System.Runtime.InteropServices"); - PropertyInfo valueProperty = type.GetProperty("Value"); - Assert.NotNull(type); - Assert.NotNull(valueProperty); - - ConstructorInfo shortConstructor = type.GetConstructor(new Type[] { typeof(short) }); - object attribute = shortConstructor.Invoke(new object[] { implType }); - Assert.Equal(implType, (int)valueProperty.GetValue(attribute)); - } - } -} |