From 47471fda8af6628f816f6f40ca6b44b522244454 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 11 Jul 2022 15:55:22 -0700 Subject: [PATCH] Make v1 marshaller attributes private to the test assemblies --- .../System.Private.CoreLib.Shared.projitems | 4 --- .../Marshalling/MarshalUsingAttribute.cs | 6 ++-- .../Marshalling/NativeMarshallingAttribute.cs | 6 ++-- .../Microsoft.Interop.SourceGeneration.csproj | 12 +++---- .../ref/System.Runtime.InteropServices.cs | 36 ------------------- .../CustomTypeMarshallerAttribute.cs | 0 .../CustomTypeMarshallerDirection.cs | 0 .../CustomTypeMarshallerFeatures.cs | 0 .../CustomTypeMarshallerKind.cs | 0 9 files changed, 12 insertions(+), 52 deletions(-) rename src/libraries/{System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling => System.Runtime.InteropServices/tests/Ancillary.Interop}/CustomTypeMarshallerAttribute.cs (100%) rename src/libraries/{System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling => System.Runtime.InteropServices/tests/Ancillary.Interop}/CustomTypeMarshallerDirection.cs (100%) rename src/libraries/{System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling => System.Runtime.InteropServices/tests/Ancillary.Interop}/CustomTypeMarshallerFeatures.cs (100%) rename src/libraries/{System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling => System.Runtime.InteropServices/tests/Ancillary.Interop}/CustomTypeMarshallerKind.cs (100%) diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index 6e86818b1d237..e9b7912ce26ca 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -877,10 +877,6 @@ - - - - diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/MarshalUsingAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/MarshalUsingAttribute.cs index f10c2743a6021..fefeba869b150 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/MarshalUsingAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/MarshalUsingAttribute.cs @@ -10,7 +10,7 @@ namespace System.Runtime.InteropServices.Marshalling /// This attribute is recognized by the runtime-provided source generators for source-generated interop scenarios. /// It is not used by the interop marshalling system at runtime. /// - /// + /// /// [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)] public sealed class MarshalUsingAttribute : Attribute @@ -26,7 +26,7 @@ public MarshalUsingAttribute() /// /// Create a that provides a native marshalling type and optionally size information. /// - /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with + /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with public MarshalUsingAttribute(Type nativeType) : this() { @@ -34,7 +34,7 @@ public MarshalUsingAttribute(Type nativeType) } /// - /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with + /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with /// public Type? NativeType { get; } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/NativeMarshallingAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/NativeMarshallingAttribute.cs index c4883cba97a46..2c0d604b19196 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/NativeMarshallingAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/NativeMarshallingAttribute.cs @@ -10,7 +10,7 @@ namespace System.Runtime.InteropServices.Marshalling /// This attribute is recognized by the runtime-provided source generators for source-generated interop scenarios. /// It is not used by the interop marshalling system at runtime. /// - /// + /// /// [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Delegate)] public sealed class NativeMarshallingAttribute : Attribute @@ -18,14 +18,14 @@ public sealed class NativeMarshallingAttribute : Attribute /// /// Create a that provides a native marshalling type. /// - /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with + /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with public NativeMarshallingAttribute(Type nativeType) { NativeType = nativeType; } /// - /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with + /// The marshaller type used to convert the attributed type from managed to native code. This type must be attributed with /// public Type NativeType { get; } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj index 02621feb27336..46e36c4dd721b 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj @@ -9,12 +9,12 @@ - - - + + +