From 334088b6596898731e24ff8e290d9c5c24fd8eaa Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 16 Apr 2026 16:04:56 -0700 Subject: [PATCH 1/7] Add WindowsRuntimeImplementationOnlyMemberAttribute Introduce an internal sealed attribute to mark implementation-only members for WinRT runtime. The attribute targets all members, is non-inherited, and is conditional on WINDOWS_RUNTIME_REFERENCE_ASSEMBLY so it is emitted only in reference assemblies; this makes it explicit which members are implementation-only and allows them to be stripped from the runtime DLL. Added at src/WinRT.Runtime2/Attributes/WindowsRuntimeImplementationOnlyMemberAttribute.cs. --- ...untimeImplementationOnlyMemberAttribute.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/WinRT.Runtime2/Attributes/WindowsRuntimeImplementationOnlyMemberAttribute.cs diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeImplementationOnlyMemberAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeImplementationOnlyMemberAttribute.cs new file mode 100644 index 000000000..7b9e858c2 --- /dev/null +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeImplementationOnlyMemberAttribute.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; + +namespace WindowsRuntime; + +/// +/// Indicates a member that is an implementation-only member, meaning it should only be included in the WinRT.Runtime.dll +/// assembly when producing the implementation .dll (not the reference assemlby) that will be used by downstream tooling too. +/// +/// +/// This attribute is used to make it clearer which members are implementation-only members (rather than just relying on whether +/// they are excluded from the compilation in some way). Additionally, this attribute is actually only emitted when producing +/// reference assemblies (where such members wouldn't be present anyway), so it can be fully stripped in the actual .dll used. +/// +[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)] +[Conditional("WINDOWS_RUNTIME_REFERENCE_ASSEMBLY")] +internal sealed class WindowsRuntimeImplementationOnlyMemberAttribute : Attribute; \ No newline at end of file From 8329ac6ddae08c08691bc973633e5803ba0abdaf Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 16 Apr 2026 16:09:12 -0700 Subject: [PATCH 2/7] Use [WindowsRuntimeImplementationOnlyMember] for implementation-only members Replace the combination of [EditorBrowsable(Never)] and [Obsolete(...)] with the single [WindowsRuntimeImplementationOnlyMember] attribute on implementation-only members across WinRT.Runtime. Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com> --- src/WinRT.Runtime2/ABI/System/Boolean.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Byte.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Char.cs | 8 +-- .../ABI/System/Collections/IEnumerable.cs | 21 ++------ .../ABI/System/Collections/IEnumerator.cs | 23 ++------ .../ABI/System/Collections/IList.cs | 23 ++------ .../ABI/System/Collections/IReadOnlyList.cs | 9 +--- .../Specialized/INotifyCollectionChanged.cs | 18 ++----- .../NotifyCollectionChangedAction.cs | 13 ++--- .../NotifyCollectionChangedEventArgs.cs | 13 ++--- .../NotifyCollectionChangedEventHandler.cs | 13 ++--- ...ollectionChangedEventHandlerEventSource.cs | 9 +--- .../DataErrorsChangedEventArgs.cs | 8 +-- .../ComponentModel/INotifyDataErrorInfo.cs | 15 ++---- .../ComponentModel/INotifyPropertyChanged.cs | 15 ++---- .../PropertyChangedEventArgs.cs | 13 ++--- .../PropertyChangedEventHandler.cs | 10 +--- .../PropertyChangedEventHandlerEventSource.cs | 8 +-- .../ABI/System/DateTimeOffset.cs | 13 ++--- src/WinRT.Runtime2/ABI/System/Double.cs | 8 +-- src/WinRT.Runtime2/ABI/System/EventHandler.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Exception.cs | 13 ++--- src/WinRT.Runtime2/ABI/System/Guid.cs | 8 +-- src/WinRT.Runtime2/ABI/System/IDisposable.cs | 18 ++----- .../ABI/System/IServiceProvider.cs | 18 ++----- src/WinRT.Runtime2/ABI/System/Int16.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Int32.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Int64.cs | 8 +-- .../ABI/System/Numerics/Matrix3x2.cs | 8 +-- .../ABI/System/Numerics/Matrix4x4.cs | 8 +-- .../ABI/System/Numerics/Plane.cs | 8 +-- .../ABI/System/Numerics/Quaternion.cs | 8 +-- .../ABI/System/Numerics/Vector2.cs | 8 +-- .../ABI/System/Numerics/Vector3.cs | 8 +-- .../ABI/System/Numerics/Vector4.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Single.cs | 8 +-- src/WinRT.Runtime2/ABI/System/String.cs | 8 +-- src/WinRT.Runtime2/ABI/System/TimeSpan.cs | 13 ++--- src/WinRT.Runtime2/ABI/System/Type.cs | 13 ++--- src/WinRT.Runtime2/ABI/System/UInt16.cs | 8 +-- src/WinRT.Runtime2/ABI/System/UInt32.cs | 8 +-- src/WinRT.Runtime2/ABI/System/UInt64.cs | 8 +-- src/WinRT.Runtime2/ABI/System/Uri.cs | 8 +-- .../ABI/System/Windows.Input/ICommand.cs | 18 ++----- .../AsyncActionCompletedHandler.cs | 8 +-- .../ABI/Windows.Foundation/AsyncStatus.cs | 8 +-- .../Collections/CollectionChange.cs | 8 +-- .../Collections/IVectorChangedEventArgs.cs | 18 ++----- ...MapChangedEventHandlerEventSource{K, V}.cs | 9 +--- ...VectorChangedEventHandlerEventSource{T}.cs | 9 +--- .../ABI/Windows.Foundation/IAsyncAction.cs | 18 ++----- .../ABI/Windows.Foundation/IAsyncInfo.cs | 18 ++----- .../IMemoryBufferReference.cs | 18 ++----- .../ABI/Windows.Foundation/IStringable.cs | 28 +++------- .../ABI/Windows.Foundation/Point.cs | 8 +-- .../ABI/Windows.Foundation/PropertyType.cs | 8 +-- .../ABI/Windows.Foundation/Rect.cs | 8 +-- .../ABI/Windows.Foundation/Size.cs | 8 +-- .../ABI/Windows.Storage.Streams/IBuffer.cs | 18 ++----- .../Windows.Storage.Streams/IInputStream.cs | 18 ++----- .../Windows.Storage.Streams/IOutputStream.cs | 18 ++----- .../IRandomAccessStream.cs | 18 ++----- .../InputStreamOptions.cs | 8 +-- .../Bindables/BindableIReadOnlyListAdapter.cs | 8 +-- .../EventRegistrationToken.cs | 8 +-- ...WindowsRuntimeDefaultInterfaceAttribute.cs | 8 +-- ...owsRuntimeExclusiveToInterfaceAttribute.cs | 8 +-- .../WindowsRuntimeMappedMetadataAttribute.cs | 8 +-- .../WindowsRuntimeMetadataAttribute.cs | 8 +-- ...WindowsRuntimeMetadataTypeNameAttribute.cs | 8 +-- .../WindowsRuntimeReferenceTypeAttribute.cs | 8 +-- .../WindowsRuntimeActivationArgsReference.cs | 6 +-- ...WindowsRuntimeActivationFactoryCallback.cs | 20 ++----- .../WindowsRuntimeActivationTypes.cs | 20 ++----- .../IAsyncActionWithProgressMethods.cs | 9 +--- ...ctionWithProgressMethodsImpl{TProgress}.cs | 9 +--- .../IAsyncOperationMethodsImpl{TResult}.cs | 9 +--- ...ProgressMethodsImpl{TResult, TProgress}.cs | 9 +--- ...amicInterfaceCastableForwarderAttribute.cs | 8 +-- ...indowsRuntimeActivationFactoryAttribute.cs | 8 +-- ...wsRuntimeComWrappersMarshallerAttribute.cs | 8 +-- ...indowsRuntimeComponentAssemblyAttribute.cs | 8 +-- ...meComponentAssemblyExportsTypeAttribute.cs | 8 +-- .../WindowsRuntimeMappedTypeAttribute.cs | 8 +-- ...indowsRuntimeReferenceAssemblyAttribute.cs | 8 +-- .../Bindables/BindableIReadOnlyListAdapter.cs | 8 +-- ...IWindowsRuntimeArrayComWrappersCallback.cs | 8 +-- ...WindowsRuntimeObjectComWrappersCallback.cs | 9 +--- ...untimeUnsealedObjectComWrappersCallback.cs | 8 +-- .../IDictionaryAdapterExtensions.cs | 8 +-- .../IDictionaryAdapter{TKey, TValue}.cs | 9 +--- .../Collections/IDictionaryMethods.cs | 10 +--- .../IDictionaryMethods{TKey, TValue}.cs | 8 +-- .../Collections/IEnumerableAdapter{T}.cs | 8 +-- .../Collections/IEnumerableMethods{T}.cs | 9 +--- .../IEnumeratorAdapterExtensions.cs | 38 +++---------- .../Collections/IEnumeratorAdapter{T}.cs | 8 +-- .../Collections/IIterableMethodsImpl{T}.cs | 9 +--- .../Collections/IIteratorMethods.cs | 9 +--- .../Collections/IIteratorMethodsImpl{T}.cs | 10 +--- .../Collections/IListAdapterExtensions.cs | 38 +++---------- .../Collections/IListAdapter{T}.cs | 8 +-- .../Collections/IListMethods.cs | 8 +-- .../Collections/IListMethods{T}.cs | 8 +-- .../IMapChangedEventArgsMethods.cs | 9 +--- .../IMapChangedEventArgsMethodsImpl{K}.cs | 10 +--- .../Collections/IMapMethods.cs | 9 +--- .../Collections/IMapMethodsImpl{K, V}.cs | 10 +--- .../Collections/IMapViewMethods.cs | 10 +--- .../Collections/IMapViewMethodsImpl{K, V}.cs | 10 +--- ...ableMapEventSourceFactory{TKey, TValue}.cs | 10 +--- .../IObservableVectorEventSourceFactory{T}.cs | 10 +--- .../IReadOnlyDictionaryAdapterExtensions.cs | 8 +-- ...ReadOnlyDictionaryAdapter{TKey, TValue}.cs | 9 +--- .../Collections/IReadOnlyDictionaryMethods.cs | 10 +--- ...ReadOnlyDictionaryMethods{TKey, TValue}.cs | 8 +-- ...nlyDictionarySplitAdapter{TKey, TValue}.cs | 8 +-- .../IReadOnlyListAdapterExtensions.cs | 38 +++---------- .../Collections/IReadOnlyListAdapter{T}.cs | 8 +-- .../Collections/IReadOnlyListMethods.cs | 8 +-- .../Collections/IReadOnlyListMethods{T}.cs | 8 +-- .../Collections/IVectorMethods.cs | 9 +--- .../Collections/IVectorMethodsImpl{T}.cs | 10 +--- .../Collections/IVectorViewMethods.cs | 9 +--- .../Collections/IVectorViewMethodsImpl{T}.cs | 10 +--- .../DispatcherQueueSynchronizationContext.cs | 8 +-- .../Events/EventHandlerEventSource.cs | 8 +-- .../EventHandlerEventSource{TEventArgs}.cs | 8 +-- ...tHandlerEventSource{TSender,TEventArgs}.cs | 8 +-- .../Events/EventRegistrationTokenTable{T}.cs | 8 +-- .../Events/EventSourceState{T}.cs | 8 +-- .../InteropServices/Events/EventSource{T}.cs | 8 +-- .../Exceptions/RestrictedErrorInfo.cs | 6 +-- .../IWindowsRuntimeInterface.cs | 8 +-- .../IWindowsRuntimeInterface{T}.cs | 10 +--- ...PairTypeElementMarshaller{TKey, TValue}.cs | 7 +-- ...agedValueTypeElementMarshaller{T, TAbi}.cs | 8 +-- ...RuntimeNullableTypeElementMarshaller{T}.cs | 6 +-- ...untimeReferenceTypeElementMarshaller{T}.cs | 8 +-- ...agedValueTypeElementMarshaller{T, TAbi}.cs | 8 +-- .../Marshalling/HStringHeader.cs | 10 +--- .../Marshalling/HStringMarshaller.cs | 8 +-- .../Marshalling/HStringReference.cs | 10 +--- .../SzArrays/ExceptionArrayMarshaller.cs | 8 +-- .../SzArrays/HStringArrayMarshaller.cs | 8 +-- ...ypeArrayElementMarshaller{TKey, TValue}.cs | 7 +-- ...alueTypeArrayElementMarshaller{T, TAbi}.cs | 8 +-- ...meNullableTypeArrayElementMarshaller{T}.cs | 6 +-- ...eReferenceTypeArrayElementMarshaller{T}.cs | 8 +-- ...alueTypeArrayElementMarshaller{T, TAbi}.cs | 8 +-- .../SzArrays/TypeArrayMarshaller.cs | 8 +-- ...untimeBlittableValueTypeArrayMarshaller.cs | 8 +-- ...imeBlittableValueTypeArrayMarshaller{T}.cs | 8 +-- ...uePairTypeArrayMarshaller{TKey, TValue}.cs | 8 +-- ...anagedValueTypeArrayMarshaller{T, TAbi}.cs | 8 +-- ...wsRuntimeNullableTypeArrayMarshaller{T}.cs | 6 +-- .../WindowsRuntimeObjectArrayMarshaller.cs | 8 +-- ...sRuntimeReferenceTypeArrayMarshaller{T}.cs | 8 +-- .../WindowsRuntimeUnknownArrayMarshaller.cs | 8 +-- ...anagedValueTypeArrayMarshaller{T, TAbi}.cs | 8 +-- .../Marshalling/TypeReference.cs | 8 +-- .../WindowsRuntimeArrayMarshaller.cs | 8 +-- .../WindowsRuntimeDelegateMarshaller.cs | 8 +-- .../WindowsRuntimeInterfaceMarshaller{T}.cs | 8 +-- ...indowsRuntimeKeyValuePairTypeMarshaller.cs | 8 +-- .../WindowsRuntimeObjectMarshaller.cs | 8 +-- .../WindowsRuntimeUnknownMarshaller.cs | 8 +-- .../WindowsRuntimeUnsealedObjectMarshaller.cs | 10 +--- .../WindowsRuntimeValueTypeMarshaller.cs | 8 +-- .../CreateObjectReferenceMarshalingType.cs | 10 +--- .../WindowsRuntimeObjectReference.cs | 8 +-- .../WindowsRuntimeObjectReferenceValue.cs | 8 +-- .../ProjectionDllExports/TokenizerHelper.cs | 8 +-- .../ProjectionImpls/IAgileObjectImpl.cs | 9 +--- .../ProjectionImpls/IInspectableImpl.cs | 8 +-- .../ProjectionImpls/IMarshalImpl.cs | 8 +-- .../ProjectionImpls/IPropertyValueImpl.cs | 10 +--- .../IReferenceImpl.Int32Enum.cs | 8 +-- .../ProjectionImpls/IStringableImpl.cs | 8 +-- .../ProjectionImpls/IUnknownImpl.cs | 9 +--- .../IWeakReferenceSourceImpl.cs | 8 +-- .../IStorageFolderHandleAccessMethods.cs | 6 +-- .../IStorageItemHandleAccessMethods.cs | 6 +-- .../Streams/WindowsRuntimeIOHelpers.cs | 6 +-- ...rfaceCastableImplementationTypeMapGroup.cs | 10 +--- .../WindowsRuntimeComWrappersTypeMapGroup.cs | 10 +--- .../WindowsRuntimeMetadataTypeMapGroup.cs | 8 +-- .../WellKnownInterfaceIIDs.g.cs | 5 +- .../InteropServices/WellKnownInterfaceIIDs.tt | 5 +- .../WindowsRuntimeComWrappersMarshal.cs | 8 +-- .../AsyncInfo/WindowsRuntimeAsyncAction.cs | 13 ++--- ...ntimeAsyncActionWithProgress{TProgress}.cs | 18 ++----- ...erationWithProgress{TResult, TProgress}.cs | 18 ++----- .../WindowsRuntimeAsyncOperation{TResult}.cs | 18 ++----- .../Bindables/WindowsRuntimeEnumerable.cs | 13 ++--- .../Bindables/WindowsRuntimeEnumerator.cs | 13 ++--- .../Bindables/WindowsRuntimeList.cs | 13 ++--- .../Bindables/WindowsRuntimeReadOnlyList.cs | 13 ++--- .../DictionaryKeyCollection{TKey, TValue}.cs | 13 ++--- ...DictionaryValueCollection{TKey, TValue}.cs | 13 ++--- ...lyDictionaryKeyCollection{TKey, TValue}.cs | 13 ++--- ...DictionaryValueCollection{TKey, TValue}.cs | 13 ++--- .../WindowsRuntimeDictionary{TKey, TValue}.cs | 18 ++----- .../WindowsRuntimeEnumerable{T}.cs | 18 ++----- .../WindowsRuntimeEnumerator{T}.cs | 18 ++----- .../Collections/WindowsRuntimeList{T}.cs | 18 ++----- ...WindowsRuntimeMapChangedEventArgs{TKey}.cs | 18 ++----- ...ndowsRuntimeObservableMap{TKey, TValue}.cs | 18 ++----- .../WindowsRuntimeObservableVector{T}.cs | 18 ++----- ...RuntimeReadOnlyDictionary{TKey, TValue}.cs | 18 ++----- .../WindowsRuntimeReadOnlyList{T}.cs | 18 ++----- .../WindowsRuntimeMemoryBufferReference.cs | 11 +--- .../Streams/WindowsRuntimeBuffer.cs | 11 +--- .../Streams/WindowsRuntimeInputStream.cs | 11 +--- .../Streams/WindowsRuntimeOutputStream.cs | 11 +--- .../WindowsRuntimeRandomAccessStream.cs | 11 +--- .../Windows.Foundation/TrustLevel.cs | 9 +--- .../Windows.UI.Xaml.Interop/TypeKind.cs | 8 +-- .../WindowsRuntimeInspectable.cs | 13 ++--- src/WinRT.Runtime2/WindowsRuntimeObject.cs | 53 ++++--------------- 220 files changed, 533 insertions(+), 1845 deletions(-) diff --git a/src/WinRT.Runtime2/ABI/System/Boolean.cs b/src/WinRT.Runtime2/ABI/System/Boolean.cs index 6c668aa2c..6d993add0 100644 --- a/src/WinRT.Runtime2/ABI/System/Boolean.cs +++ b/src/WinRT.Runtime2/ABI/System/Boolean.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class BooleanMarshaller { /// @@ -288,4 +284,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Byte.cs b/src/WinRT.Runtime2/ABI/System/Byte.cs index 4cbe37317..d9cbee4b3 100644 --- a/src/WinRT.Runtime2/ABI/System/Byte.cs +++ b/src/WinRT.Runtime2/ABI/System/Byte.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ByteMarshaller { /// @@ -456,4 +452,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Char.cs b/src/WinRT.Runtime2/ABI/System/Char.cs index 9161ddd52..f6d3f6a9a 100644 --- a/src/WinRT.Runtime2/ABI/System/Char.cs +++ b/src/WinRT.Runtime2/ABI/System/Char.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class CharMarshaller { /// @@ -288,4 +284,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs index 7c1601d3d..4b964b1b1 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -23,10 +22,7 @@ namespace ABI.System.Collections; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IEnumerableMarshaller { /// @@ -87,10 +83,7 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class IEnumerableComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -108,10 +101,7 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumerableMethods { /// @@ -124,10 +114,7 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReference thisRefere /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IEnumerableImpl { /// diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs index b6138a335..48eeb6e6e 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -23,10 +22,7 @@ namespace ABI.System.Collections; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IEnumeratorMarshaller { /// @@ -87,10 +83,7 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class IEnumeratorComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -108,10 +101,7 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorMethods { /// @@ -131,10 +121,7 @@ public static bool MoveNext(WindowsRuntimeObjectReference thisReference) /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IEnumeratorImpl { /// @@ -275,4 +262,4 @@ void IEnumerator.Reset() { throw new NotSupportedException(); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IList.cs b/src/WinRT.Runtime2/ABI/System/Collections/IList.cs index 87fea7a82..9668d4203 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/IList.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/IList.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -27,10 +26,7 @@ namespace ABI.System.Collections; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IListMarshaller { /// @@ -91,10 +87,7 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class IListComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -112,10 +105,7 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListMethods { /// @@ -188,10 +178,7 @@ public static void Clear(WindowsRuntimeObjectReference thisReference) /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IListImpl { /// @@ -551,4 +538,4 @@ void ICollection.CopyTo(Array array, int index) BindableIListMethods.CopyTo(thisReference, array, index); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs b/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs index fce2dcfe0..64f35fbc7 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.InteropServices; using WindowsRuntime; using WindowsRuntime.InteropServices; @@ -22,10 +20,7 @@ namespace ABI.System.Collections; /// type will be generated at compile time, as its runtime class name will depend on the XAML configuration being used. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class IReadOnlyListComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -38,4 +33,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return new WindowsRuntimeReadOnlyList(valueReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs index cb4bd9c62..cc3459d28 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Specialized; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; @@ -20,10 +19,7 @@ namespace ABI.System.Collections.Specialized; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyCollectionChangedMarshaller { /// @@ -44,10 +40,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(INotifyColle /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class INotifyCollectionChangedMethods { /// @@ -99,10 +92,7 @@ internal unsafe struct INotifyCollectionChangedVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyCollectionChangedImpl { /// @@ -193,4 +183,4 @@ private static HRESULT remove_CollectionChanged(void* thisPtr, EventRegistration return e.HResult; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs index 21ee72f22..106641303 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Specialized; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime; @@ -18,10 +17,7 @@ namespace ABI.System.Collections.Specialized; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class NotifyCollectionChangedActionMarshaller { /// @@ -90,10 +86,7 @@ static NotifyCollectionChangedActionInterfaceEntriesImpl() /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class NotifyCollectionChangedActionComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -117,4 +110,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownXamlInterfaceIIDs.IID_IReferenceOfNotifyCollectionChangedAction); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs index c63bfeebb..5177806fa 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Specialized; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime; @@ -17,10 +16,7 @@ namespace ABI.System.Collections.Specialized; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class NotifyCollectionChangedEventArgsMarshaller { /// @@ -151,10 +147,7 @@ static int GetOldStartingIndex(void* value) /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class NotifyCollectionChangedEventArgsComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -236,4 +229,4 @@ file static unsafe class NotifyCollectionChangedEventArgsRuntimeClassFactory return defaultInterface; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs index 9dcfdef51..3a0552fcd 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Specialized; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -19,10 +18,7 @@ namespace ABI.System.Collections.Specialized; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class NotifyCollectionChangedEventHandlerMarshaller { /// @@ -146,10 +142,7 @@ static NotifyCollectionChangedEventHandlerInterfaceEntriesImpl() /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class NotifyCollectionChangedEventHandlerComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -307,4 +300,4 @@ private static HRESULT get_Value(void* thisPtr, void** result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs index f763851ff..09a42382f 100644 --- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs +++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Specialized; -using System.ComponentModel; using WindowsRuntime; using WindowsRuntime.InteropServices; @@ -12,10 +10,7 @@ namespace ABI.System.Collections.Specialized; /// /// An implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class NotifyCollectionChangedEventHandlerEventSource : EventSource { /// @@ -53,4 +48,4 @@ protected override NotifyCollectionChangedEventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs index 3583b0b1c..19925235f 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -35,10 +34,7 @@ namespace ABI.System.ComponentModel; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class DataErrorsChangedEventArgsMarshaller { /// @@ -135,4 +131,4 @@ file static unsafe class DataErrorsChangedEventArgsRuntimeClassFactory return defaultInterface; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs index 2eb948f3a..7a22da264 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs @@ -44,10 +44,7 @@ namespace ABI.System.ComponentModel; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyDataErrorInfoMarshaller { /// @@ -68,10 +65,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyDataErrorInfoMethods { /// @@ -174,10 +168,7 @@ internal unsafe struct INotifyDataErrorInfoVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyDataErrorInfoImpl { /// diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs index 1b80d2552..e7984b5ac 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs @@ -19,10 +19,7 @@ namespace ABI.System.ComponentModel; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyPropertyChangedMarshaller { /// @@ -43,10 +40,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(INotifyPrope /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class INotifyPropertyChangedMethods { /// @@ -98,10 +92,7 @@ internal unsafe struct INotifyPropertyChangedVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class INotifyPropertyChangedImpl { /// diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs index 6574166cc..f22bd1fb5 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -14,10 +13,7 @@ namespace ABI.System.ComponentModel; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class PropertyChangedEventArgsMarshaller { /// @@ -55,10 +51,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(PropertyChan /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class PropertyChangedEventArgsComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -121,4 +114,4 @@ file static unsafe class PropertyChangedEventArgsRuntimeClassFactory return defaultInterface; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs index d457f3e19..8a01f4e47 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs @@ -18,10 +18,7 @@ namespace ABI.System.ComponentModel; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class PropertyChangedEventHandlerMarshaller { /// @@ -145,10 +142,7 @@ static PropertyChangedEventHandlerInterfaceEntriesImpl() /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class PropertyChangedEventHandlerComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs index 23ce3bda8..679680f3d 100644 --- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs +++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.ComponentModel; using WindowsRuntime; using WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace ABI.System.ComponentModel; /// /// An implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class PropertyChangedEventHandlerEventSource : EventSource { /// @@ -52,4 +48,4 @@ protected override PropertyChangedEventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs b/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs index e0e9ff87b..0f0b6b18b 100644 --- a/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs +++ b/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -39,10 +38,7 @@ namespace ABI.System; [WindowsRuntimeMappedType(typeof(global::System.DateTimeOffset))] [WindowsRuntimeReferenceType(typeof(global::System.DateTimeOffset?))] [DateTimeOffsetComWrappersMarshaller] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public struct DateTimeOffset { /// @@ -55,10 +51,7 @@ public struct DateTimeOffset /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class DateTimeOffsetMarshaller { /// @@ -335,4 +328,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Double.cs b/src/WinRT.Runtime2/ABI/System/Double.cs index 3cb89fb29..aaee82f74 100644 --- a/src/WinRT.Runtime2/ABI/System/Double.cs +++ b/src/WinRT.Runtime2/ABI/System/Double.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class DoubleMarshaller { /// @@ -512,4 +508,4 @@ private static HRESULT GetSingle(void* thisPtr, float* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/EventHandler.cs b/src/WinRT.Runtime2/ABI/System/EventHandler.cs index 84568d376..d65e9c9cd 100644 --- a/src/WinRT.Runtime2/ABI/System/EventHandler.cs +++ b/src/WinRT.Runtime2/ABI/System/EventHandler.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -46,10 +45,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class EventHandlerMarshaller { /// @@ -314,4 +310,4 @@ private static HRESULT get_Value(void* thisPtr, void** result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Exception.cs b/src/WinRT.Runtime2/ABI/System/Exception.cs index f7910c85e..fb569395f 100644 --- a/src/WinRT.Runtime2/ABI/System/Exception.cs +++ b/src/WinRT.Runtime2/ABI/System/Exception.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -38,10 +37,7 @@ namespace ABI.System; [WindowsRuntimeMetadataTypeName("Windows.Foundation.HResult")] [WindowsRuntimeMappedType(typeof(global::System.Exception))] [ExceptionComWrappersMarshaller] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public struct Exception { /// @@ -55,10 +51,7 @@ public struct Exception /// Marshaller for . /// /// This marshaller is backed by the infrastructure provided by . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ExceptionMarshaller { /// @@ -246,4 +239,4 @@ private static HRESULT get_Value(void* thisPtr, Exception* result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Guid.cs b/src/WinRT.Runtime2/ABI/System/Guid.cs index 726a87355..50eb1e89b 100644 --- a/src/WinRT.Runtime2/ABI/System/Guid.cs +++ b/src/WinRT.Runtime2/ABI/System/Guid.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class GuidMarshaller { /// @@ -317,4 +313,4 @@ private static HRESULT GetString(void* thisPtr, HSTRING* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/IDisposable.cs b/src/WinRT.Runtime2/ABI/System/IDisposable.cs index fc1b2fdb4..805b02cf7 100644 --- a/src/WinRT.Runtime2/ABI/System/IDisposable.cs +++ b/src/WinRT.Runtime2/ABI/System/IDisposable.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -41,10 +40,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IDisposableMarshaller { /// @@ -63,10 +59,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IDisposableMethods { /// @@ -99,10 +92,7 @@ internal unsafe struct IDisposableVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IDisposableImpl { /// @@ -161,4 +151,4 @@ private static HRESULT Close(void* thisPtr) IDisposableMethods.Dispose(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs b/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs index d963e7d0a..0f90747c1 100644 --- a/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs +++ b/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -41,10 +40,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IServiceProviderMarshaller { /// @@ -63,10 +59,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IServiceProviderMethods { /// @@ -114,10 +107,7 @@ internal unsafe struct IServiceProviderVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IServiceProviderImpl { /// @@ -193,4 +183,4 @@ private static HRESULT GetService(void* thisPtr, Type serviceType, void** result return IServiceProviderMethods.GetService(thisReference, serviceType); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Int16.cs b/src/WinRT.Runtime2/ABI/System/Int16.cs index 737f8f0b2..50a303c21 100644 --- a/src/WinRT.Runtime2/ABI/System/Int16.cs +++ b/src/WinRT.Runtime2/ABI/System/Int16.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Int16Marshaller { /// @@ -484,4 +480,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Int32.cs b/src/WinRT.Runtime2/ABI/System/Int32.cs index 8027851cb..bea1b46ad 100644 --- a/src/WinRT.Runtime2/ABI/System/Int32.cs +++ b/src/WinRT.Runtime2/ABI/System/Int32.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Int32Marshaller { /// @@ -491,4 +487,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Int64.cs b/src/WinRT.Runtime2/ABI/System/Int64.cs index 16e56d333..621577f8c 100644 --- a/src/WinRT.Runtime2/ABI/System/Int64.cs +++ b/src/WinRT.Runtime2/ABI/System/Int64.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Int64Marshaller { /// @@ -498,4 +494,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs index 749ddbf80..ec958b2a6 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Matrix3x2Marshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Matrix3x return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs index 9f94ecaf3..d7a3ff7d5 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Matrix4x4Marshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Matrix4x return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs index fe5ff5323..0246bba71 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class PlaneMarshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Plane* r return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs index dced508ef..853916a0f 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class QuaternionMarshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Quaterni return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs index dabd87f76..cd1065416 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Vector2Marshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector2* return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs index e463900f3..f32ae5c98 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Vector3Marshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector3* return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs index 8368e3f2a..f6fb040d3 100644 --- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs +++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -45,10 +44,7 @@ namespace ABI.System.Numerics; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class Vector4Marshaller { /// @@ -207,4 +203,4 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector4* return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Single.cs b/src/WinRT.Runtime2/ABI/System/Single.cs index a051b2ee1..5957badf4 100644 --- a/src/WinRT.Runtime2/ABI/System/Single.cs +++ b/src/WinRT.Runtime2/ABI/System/Single.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class SingleMarshaller { /// @@ -505,4 +501,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/String.cs b/src/WinRT.Runtime2/ABI/System/String.cs index 0ae612ae6..8e62c5165 100644 --- a/src/WinRT.Runtime2/ABI/System/String.cs +++ b/src/WinRT.Runtime2/ABI/System/String.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class StringMarshaller { /// @@ -443,4 +439,4 @@ private static HRESULT GetNumeric(void* thisPtr, T* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/TimeSpan.cs b/src/WinRT.Runtime2/ABI/System/TimeSpan.cs index 27fb0b68c..1763e43df 100644 --- a/src/WinRT.Runtime2/ABI/System/TimeSpan.cs +++ b/src/WinRT.Runtime2/ABI/System/TimeSpan.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -39,10 +38,7 @@ namespace ABI.System; [WindowsRuntimeMappedType(typeof(global::System.TimeSpan))] [WindowsRuntimeReferenceType(typeof(global::System.TimeSpan?))] [TimeSpanComWrappersMarshaller] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public struct TimeSpan { /// @@ -55,10 +51,7 @@ public struct TimeSpan /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class TimeSpanMarshaller { /// @@ -326,4 +319,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Type.cs b/src/WinRT.Runtime2/ABI/System/Type.cs index dfca12f52..eb5e52dab 100644 --- a/src/WinRT.Runtime2/ABI/System/Type.cs +++ b/src/WinRT.Runtime2/ABI/System/Type.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -45,10 +44,7 @@ namespace ABI.System; [WindowsRuntimeMetadataTypeName("Windows.UI.Xaml.Interop.TypeName")] [WindowsRuntimeMappedType(typeof(global::System.Type))] [TypeComWrappersMarshaller] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe struct Type { /// @@ -67,10 +63,7 @@ public unsafe struct Type /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class TypeMarshaller { /// @@ -1031,4 +1024,4 @@ public override int GetHashCode() { return _fullName.GetHashCode(); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/UInt16.cs b/src/WinRT.Runtime2/ABI/System/UInt16.cs index 236f032b3..10d05a527 100644 --- a/src/WinRT.Runtime2/ABI/System/UInt16.cs +++ b/src/WinRT.Runtime2/ABI/System/UInt16.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class UInt16Marshaller { /// @@ -470,4 +466,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/UInt32.cs b/src/WinRT.Runtime2/ABI/System/UInt32.cs index 1789d62bf..da34839df 100644 --- a/src/WinRT.Runtime2/ABI/System/UInt32.cs +++ b/src/WinRT.Runtime2/ABI/System/UInt32.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class UInt32Marshaller { /// @@ -484,4 +480,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/UInt64.cs b/src/WinRT.Runtime2/ABI/System/UInt64.cs index 66bff493e..1d92e8f02 100644 --- a/src/WinRT.Runtime2/ABI/System/UInt64.cs +++ b/src/WinRT.Runtime2/ABI/System/UInt64.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -43,10 +42,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class UInt64Marshaller { /// @@ -498,4 +494,4 @@ private static HRESULT GetDouble(void* thisPtr, double* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Uri.cs b/src/WinRT.Runtime2/ABI/System/Uri.cs index 9917d2fed..1c0beb64d 100644 --- a/src/WinRT.Runtime2/ABI/System/Uri.cs +++ b/src/WinRT.Runtime2/ABI/System/Uri.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime; @@ -35,10 +34,7 @@ namespace ABI.System; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class UriMarshaller { /// @@ -130,4 +126,4 @@ file static unsafe class UriRuntimeClassFactory return defaultInterface; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs b/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs index faf4ce394..30e5f1bbe 100644 --- a/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs +++ b/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; @@ -20,10 +19,7 @@ namespace ABI.System.Windows.Input; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ICommandMarshaller { /// @@ -44,10 +40,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(ICommand? va /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ICommandMethods { /// @@ -128,10 +121,7 @@ internal unsafe struct ICommandVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ICommandImpl { /// @@ -270,4 +260,4 @@ private static HRESULT Execute(void* thisPtr, void* parameter) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs index 1b28d99b7..3c4b5cc30 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class AsyncActionCompletedHandlerMarshaller { /// @@ -316,4 +312,4 @@ private static HRESULT get_Value(void* thisPtr, void** result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs index a48763a1b..b3904dea2 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class AsyncStatusMarshaller { /// @@ -125,4 +121,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfAsyncStatus); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs index 7528ac029..53482131a 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation.Collections; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation.Collections; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class CollectionChangeMarshaller { /// @@ -125,4 +121,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfCollectionChange); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs index 2743c2f97..81c90bbfc 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation.Collections; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IVectorChangedEventArgsMarshaller { /// @@ -54,10 +50,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(IVectorChang /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IVectorChangedEventArgsMethods { /// @@ -108,10 +101,7 @@ internal unsafe struct IVectorChangedEventArgsVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IVectorChangedEventArgsImpl { /// @@ -205,4 +195,4 @@ uint IVectorChangedEventArgs.Index return IVectorChangedEventArgsMethods.Index(thisReference); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs index 41c44d362..ddabb144e 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using Windows.Foundation.Collections; using WindowsRuntime; using WindowsRuntime.InteropServices; @@ -14,10 +12,7 @@ namespace ABI.Windows.Foundation.Collections; /// /// The type of keys in the observable map. /// The type of values in the observable map. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class MapChangedEventHandlerEventSource : EventSource> { /// @@ -49,4 +44,4 @@ protected override MapChangedEventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs index 0068c00e3..0b0299cda 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using Windows.Foundation.Collections; using WindowsRuntime; using WindowsRuntime.InteropServices; @@ -13,10 +11,7 @@ namespace ABI.Windows.Foundation.Collections; /// An implementation for . /// /// The type of elements in the observable vector. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class VectorChangedEventHandlerEventSource : EventSource> { /// @@ -48,4 +43,4 @@ protected override VectorChangedEventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs index f24d87c62..42b270406 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncActionMarshaller { /// @@ -95,10 +91,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncActionMethods { /// @@ -172,10 +165,7 @@ internal unsafe struct IAsyncActionVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncActionImpl { /// @@ -296,4 +286,4 @@ void IAsyncAction.GetResults() IAsyncActionMethods.GetResults(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs index b4d0ab989..efc4e3e02 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -29,10 +28,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncInfoMarshaller { /// @@ -51,10 +47,7 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(IAsyncInfo? /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncInfoMethods { /// @@ -154,10 +147,7 @@ internal unsafe struct IAsyncInfoVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncInfoImpl { /// @@ -350,4 +340,4 @@ void IAsyncInfo.Close() IAsyncInfoMethods.Close(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs index 516a30a0f..98a39fdf2 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,10 +30,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IMemoryBufferReferenceMarshaller { /// @@ -96,10 +92,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IMemoryBufferReferenceMethods { /// @@ -172,10 +165,7 @@ internal unsafe struct IMemoryBufferReferenceVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IMemoryBufferReferenceImpl { /// @@ -333,4 +323,4 @@ event EventHandler? IMemoryBufferReference.Close IMemoryBufferReferenceMethods.Closed(thisObject, thisReference).Unsubscribe(value); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs index 22ac08de7..600fbc53c 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -42,10 +41,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStringableMarshaller { /// @@ -129,10 +125,7 @@ public WindowsRuntimeStringable(WindowsRuntimeObjectReference nativeObjectRefere } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -148,10 +141,7 @@ public override string ToString() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; @@ -161,10 +151,7 @@ protected override bool IsOverridableInterface(in Guid iid) /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStringableMethods { /// @@ -208,10 +195,7 @@ internal unsafe struct IStringableVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStringableImpl { /// @@ -277,4 +261,4 @@ private static HRESULT ToString(void* thisPtr, HSTRING* result) return IStringableMethods.ToString(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs index f6877757a..bc656e649 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class PointMarshaller { /// @@ -275,4 +271,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs index 8982afa5a..10f90c29c 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class PropertyTypeMarshaller { /// @@ -125,4 +121,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfPropertyType); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs index 49de7b265..6b8b039f7 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class RectMarshaller { /// @@ -275,4 +271,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs index 3e502df0a..a5c950c0e 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -30,10 +29,7 @@ namespace ABI.Windows.Foundation; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class SizeMarshaller { /// @@ -275,4 +271,4 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs index 00e6a0ef5..5fd586a11 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,10 +30,7 @@ namespace ABI.Windows.Storage.Streams; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IBufferMarshaller { /// @@ -96,10 +92,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IBufferMethods { /// @@ -168,10 +161,7 @@ internal unsafe struct IBufferVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IBufferImpl { /// @@ -300,4 +290,4 @@ uint IBuffer.Length IBufferMethods.Length(thisReference, value); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs index 7e979c347..bdf115762 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,10 +30,7 @@ namespace ABI.Windows.Storage.Streams; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IInputStreamMarshaller { /// @@ -96,10 +92,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IInputStreamMethods { /// @@ -159,10 +152,7 @@ internal unsafe struct IInputStreamVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IInputStreamImpl { /// @@ -238,4 +228,4 @@ IAsyncOperationWithProgress IInputStream.ReadAsync(IBuffer buffer return IInputStreamMethods.ReadAsync(thisReference, buffer, count, options); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs index f87d69866..f1fb0a252 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,10 +30,7 @@ namespace ABI.Windows.Storage.Streams; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IOutputStreamMarshaller { /// @@ -96,10 +92,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IOutputStreamMethods { /// @@ -182,10 +175,7 @@ internal unsafe struct IOutputStreamVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IOutputStreamImpl { /// @@ -297,4 +287,4 @@ IAsyncOperation IOutputStream.FlushAsync() return IOutputStreamMethods.FlushAsync(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs index ebea98f5b..920efc39b 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,10 +30,7 @@ namespace ABI.Windows.Storage.Streams; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IRandomAccessStreamMarshaller { /// @@ -96,10 +92,7 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl /// /// Interop methods for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IRandomAccessStreamMethods { /// @@ -294,10 +287,7 @@ internal unsafe struct IRandomAccessStreamVftbl /// /// The implementation. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IRandomAccessStreamImpl { /// @@ -625,4 +615,4 @@ IRandomAccessStream IRandomAccessStream.CloneStream() return IRandomAccessStreamMethods.CloneStream(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs index fdb05a299..2ff9a41be 100644 --- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs +++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Storage.Streams; @@ -30,10 +29,7 @@ namespace ABI.Windows.Storage.Streams; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class InputStreamOptionsMarshaller { /// @@ -125,4 +121,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfInputStreamOptions); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs index 7a0bbee79..b2e99342e 100644 --- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs +++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime; @@ -87,10 +86,7 @@ static BindableIReadOnlyListAdapterInterfaceEntriesImpl() /// /// A custom implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class BindableIReadOnlyListAdapterComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute { /// @@ -212,4 +208,4 @@ private static HRESULT IndexOf(void* thisPtr, void* value, uint* index, bool* re return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs index fbb90b6c1..0582a161d 100644 --- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs +++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -25,10 +24,7 @@ namespace ABI.WindowsRuntime.InteropServices; /// /// Marshaller for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class EventRegistrationTokenMarshaller { /// @@ -187,4 +183,4 @@ private static HRESULT get_Value(void* thisPtr, EventRegistrationToken* result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs index ba327c4a6..e280fa070 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -12,10 +11,7 @@ namespace WindowsRuntime; /// on the runtime class type itself. This allows the interface type reference to be trimmed away when not needed. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeDefaultInterfaceAttribute : Attribute { /// @@ -38,4 +34,4 @@ public WindowsRuntimeDefaultInterfaceAttribute(Type runtimeClassType, Type inter /// Gets the type of the default interface for the specified Windows Runtime class type. /// public Type InterfaceType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs index 4f51b1330..b21c5264f 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -12,10 +11,7 @@ namespace WindowsRuntime; /// placed on the interface type itself. This allows the interface type reference to be trimmed away when not needed. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeExclusiveToInterfaceAttribute : Attribute { /// @@ -38,4 +34,4 @@ public WindowsRuntimeExclusiveToInterfaceAttribute(Type runtimeClassType, Type i /// Gets the type of the exclusive interface for the specified Windows Runtime class type. /// public Type InterfaceType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs index abec34fd5..db7d06d96 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -17,10 +16,7 @@ namespace WindowsRuntime; AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeMappedMetadataAttribute : Attribute { /// @@ -36,4 +32,4 @@ public WindowsRuntimeMappedMetadataAttribute(string name) /// Gets the name of the mapped source Windows Runtime metadata file (.winmd) that the current custom-mapped type is from. /// public string Name { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs index ef8d79db3..aff608ee3 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -17,10 +16,7 @@ namespace WindowsRuntime; AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeMetadataAttribute : Attribute { /// @@ -36,4 +32,4 @@ public WindowsRuntimeMetadataAttribute(string name) /// Gets the name of the source Windows Runtime metadata file (.winmd) that the current projected type is from. /// public string Name { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs index 352cae8da..3e6bceb20 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -27,10 +26,7 @@ namespace WindowsRuntime; AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeMetadataTypeNameAttribute : Attribute { /// @@ -46,4 +42,4 @@ public WindowsRuntimeMetadataTypeNameAttribute(string metadataTypeName) /// Gets the metadata type name for the current instance. /// public string MetadataTypeName { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs index 68f1a6e26..e5351a0c4 100644 --- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs +++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime; @@ -16,10 +15,7 @@ namespace WindowsRuntime; AttributeTargets.Enum, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeReferenceTypeAttribute : Attribute { /// @@ -35,4 +31,4 @@ public WindowsRuntimeReferenceTypeAttribute(Type referenceType) /// Gets the reference type (a constructed type) for the annotated type. /// public Type ReferenceType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs index 32f46e370..30ada9f78 100644 --- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs +++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -14,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// /// This type works around the lack of support for for byref-like types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public readonly ref struct WindowsRuntimeActivationArgsReference { /// diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs index cb25f7c92..a7d65e3b9 100644 --- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs +++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs @@ -1,28 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// Activation factory types to activate Windows Runtime objects with custom logic. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class WindowsRuntimeActivationFactoryCallback { /// /// A type containing logic to activate a composed Windows Runtime object. /// /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public abstract class DerivedComposed { /// @@ -43,10 +34,7 @@ public abstract unsafe void Invoke( /// A type containing logic to activate a sealed Windows Runtime object. /// /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public abstract class DerivedSealed { /// @@ -56,4 +44,4 @@ public abstract class DerivedSealed /// The resulting default interface pointer. public abstract unsafe void Invoke(WindowsRuntimeActivationArgsReference additionalParameters, out void* defaultInterface); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs index fa500e3c9..7aacaae8a 100644 --- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs +++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -15,27 +12,18 @@ namespace WindowsRuntime.InteropServices; /// constructor. Activation works differently for composed and sealed types, so these marker types are used to select /// the correct constructor overload to invoke. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class WindowsRuntimeActivationTypes { /// /// The derived type is a composed Windows Runtime type. /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public readonly ref struct DerivedComposed; /// /// The derived type is a sealed Windows Runtime type. /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public readonly ref struct DerivedSealed; -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs index b96c49447..ef22c63e7 100644 --- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IAsyncActionWithProgressMethods { /// @@ -27,4 +22,4 @@ public static void GetResults(WindowsRuntimeObjectReference thisReference) RestrictedErrorInfo.ThrowExceptionForHR(((IAsyncActionWithProgressVftbl*)*(void***)thisPtr)->GetResults(thisPtr)); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs index 95a77664e..b19197ee4 100644 --- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs +++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using Windows.Foundation; namespace WindowsRuntime.InteropServices; @@ -11,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// An interface for implementations of types. /// /// The type of progress information. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IAsyncActionWithProgressMethodsImpl { /// @@ -55,4 +50,4 @@ public interface IAsyncActionWithProgressMethodsImpl /// The instance to use to invoke the native method. /// static abstract void GetResults(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs index 9dc801b08..fddceac54 100644 --- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs +++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using Windows.Foundation; namespace WindowsRuntime.InteropServices; @@ -11,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// An interface for implementations of types. /// /// The result type. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IAsyncOperationMethodsImpl { /// @@ -40,4 +35,4 @@ public interface IAsyncOperationMethodsImpl /// The results of the operation. /// static abstract TResult GetResults(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs index 5b0fc97bf..d8f4ccb1c 100644 --- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs +++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using Windows.Foundation; namespace WindowsRuntime.InteropServices; @@ -12,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// The result type. /// The type of progress information. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IAsyncOperationWithProgressMethodsImpl { /// @@ -57,4 +52,4 @@ public interface IAsyncOperationWithProgressMethodsImpl /// The results of the operation. /// static abstract TResult GetResults(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs index bc1c6475f..174919517 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; @@ -18,14 +17,11 @@ namespace WindowsRuntime.InteropServices; /// is supported. Implementations are also expected to pre-cache the resulting object references while performing these checks. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class DynamicInterfaceCastableForwarderAttribute : Attribute { /// /// The instance to use to perform QueryInterface calls. /// The resulting for the effective interface, if available. public abstract bool IsInterfaceImplemented(WindowsRuntimeObject thisObject, [NotNullWhen(true)] out WindowsRuntimeObjectReference? interfaceReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs index 6e7bbb0ae..c641ebeb6 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// Indicates the authored Windows Runtime class type that a given activation factory is for. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeActivationFactoryAttribute : Attribute { /// @@ -29,4 +25,4 @@ public WindowsRuntimeActivationFactoryAttribute(Type runtimeClassType) /// Gets the authored Windows Runtime class type that the annotated activation factory is for. /// public Type RuntimeClassType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs index 77a19c187..0802e82b9 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -41,10 +40,7 @@ namespace WindowsRuntime.InteropServices; AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class WindowsRuntimeComWrappersMarshallerAttribute : Attribute { /// @@ -139,4 +135,4 @@ static NotSupportedException GetNotSupportedException() throw GetNotSupportedException(); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs index dd0b2a0a9..7a52538f9 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -16,10 +15,7 @@ namespace WindowsRuntime.InteropServices; /// /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeComponentAssemblyAttribute : Attribute { /// @@ -28,4 +24,4 @@ public sealed class WindowsRuntimeComponentAssemblyAttribute : Attribute public WindowsRuntimeComponentAssemblyAttribute() { } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs index 9bdc7db4e..6b1ef7118 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeComponentAssemblyExportsTypeAttribute : Attribute { /// @@ -34,4 +30,4 @@ public WindowsRuntimeComponentAssemblyExportsTypeAttribute(Type exportsType) /// Gets the type that contains the managed GetActivationFactory method to invoke for authoring scenarios. /// public Type ExportsType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs index 69e72069b..72916e1bc 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// Indicates a mapped type for a Windows Runtime type projection (ie. a metadata provider type). /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeMappedTypeAttribute : Attribute { /// @@ -29,4 +25,4 @@ public WindowsRuntimeMappedTypeAttribute(Type publicType) /// Gets the public type associated with the current instance (ie. the type that would be used directly by developers). /// public Type PublicType { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs index 6625d2f27..ed4b612b7 100644 --- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs +++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -17,10 +16,7 @@ namespace WindowsRuntime.InteropServices; /// /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class WindowsRuntimeReferenceAssemblyAttribute : Attribute { /// @@ -29,4 +25,4 @@ public sealed class WindowsRuntimeReferenceAssemblyAttribute : Attribute public WindowsRuntimeReferenceAssemblyAttribute() { } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs index 23b2862b0..67393ee26 100644 --- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs +++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// still uses "IReadOnlyList" in its name to match the naming convention of adapter types matching .NET type names. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class BindableIReadOnlyListAdapter : IEnumerable { /// @@ -58,4 +54,4 @@ public IEnumerator GetEnumerator() { return _list.GetEnumerator(); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs index 074d3e64d..aba67353d 100644 --- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs +++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// /// An interface for callbacks for , for Windows Runtime arrays. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeArrayComWrappersCallback { /// @@ -38,4 +34,4 @@ public unsafe interface IWindowsRuntimeArrayComWrappersCallback /// /// static abstract Array CreateArray(uint count, void* value); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs index 8e0e279a0..3b7a14599 100644 --- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs +++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// An interface for callbacks for , for Windows Runtime objects. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeObjectComWrappersCallback { /// @@ -47,4 +42,4 @@ public unsafe interface IWindowsRuntimeObjectComWrappersCallback /// /// static abstract object CreateObject(void* value, out CreatedWrapperFlags wrapperFlags); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs index 83f5f3d92..95f65aa87 100644 --- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs +++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// An interface for callbacks for , for unsealed Windows Runtime objects. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeUnsealedObjectComWrappersCallback { /// @@ -62,4 +58,4 @@ static abstract bool TryCreateObject( /// /// static abstract object CreateObject(void* value, out CreatedWrapperFlags wrapperFlags); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs index 47dd36770..b6094cf42 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs @@ -5,7 +5,6 @@ using System.Collections.Concurrent; using System.Collections.Frozen; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; #pragma warning disable IDE0045, IDE0046 @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// Extensions for the type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IDictionaryAdapterExtensions { extension(IDictionaryAdapter) @@ -127,4 +123,4 @@ public static void Remove(IDictionary dictionary, ReadOnlySpanThe type of keys in the dictionary. /// The type of values in the dictionary. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IDictionaryAdapter { /// @@ -115,4 +110,4 @@ public static void Remove(IDictionary dictionary, TKey key) KeyNotFoundException.ThrowKeyNotFound(); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs index e5071cfee..d8c668980 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs @@ -1,18 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// Methods for implementations of types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IDictionaryMethods { /// @@ -28,4 +22,4 @@ public static void Clear(WindowsRuntimeObjectReference thisReference) { IMapMethods.Clear(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs index 7de74cf38..d01adf88c 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; #pragma warning disable CS1573, IDE0046 @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of keys in the dictionary. /// The type of values in the dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IDictionaryMethods { /// @@ -210,4 +206,4 @@ public static bool Remove(WindowsRuntimeObjectReference thisReference, return true; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs index 5a6712311..64a72601b 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using WindowsRuntime.InteropServices.Marshalling; namespace WindowsRuntime.InteropServices; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of objects to enumerate. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumerableAdapter { /// @@ -61,4 +57,4 @@ public static unsafe void First(IEnumerable enumerable, in Guid iid, void** e *enumerator = (void*)WindowsRuntimeComWrappers.GetOrCreateComInterfaceForObjectExact(enumeratorAdapter, in iid); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs index 65ce32a78..82510e0a3 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -12,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// Methods for types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumerableMethods { /// @@ -40,4 +35,4 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReferen // object implementing 'IEnumerator', or a managed object that was passed to native as a CCW. return enumerator; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs index 0a8d3cda7..1590c2ddd 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using WindowsRuntime.InteropServices.Marshalling; namespace WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// Extensions for the type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterExtensions { // Note: all the extensions in this file match the ones in 'IReadOnlyListAdapterExtensions', @@ -170,10 +166,7 @@ public unsafe uint GetMany(uint itemsSize, ABI.System.Type* items) /// /// Extensions for the type for blittable value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterBlittableValueTypeExtensions { extension(IEnumeratorAdapter adapter) @@ -206,10 +199,7 @@ public unsafe uint GetMany(uint itemsSize, T* items) /// /// Extensions for the type for unmanaged value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterUnmanagedValueTypeExtensions { extension(IEnumeratorAdapter adapter) @@ -244,10 +234,7 @@ public unsafe uint GetMany(uint itemsSize, TAbi* items) /// /// Extensions for the type for managed value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterManagedValueTypeExtensions { extension(IEnumeratorAdapter adapter) @@ -294,10 +281,7 @@ public unsafe uint GetMany(uint itemsSize, TAbi* items) /// /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterKeyValuePairTypeExtensions { extension(IEnumeratorAdapter> adapter) @@ -342,10 +326,7 @@ public unsafe uint GetMany(uint itemsSize, void** items) /// /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterNullableTypeExtensions { extension(IEnumeratorAdapter adapter) @@ -391,10 +372,7 @@ public unsafe uint GetMany(uint itemsSize, void** items) /// /// Extensions for the type for reference types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IEnumeratorAdapterReferenceTypeExtensions { extension(IEnumeratorAdapter adapter) @@ -435,4 +413,4 @@ public unsafe uint GetMany(uint itemsSize, void** items) return index; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs index a50a24218..3cb1ffe04 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; #pragma warning disable IDE0032 @@ -16,10 +15,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of objects to enumerate. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class IEnumeratorAdapter : IEnumerator, IEnumeratorAdapter { /// @@ -204,4 +200,4 @@ private IEnumeratorAdapter Create(IEnumerator enumerator) { return new(enumerator); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs index 1b7e8eb5e..85dcf179f 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -11,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// An interface for implementations of Windows.Foundation.Collections.IIterable<T> types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IIterableMethodsImpl { /// @@ -24,4 +19,4 @@ public interface IIterableMethodsImpl /// The iterator. /// static abstract IEnumerator First(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs index 63eed64d3..43b0d88d0 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IIterator<T> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IIteratorMethods { /// @@ -54,4 +49,4 @@ public static bool MoveNext(WindowsRuntimeObjectReference thisReference) return result; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs index 785f129db..abe509295 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// An interface for implementations of Windows.Foundation.Collections.IIterator<T> types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IIteratorMethodsImpl { /// @@ -23,4 +17,4 @@ public interface IIteratorMethodsImpl /// The current element. /// static abstract T Current(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs index 55238b460..ddd8fe06d 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using WindowsRuntime.InteropServices.Marshalling; namespace WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// Extensions for the type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterExtensions { // Note: all the extensions in this file exactly match the ones in 'IReadOnlyListAdapterExtensions'. @@ -226,10 +222,7 @@ public static unsafe uint GetMany(IList list, uint startIndex, uint itemsS /// /// Extensions for the type for blittable value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterBlittableValueTypeExtensions { extension(IListAdapter) @@ -269,10 +262,7 @@ public static unsafe uint GetMany(IList list, uint startIndex, uint itemsSize /// /// Extensions for the type for unmanaged value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterUnmanagedValueTypeExtensions { extension(IListAdapter) @@ -314,10 +304,7 @@ public static unsafe uint GetMany(IList list, uint startI /// /// Extensions for the type for managed value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterManagedValueTypeExtensions { extension(IListAdapter) @@ -374,10 +361,7 @@ public static unsafe uint GetMany(IList list, uint startI /// /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterKeyValuePairTypeExtensions { extension(IListAdapter>) @@ -432,10 +416,7 @@ public static unsafe uint GetMany(IList /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterNullableTypeExtensions { extension(IListAdapter) @@ -491,10 +472,7 @@ public static unsafe uint GetMany(IList list, uint start /// /// Extensions for the type for reference types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapterReferenceTypeExtensions { extension(IListAdapter) @@ -543,4 +521,4 @@ public static unsafe uint GetMany(IList list, uint startI return (uint)itemCount; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs index 23b4ad4dd..c0f34a543 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -14,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of objects to enumerate. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListAdapter { /// @@ -203,4 +199,4 @@ public static void RemoveAtEnd(IList list) throw; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs index 8ea7bbcf5..cc2fbd85f 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; #pragma warning disable CS1573 @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListMethods { /// @@ -48,4 +44,4 @@ public static void RemoveAt(WindowsRuntimeObjectReference thisReference, int ind throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index)); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs index d5e19d09a..849ecd40d 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; #pragma warning disable CS1573 @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// Methods for types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IListMethods { /// @@ -159,4 +155,4 @@ public static void Insert(WindowsRuntimeObjectReference thisReference, throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index)); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs index df55acf04..f4caf1901 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using Windows.Foundation.Collections; @@ -11,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IMapChangedEventArgs<K> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IMapChangedEventArgsMethods { /// @@ -35,4 +30,4 @@ public static CollectionChange CollectionChange(WindowsRuntimeObjectReference th return result; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs index 41fe28b9e..2cfefc2da 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// An interface for implementations of Windows.Foundation.Collections.IMapChangedEventArgs<K> types. /// /// The type of keys in the map. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IMapChangedEventArgsMethodsImpl { /// @@ -23,4 +17,4 @@ public interface IMapChangedEventArgsMethodsImpl /// The key of the item that changed. /// static abstract K Key(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs index a59d695f6..7e0346699 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; #pragma warning disable CS1573 @@ -12,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IMap<K, V> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IMapMethods { /// @@ -39,4 +34,4 @@ public static void Clear(WindowsRuntimeObjectReference thisReference) RestrictedErrorInfo.ThrowExceptionForHR(((IMapVftbl*)*(void***)thisPtr)->Clear(thisPtr)); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs index a8a62dd20..4942f6ba9 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of keys in the map. /// The type of values in the map. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IMapMethodsImpl { /// @@ -52,4 +46,4 @@ public interface IMapMethodsImpl /// The key associated with the item to remove. /// static abstract void Remove(WindowsRuntimeObjectReference thisReference, K key); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs index 5617a0893..58e33a5c1 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs @@ -1,18 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IMapView<K, V> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IMapViewMethods { /// @@ -26,4 +20,4 @@ public static uint Size(WindowsRuntimeObjectReference thisReference) // The vtable slot for 'get_Size' is identical between 'IMapView' and 'IVectorView' return IVectorViewMethods.Size(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs index b3e2dfe47..a6056f38e 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of keys in the map. /// The type of values in the map. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IMapViewMethodsImpl { /// @@ -34,4 +28,4 @@ public interface IMapViewMethodsImpl /// if the key is found; otherwise, . /// static abstract bool HasKey(WindowsRuntimeObjectReference thisReference, K key); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs index 02c97cbd8..579de7533 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of keys in the observable map. /// The type of values in the observable map. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IObservableMapEventSourceFactory { /// @@ -24,4 +18,4 @@ public interface IObservableMapEventSourceFactory /// The instance to be used with . /// static abstract ABI.Windows.Foundation.Collections.MapChangedEventHandlerEventSource MapChanged(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs index 8ba76aa0e..47a15917c 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// An interface for implementations of types. /// /// The type of elements in the observable vector. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IObservableVectorEventSourceFactory { /// @@ -23,4 +17,4 @@ public interface IObservableVectorEventSourceFactory /// The instance to be used with . /// static abstract ABI.Windows.Foundation.Collections.VectorChangedEventHandlerEventSource VectorChanged(WindowsRuntimeObjectReference thisReference); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs index 08bd42ab3..ab432ba66 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs @@ -5,7 +5,6 @@ using System.Collections.Concurrent; using System.Collections.Frozen; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; #pragma warning disable IDE0045, IDE0046 @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// Extensions for the type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyDictionaryAdapterExtensions { extension(IReadOnlyDictionaryAdapter) @@ -103,4 +99,4 @@ public static bool HasKey(IReadOnlyDictionary dictionary, ReadOn return dictionary.ContainsKey(key.ToString()); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs index 74ac8414d..17263d77d 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -15,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// The type of keys in the dictionary. /// The type of values in the dictionary. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyDictionaryAdapter { /// @@ -84,4 +79,4 @@ public static void Split( splitAdapter.Split(out first, out second); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs index 1d240ffbf..d4b384d69 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - #pragma warning disable CS1573 namespace WindowsRuntime.InteropServices; @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyDictionaryMethods { /// @@ -24,4 +18,4 @@ public static int Count(WindowsRuntimeObjectReference thisReference) // The vtable slot for 'get_Size' and the desired semantics are identical between 'IMapView' and 'IVectorView' return IReadOnlyListMethods.Count(thisReference); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs index b0e698684..6896b7821 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; #pragma warning disable CS1573 @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of keys in the read-only dictionary. /// The type of values in the read-only dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyDictionaryMethods { /// @@ -72,4 +68,4 @@ public static bool TryGetValue(WindowsRuntimeObjectReference thisRefer return true; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs index 362f95ed7..0f6104561 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; #pragma warning disable IDE0046 @@ -17,10 +16,7 @@ namespace WindowsRuntime.InteropServices; /// The type of keys in the dictionary. /// The type of values in the dictionary. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class IReadOnlyDictionarySplitAdapter : IReadOnlyDictionary { /// @@ -214,4 +210,4 @@ public int Compare(KeyValuePair x, KeyValuePair y) return Comparer.Default.Compare(x.Key, y.Key); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs index b97b9e4d7..833895d96 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using WindowsRuntime.InteropServices.Marshalling; namespace WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// Extensions for the type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterExtensions { extension(IReadOnlyListAdapter) @@ -228,10 +224,7 @@ public static unsafe uint GetMany(IReadOnlyList list, uint startIndex, uin /// /// Extensions for the type for blittable value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterBlittableValueTypeExtensions { extension(IReadOnlyListAdapter) @@ -271,10 +264,7 @@ public static unsafe uint GetMany(IReadOnlyList list, uint startIndex, uint i /// /// Extensions for the type for unmanaged value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterUnmanagedValueTypeExtensions { extension(IReadOnlyListAdapter) @@ -316,10 +306,7 @@ public static unsafe uint GetMany(IReadOnlyList list, uin /// /// Extensions for the type for managed value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterManagedValueTypeExtensions { extension(IReadOnlyListAdapter) @@ -376,10 +363,7 @@ public static unsafe uint GetMany(IReadOnlyList list, uin /// /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterKeyValuePairTypeExtensions { extension(IReadOnlyListAdapter>) @@ -434,10 +418,7 @@ public static unsafe uint GetMany(IReadOnlyList /// Extensions for the type for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterNullableTypeExtensions { extension(IReadOnlyListAdapter) @@ -493,10 +474,7 @@ public static unsafe uint GetMany(IReadOnlyList list, ui /// /// Extensions for the type for reference types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapterReferenceTypeExtensions { extension(IReadOnlyListAdapter) @@ -545,4 +523,4 @@ public static unsafe uint GetMany(IReadOnlyList list, uin return (uint)itemCount; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs index c09c03020..bbff4742d 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of objects to enumerate. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListAdapter { /// @@ -82,4 +78,4 @@ public static bool IndexOf(IReadOnlyList list, T value, out uint index) return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs index bf27f2598..0dda9ddae 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs @@ -2,17 +2,13 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; /// /// Methods for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListMethods { /// @@ -26,4 +22,4 @@ public static int Count(WindowsRuntimeObjectReference thisReference) return (int)count; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs index 940404ba0..cdc285438 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; #pragma warning disable CS1573 @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// Methods for types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IReadOnlyListMethods { /// @@ -38,4 +34,4 @@ public static T Item(WindowsRuntimeObjectReference thisReference, int throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index)); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs index 8ca1491ae..8a5eeaacf 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IVector<T> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IVectorMethods { /// @@ -58,4 +53,4 @@ public static void Clear(WindowsRuntimeObjectReference thisReference) RestrictedErrorInfo.ThrowExceptionForHR(((IVectorVftbl*)*(void***)thisPtr)->Clear(thisPtr)); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs index 6ab067940..bc240c276 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// An interface for implementations of Windows.Foundation.Collections.IVector<T> types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IVectorMethodsImpl { /// @@ -60,4 +54,4 @@ public interface IVectorMethodsImpl /// The item to insert. /// static abstract void InsertAt(WindowsRuntimeObjectReference thisReference, uint index, T value); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs index 58f3d4b4b..57fa1057a 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +8,7 @@ namespace WindowsRuntime.InteropServices; /// /// Methods for Windows.Foundation.Collections.IVectorView<T> types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IVectorViewMethods { /// @@ -34,4 +29,4 @@ public static uint Size(WindowsRuntimeObjectReference thisReference) return result; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs index f99494d5e..52df49af0 100644 --- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// An interface for implementations of Windows.Foundation.Collections.IVectorView<T> types. /// /// The type of objects to enumerate. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IVectorViewMethodsImpl { /// @@ -24,4 +18,4 @@ public interface IVectorViewMethodsImpl /// The item at the specified index. /// static abstract T GetAt(WindowsRuntimeObjectReference thisReference, uint index); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs index 976ee2634..20e544160 100644 --- a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs +++ b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Threading; namespace WindowsRuntime.InteropServices; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// the UI thread. It needs to be installed on the UI thread through /// invoked on a wrapping managed object (which is generated in a projection .dll). /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public readonly struct DispatcherQueueSynchronizationContext { /// @@ -100,4 +96,4 @@ public void Send(SendOrPostCallback d, object? state) { throw new NotSupportedException("'SynchronizationContext.Send' is not supported."); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs index f52596ac3..a4eef5d2a 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs @@ -2,17 +2,13 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; /// /// An implementation for . /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed unsafe class EventHandlerEventSource : EventSource { /// @@ -50,4 +46,4 @@ protected override EventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs index 8c4511ae8..fd5a015f3 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// An implementation for . /// /// The type of the event data generated by the event. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class EventHandlerEventSource : EventSource> { /// @@ -45,4 +41,4 @@ protected override EventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs index 9df6c6cff..8998956a3 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of object raising the event. /// The type of the event data generated by the event. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class EventHandlerEventSource : EventSource> { /// @@ -46,4 +42,4 @@ protected override EventHandler GetEventInvoke() return (obj, e) => TargetDelegate?.Invoke(obj, e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs index e7e312411..e2b198d7c 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -14,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// sourcing Windows Runtime style events from managed code. This only supports events for CCW objects. /// /// The event handler type to use in the table. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class EventRegistrationTokenTable where T : MulticastDelegate { @@ -177,4 +173,4 @@ private static int GetTypeOfTHashCode() // To work around this, we just check for this edge case and return a magic constant instead. return hashCode == 0 ? 0x5FC74196 : hashCode; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventSourceState{T}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventSourceState{T}.cs index 976d76cb6..a10632536 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventSourceState{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventSourceState{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// /// The type of delegate being managed from the associated event. [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class EventSourceState : IDisposable where T : MulticastDelegate { @@ -212,4 +208,4 @@ private void OnDispose() EventSourceCache.Remove(thisPtr, _index, _weakReferenceToSelf); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs index 371453bef..12536434e 100644 --- a/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// A managed wrapper for an event to expose to a native Windows Runtime consumer. /// /// The type of delegate being managed. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe class EventSource where T : MulticastDelegate { @@ -221,4 +217,4 @@ private bool TryGetStateUnsafe([NotNullWhen(true)] out EventSourceState? stat return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfo.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfo.cs index 5daf6e385..b228f3776 100644 --- a/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfo.cs +++ b/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfo.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// Handles the IRestrictedErrorInfo infrastructure for .NET exceptions. /// /// . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class RestrictedErrorInfo { /// diff --git a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs index 595875a15..082c65de2 100644 --- a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs +++ b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -12,14 +11,11 @@ namespace WindowsRuntime.InteropServices; /// /// This interface is only meant to be used to support marshalling code for generic instantiations. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeInterface { /// /// Gets the IID for the implemented interface. /// static abstract ref readonly Guid IID { get; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs index 18b467a37..b306b7802 100644 --- a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -18,10 +15,7 @@ namespace WindowsRuntime.InteropServices; /// The type must refer to a projected Windows Runtime interface. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeInterface where T : class { @@ -30,4 +24,4 @@ public interface IWindowsRuntimeInterface /// /// The cached instance for the interface . WindowsRuntimeObjectReferenceValue GetInterface(); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs index 902cd1d7f..56bd5f1b8 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime.InteropServices.Marshalling; @@ -12,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of the key. /// The type of the value. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeKeyValuePairTypeElementMarshaller { /// diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs index 3bcfa861c..827dc6e6f 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeManagedValueTypeElementMarshaller where T : struct where TAbi : unmanaged diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs index 50c1e54e4..7b8c2f794 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// An interface for marshalling collection elements to native. /// /// The underlying value type of the nullable type. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeNullableTypeElementMarshaller where T : struct { diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs index e5ed85edc..d7516ed65 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// /// An interface for marshalling collection elements to native. /// /// The type of elements in the array. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeReferenceTypeElementMarshaller where T : class { diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs index 0358ac897..bfb03fcb8 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeUnmanagedValueTypeElementMarshaller where T : unmanaged where TAbi : unmanaged diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs index 1b169310d..3323b674e 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs @@ -1,18 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// /// Represents a header for a fast-pass HSTRING value (passed without copying). /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public struct HStringHeader { /// @@ -22,4 +16,4 @@ public struct HStringHeader /// Using this field to mirror the layout of with one fewer indirection. /// internal HSTRING_HEADER._Reserved_e__Union _reserved; -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs index 0db896dd7..37dae15ed 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for the Windows Runtime HSTRING type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class HStringMarshaller { /// @@ -171,4 +167,4 @@ public static void Free(HSTRING value) // We can ignore the return value, as this method always returns 'S_OK' _ = WindowsRuntimeImports.WindowsDeleteString(value); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs index 832965ac3..cfd7e9df8 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs @@ -1,18 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// /// Represents a reference to a fast-pass HSTRING value (passed without copying). /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe ref struct HStringReference { /// @@ -32,4 +26,4 @@ public unsafe ref struct HStringReference /// It is not valid to escape this value outside of the scope of the current instance. /// public readonly HSTRING HString => _hstring; -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs index 436fd7a79..0a807e42d 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for arrays of the Windows Runtime type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class ExceptionArrayMarshaller { /// @@ -104,4 +100,4 @@ public static void CopyToManaged(uint size, ABI.System.Exception* source, Span /// A marshaller for arrays of the Windows Runtime HSTRING type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class HStringArrayMarshaller { /// @@ -271,4 +267,4 @@ public static void Free(uint size, void** array) Marshal.FreeCoTaskMem((nint)array); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs index 2c6d04021..9c1ae3abc 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime.InteropServices.Marshalling; @@ -12,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of the key. /// The type of the value. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller { /// diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs index 1f2052b0a..f9a7838d9 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeManagedValueTypeArrayElementMarshaller where T : struct where TAbi : unmanaged diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs index 7ade281e5..c39c14d76 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// An interface for marshalling implementations to support . /// /// The underlying value type of the nullable type. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeNullableTypeArrayElementMarshaller where T : struct { diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs index bd913731f..257c505c3 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// /// An interface for marshalling implementations to support . /// /// The type of elements in the array. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe interface IWindowsRuntimeReferenceTypeArrayElementMarshaller where T : class { diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs index 11743faf1..b29099b57 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// @@ -11,10 +8,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public interface IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller where T : unmanaged where TAbi : unmanaged diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs index dd43538aa..371d21cfc 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for arrays of the Windows Runtime type. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class TypeArrayMarshaller { /// @@ -162,4 +158,4 @@ public static void Free(uint size, ABI.System.Type* array) Marshal.FreeCoTaskMem((nint)array); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs index 79fc33764..88d490d4b 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for arrays of blittable Windows Runtime types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeBlittableValueTypeArrayMarshaller { /// @@ -32,4 +28,4 @@ public static void Free(uint size, void* array) Marshal.FreeCoTaskMem((nint)array); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs index 2867243f5..2a23149c7 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// A marshaller for arrays of blittable Windows Runtime types. /// /// The type of elements in the array. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeBlittableValueTypeArrayMarshaller where T : unmanaged { @@ -97,4 +93,4 @@ public static void CopyToManaged(uint size, T* source, Span destination) new ReadOnlySpan(source, (int)size).CopyTo(destination); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs index ec3e5089c..e3a6eac3d 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of the key. /// The type of the value. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeKeyValuePairTypeArrayMarshaller { /// @@ -139,4 +135,4 @@ public static void CopyToManaged(uint size, void** source, S destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs index 85180e370..2e46afd70 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeManagedValueTypeArrayMarshaller where T : struct where TAbi : unmanaged @@ -179,4 +175,4 @@ public static void Free(uint size, TAbi* array) Marshal.FreeCoTaskMem((nint)array); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs index dd9d23d35..3ff0065c6 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// A marshaller for arrays of types. /// /// The underlying value type of the nullable type. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeNullableTypeArrayMarshaller where T : struct { diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs index 967752f91..f42baafaa 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for arrays of Windows Runtime objects. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeObjectArrayMarshaller { /// @@ -128,4 +124,4 @@ public static void CopyToManaged(uint size, void** source, Span destina destination[(int)i] = WindowsRuntimeObjectMarshaller.ConvertToManaged(source[i]); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeReferenceTypeArrayMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeReferenceTypeArrayMarshaller{T}.cs index 0ca314f15..876ced0f7 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeReferenceTypeArrayMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeReferenceTypeArrayMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// A marshaller for arrays of reference Windows Runtime types. /// /// The type of elements in the array. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeReferenceTypeArrayMarshaller where T : class { @@ -138,4 +134,4 @@ public static void CopyToManaged(uint size, void** source, S destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs index 5fc9b78ec..a0e617762 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// This type mirrors , but for arrays. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeUnknownArrayMarshaller { /// @@ -56,4 +52,4 @@ public static void Free(uint size, void** array) Marshal.FreeCoTaskMem((nint)array); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs index 97c68fc9a..25cbcded3 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// The type of elements in the array. /// The ABI type for type . -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeUnmanagedValueTypeArrayMarshaller where T : unmanaged where TAbi : unmanaged @@ -119,4 +115,4 @@ public static void CopyToManaged(uint size, TAbi* source, Sp destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs index 7f50ef269..5a947b830 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using Windows.UI.Xaml.Interop; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// Represents a reference to a value, for fast marshalling to native. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public unsafe ref struct TypeReference { /// @@ -67,4 +63,4 @@ public readonly ref byte GetPinnableReference() { return ref Unsafe.As(ref Unsafe.AsRef(in Name!.GetPinnableReference())); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs index 37f1dad53..b8ef650a4 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for Windows Runtime arrays. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeArrayMarshaller { /// @@ -59,4 +55,4 @@ public static unsafe class WindowsRuntimeArrayMarshaller WindowsRuntimeUnknownMarshaller.Free(referencePtr); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs index 932bc84b4..f218a03c7 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for Windows Runtime delegates. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeDelegateMarshaller { /// @@ -189,4 +185,4 @@ static void ThrowNotSupportedException(object value) // Now that we have the 'IReference' pointer, unbox it normally return UnboxToManaged(referencePtr); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs index bb7d78683..d81dc932d 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// A marshaller for Windows Runtime interfaces. /// /// The type of the interface being marshalled. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeInterfaceMarshaller where T : class { @@ -219,4 +215,4 @@ private static void ThrowInvalidCastExceptionManaged(object value, in Guid iid, RestrictedErrorInfo.ThrowExceptionForHR(hresult); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs index ff1b751f1..5ac6d5970 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeKeyValuePairTypeMarshaller { /// @@ -34,4 +30,4 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanagedUnsafe(object { return new((void*)WindowsRuntimeComWrappers.Default.GetOrCreateComInterfaceForObject(value, flags, in iid)); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs index 08c8b115a..e403f2c9b 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for Windows Runtime objects. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeObjectMarshaller { /// @@ -124,4 +120,4 @@ static void ThrowNotSupportedException(object value) objectComWrappersCallback: WindowsRuntimeObjectComWrappersCallback.GetInstance(), unsealedObjectComWrappersCallback: null); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs index 3bba42d51..dd0b9cfbc 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for Windows Runtime or COM objects that does not do any additional QueryInterface calls for specific interfaces. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeUnknownMarshaller { /// @@ -68,4 +64,4 @@ public static void Free(void* value) _ = IUnknownVftbl.ReleaseUnsafe(value); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs index 02fd47e60..11929b963 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs @@ -1,18 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for unsealed Windows Runtime objects. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeUnsealedObjectMarshaller { /// @@ -41,4 +35,4 @@ public static unsafe class WindowsRuntimeUnsealedObjectMarshaller objectComWrappersCallback: null, unsealedObjectComWrappersCallback: WindowsRuntimeUnsealedObjectComWrappersCallback.GetInstance()); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs index 460e0f4c5..71269c22f 100644 --- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs +++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.InteropServices; namespace WindowsRuntime.InteropServices.Marshalling; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices.Marshalling; /// /// A marshaller for Windows Runtime value types. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeValueTypeMarshaller { /// @@ -176,4 +172,4 @@ public static T UnboxToManagedUnsafe(void* value, in Guid iid) return result; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs index efc02e0f5..306b4f66a 100644 --- a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs +++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs @@ -1,19 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// /// Specifies the marshaling type to use to marshal a given Windows Runtime object, specifically when creating a instance. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public enum CreateObjectReferenceMarshalingType { /// @@ -31,4 +25,4 @@ public enum CreateObjectReferenceMarshalingType /// CoGetStandardMarshal on all interfaces. /// Standard -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs index ee06ae965..fba67b754 100644 --- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs +++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -11,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// A managed, low-level wrapper for a native Windows Runtime object. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract unsafe partial class WindowsRuntimeObjectReference : IDisposable { /// @@ -152,4 +148,4 @@ internal CreateObjectReferenceFlags CopyFlags(CreateObjectReferenceFlags request /// /// The value to return from . private protected abstract bool DerivedIsInCurrentContext(); -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs index 99a2a8370..faaa36bdf 100644 --- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs +++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// /// A marshalling-optimized wrapper for a Windows Runtime object. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public readonly unsafe ref struct WindowsRuntimeObjectReferenceValue { /// @@ -157,4 +153,4 @@ public void Dispose() _ = IUnknownVftbl.ReleaseUnsafe(_thisPtr); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs b/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs index 7b9e3a865..92eb7948b 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Globalization; namespace WindowsRuntime.InteropServices; @@ -10,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// /// Helper class for tokenizing used by generated projections. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class TokenizerHelper { /// @@ -35,4 +31,4 @@ public static char GetNumericListSeparator(IFormatProvider? provider) ? SemicolonSeparator : CommaSeparator; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs index f8db6bff2..8280044d6 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; namespace WindowsRuntime.InteropServices; @@ -11,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// The IAgileObject implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class IAgileObjectImpl { /// @@ -26,4 +21,4 @@ public static nint Vtable [MethodImpl(MethodImplOptions.AggressiveInlining)] get => IUnknownImpl.Vtable; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs index 27d6f3f97..d52635c32 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Windows.Foundation; @@ -15,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// The IInspectable implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IInspectableImpl { /// @@ -123,4 +119,4 @@ private static HRESULT GetTrustLevel(void* thisPtr, TrustLevel* trustLevel) return WellKnownErrorCodes.S_OK; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs index be7ccae01..6e7610951 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime.InteropServices.Marshalling; @@ -13,10 +12,7 @@ namespace WindowsRuntime.InteropServices; /// The IMarshal implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe partial class IMarshalImpl { /// @@ -171,4 +167,4 @@ private static HRESULT DisconnectObject(void* thisPtr, uint dwReserved) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs index 02c704fcc..a8c298a13 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - #pragma warning disable IDE0060, IDE1006 namespace WindowsRuntime.InteropServices; @@ -16,8 +13,5 @@ namespace WindowsRuntime.InteropServices; /// This type provides shared paths for some implementations, and then some specific full implementations. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] -public static partial class IPropertyValueImpl; \ No newline at end of file +[WindowsRuntimeImplementationOnlyMember] +public static partial class IPropertyValueImpl; diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs index 52be173fe..7af337570 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime.InteropServices.Marshalling; @@ -16,10 +15,7 @@ namespace WindowsRuntime.InteropServices; /// The IReference`1 implementation for managed types that can share an implementation. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe partial class IReferenceImpl { /// @@ -73,4 +69,4 @@ public static HRESULT get_Value(void* thisPtr, int* result) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs index a8db72502..207467dfc 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime.InteropServices.Marshalling; @@ -14,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// The IStringable implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStringableImpl { /// @@ -64,4 +60,4 @@ private static HRESULT ToString(void* thisPtr, HSTRING* value) return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs index 97fc2ddb1..6b999751c 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -14,10 +12,7 @@ namespace WindowsRuntime.InteropServices; /// The IUnknown implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IUnknownImpl { /// @@ -49,4 +44,4 @@ public static nint Vtable [MethodImpl(MethodImplOptions.AggressiveInlining)] get => (nint)Unsafe.AsPointer(in Vftbl); } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs index 7c4204eb8..746c7067c 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; @@ -14,10 +13,7 @@ namespace WindowsRuntime.InteropServices; /// The IWeakReferenceSource implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IWeakReferenceSourceImpl { /// @@ -69,4 +65,4 @@ private static HRESULT GetWeakReference(void* thisPtr, void** weakReference) return e.HResult; } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs b/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs index 61e8fadcc..5f76fe225 100644 --- a/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.IO; using Microsoft.Win32.SafeHandles; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// Provides methods for interacting with the IStorageFolderHandleAccess COM interface. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStorageFolderHandleAccessMethods { /// diff --git a/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs b/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs index ac6b3d333..37383d315 100644 --- a/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs +++ b/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.IO; using Microsoft.Win32.SafeHandles; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// Provides methods for interacting with the IStorageItemHandleAccess COM interface. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IStorageItemHandleAccessMethods { /// diff --git a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs index 07368a74a..084787b0c 100644 --- a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs +++ b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Runtime.ExceptionServices; @@ -13,10 +12,7 @@ namespace Windows.Storage.Streams; /// /// Helpers for working with Windows Runtime I/O operations. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class WindowsRuntimeIOHelpers { /// diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs index 81ce3f865..dfddd5369 100644 --- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs +++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -13,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// This type is only meant to be used as type map group for APIs. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class DynamicInterfaceCastableImplementationTypeMapGroup { /// @@ -25,4 +19,4 @@ public abstract class DynamicInterfaceCastableImplementationTypeMapGroup private DynamicInterfaceCastableImplementationTypeMapGroup() { } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs index 3d14def61..b124e507a 100644 --- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs +++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; - namespace WindowsRuntime.InteropServices; /// @@ -12,10 +9,7 @@ namespace WindowsRuntime.InteropServices; /// /// This type is only meant to be used as type map group for APIs. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeComWrappersTypeMapGroup { /// @@ -24,4 +18,4 @@ public abstract class WindowsRuntimeComWrappersTypeMapGroup private WindowsRuntimeComWrappersTypeMapGroup() { } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs index 59b512bf8..31b212175 100644 --- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs +++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; namespace WindowsRuntime.InteropServices; @@ -12,10 +11,7 @@ namespace WindowsRuntime.InteropServices; /// /// This type is only meant to be used as type map group for APIs. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeMetadataTypeMapGroup { /// @@ -24,4 +20,4 @@ public abstract class WindowsRuntimeMetadataTypeMapGroup private WindowsRuntimeMetadataTypeMapGroup() { } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs index 44ada5a80..ca3619848 100644 --- a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs +++ b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs @@ -10,10 +10,7 @@ namespace WindowsRuntime.InteropServices; /// /// IIDs for well known projected WinRT interfaces. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class WellKnownInterfaceIIDs { /// The IID for IUnknown. diff --git a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt index e4c74fb22..b730a857d 100644 --- a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt +++ b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt @@ -14,10 +14,7 @@ namespace WindowsRuntime.InteropServices; /// /// IIDs for well known projected WinRT interfaces. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static class WellKnownInterfaceIIDs { <# diff --git a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs index 0308eacd4..7f8f448bd 100644 --- a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs +++ b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -20,10 +19,7 @@ namespace WindowsRuntime.InteropServices; /// the code will throw . It is the caller's responsibility /// to validate inputs before calling any method in this class. /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class WindowsRuntimeComWrappersMarshal { /// @@ -249,4 +245,4 @@ public static WindowsRuntimeObjectReference UnwrapObjectReferenceUnsafe(WindowsR { return value.NativeObjectReference; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs index b6720c55f..2390c3a90 100644 --- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs +++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation; @@ -53,10 +52,7 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; public AsyncActionCompletedHandler? Completed @@ -105,12 +101,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs index 7f192a974..8e3a2946e 100644 --- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs +++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using ABI.Windows.Foundation; @@ -18,10 +17,7 @@ namespace WindowsRuntime; /// The implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeAsyncActionWithProgress : WindowsRuntimeObject, IAsyncActionWithProgress, IWindowsRuntimeInterface>, @@ -59,10 +55,7 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -119,12 +112,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs index a24863977..9165191df 100644 --- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs +++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using ABI.Windows.Foundation; @@ -19,10 +18,7 @@ namespace WindowsRuntime; /// The implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeAsyncOperationWithProgress : WindowsRuntimeObject, IAsyncOperationWithProgress, IWindowsRuntimeInterface>, @@ -60,10 +56,7 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -120,12 +113,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs index 86bdd28dc..398841bb7 100644 --- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs +++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using ABI.Windows.Foundation; @@ -18,10 +17,7 @@ namespace WindowsRuntime; /// The implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeAsyncOperation : WindowsRuntimeObject, IAsyncOperation, IWindowsRuntimeInterface>, @@ -59,10 +55,7 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -112,12 +105,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs index 487915e3d..f525dd873 100644 --- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs +++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using WindowsRuntime.InteropServices; namespace WindowsRuntime; @@ -26,10 +25,7 @@ public WindowsRuntimeEnumerable(WindowsRuntimeObjectReference nativeObjectRefere } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -45,12 +41,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs index dff273efc..7ef06855c 100644 --- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs +++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using WindowsRuntime.InteropServices; @@ -39,10 +38,7 @@ public WindowsRuntimeEnumerator(WindowsRuntimeObjectReference nativeObjectRefere } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -113,12 +109,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs index 66a402a89..3b0617747 100644 --- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs +++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using WindowsRuntime.InteropServices; @@ -53,10 +52,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -148,12 +144,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs index b8278220c..5034c0780 100644 --- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs +++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs @@ -3,7 +3,6 @@ using System; using System.Collections; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using WindowsRuntime.InteropServices; @@ -57,10 +56,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -76,12 +72,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs index 41e3c32a5..d1d18a8de 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime; @@ -13,10 +12,7 @@ namespace WindowsRuntime; /// /// The type of keys in the dictionary. /// The type of values in the dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class DictionaryKeyCollection : ICollection { /// @@ -108,10 +104,7 @@ IEnumerator IEnumerable.GetEnumerator() /// /// The implementation for . /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public sealed class Enumerator : IEnumerator { /// @@ -158,4 +151,4 @@ public void Dispose() _enumerator.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs index b382430ed..ca42a4fc6 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime; @@ -13,10 +12,7 @@ namespace WindowsRuntime; /// /// The type of keys in the dictionary. /// The type of values in the dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class DictionaryValueCollection : ICollection { /// @@ -117,10 +113,7 @@ IEnumerator IEnumerable.GetEnumerator() /// /// The implementation for . /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public sealed class Enumerator : IEnumerator { /// @@ -167,4 +160,4 @@ public void Dispose() _enumerator.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs index 7b9ef3047..b3a2c08ff 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime; @@ -13,10 +12,7 @@ namespace WindowsRuntime; /// /// The type of keys in the read-only dictionary. /// The type of values in the read-only dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class ReadOnlyDictionaryKeyCollection : IEnumerable { /// @@ -51,10 +47,7 @@ IEnumerator IEnumerable.GetEnumerator() /// /// The implementation for . /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public sealed class Enumerator : IEnumerator { /// @@ -101,4 +94,4 @@ public void Dispose() _enumerator.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs index 00ed96700..adc6b5fae 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; namespace WindowsRuntime; @@ -13,10 +12,7 @@ namespace WindowsRuntime; /// /// The type of keys in the read-only dictionary. /// The type of values in the read-only dictionary. -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public sealed class ReadOnlyDictionaryValueCollection : IEnumerable { /// @@ -51,10 +47,7 @@ IEnumerator IEnumerable.GetEnumerator() /// /// The implementation for . /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public sealed class Enumerator : IEnumerator { /// @@ -101,4 +94,4 @@ public void Dispose() _enumerator.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs index ebe4b6f5d..6e3b58417 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Threading; @@ -22,10 +21,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IMap<K, V> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeDictionary< TKey, TValue, @@ -83,10 +79,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -205,12 +198,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs index bc7d477c2..a2c08d899 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using WindowsRuntime.InteropServices; #pragma warning disable CA1816 @@ -18,10 +17,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IIterable<T> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeEnumerable : WindowsRuntimeObject, IEnumerable, IWindowsRuntimeInterface> where TIIterableMethods : IIterableMethodsImpl { @@ -36,10 +32,7 @@ protected WindowsRuntimeEnumerable(WindowsRuntimeObjectReference nativeObjectRef } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -61,12 +54,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs index dca11f318..52da2cb0f 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using WindowsRuntime.InteropServices; @@ -19,10 +18,7 @@ namespace WindowsRuntime; /// The implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeEnumerator : WindowsRuntimeObject, IEnumerator, IWindowsRuntimeInterface> where TIIteratorMethods : IIteratorMethodsImpl { @@ -47,10 +43,7 @@ protected WindowsRuntimeEnumerator(WindowsRuntimeObjectReference nativeObjectRef } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -142,12 +135,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs index e77e03308..fa7982393 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using WindowsRuntime.InteropServices; @@ -22,10 +21,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IVector<T> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeList< T, TIIterable, @@ -70,10 +66,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -162,12 +155,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs index fa97363bd..f7a5e4c87 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using Windows.Foundation.Collections; using WindowsRuntime.InteropServices; @@ -15,10 +14,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IMapChangedEventArgs<K> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeMapChangedEventArgs : WindowsRuntimeObject, IMapChangedEventArgs, IWindowsRuntimeInterface> @@ -35,10 +31,7 @@ protected WindowsRuntimeMapChangedEventArgs(WindowsRuntimeObjectReference native } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -54,12 +47,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs index a2b13bd63..710dad9b0 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Threading; @@ -27,10 +26,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IObservableMap<K, V> factory type for event source objects. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeObservableMap< TKey, TValue, @@ -139,10 +135,7 @@ public event MapChangedEventHandler? MapChanged } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -267,12 +260,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs index 40f4f76aa..05f9c31d7 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation.Collections; @@ -25,10 +24,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IObservableVector<T> factory type for event source objects. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeObservableVector< T, TIIterable, @@ -130,10 +126,7 @@ public event VectorChangedEventHandler? VectorChanged } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -228,12 +221,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs index 6785c57ed..8ab484e01 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Threading; @@ -22,10 +21,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IMapView<K, V> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeReadOnlyDictionary< TKey, TValue, @@ -82,10 +78,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -143,12 +136,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs index 65abb113d..c9313be2a 100644 --- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs +++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs @@ -4,7 +4,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using WindowsRuntime.InteropServices; @@ -20,10 +19,7 @@ namespace WindowsRuntime; /// The Windows.Foundation.Collections.IVectorView<T> implementation type. /// [WindowsRuntimeManagedOnlyType] -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public abstract class WindowsRuntimeReadOnlyList< T, TIIterable, @@ -69,10 +65,7 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal sealed override bool HasUnwrappableNativeObjectReference => true; /// @@ -106,12 +99,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected sealed override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs b/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs index 62a2ecb4d..417aaae08 100644 --- a/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs +++ b/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation; @@ -60,10 +59,7 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -88,10 +84,7 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs index 2f94efde9..2b959ace6 100644 --- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs +++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using Windows.Storage.Streams; using WindowsRuntime.InteropServices; @@ -26,10 +25,7 @@ public WindowsRuntimeBuffer(WindowsRuntimeObjectReference nativeObjectReference) } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -49,10 +45,7 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInterfac } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs index c3de4a7ae..1c76cd222 100644 --- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs +++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation; @@ -54,10 +53,7 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -85,10 +81,7 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs index 26d28c990..ce5eb4dcb 100644 --- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs +++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation; @@ -52,10 +51,7 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -89,10 +85,7 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs index fe5044989..a71efb005 100644 --- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs +++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; using Windows.Foundation; @@ -98,10 +97,7 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference() } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// @@ -193,10 +189,7 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; diff --git a/src/WinRT.Runtime2/Windows.Foundation/TrustLevel.cs b/src/WinRT.Runtime2/Windows.Foundation/TrustLevel.cs index 68a91a659..97e5356d8 100644 --- a/src/WinRT.Runtime2/Windows.Foundation/TrustLevel.cs +++ b/src/WinRT.Runtime2/Windows.Foundation/TrustLevel.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.ComponentModel; using WindowsRuntime; namespace Windows.Foundation; @@ -14,10 +12,7 @@ namespace Windows.Foundation; /// This type is required for ABI projection of Windows Runtime types, but marshalling it is not supported. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public enum TrustLevel { /// @@ -34,4 +29,4 @@ public enum TrustLevel /// The component requires the full privileges of the user. /// FullTrust = PartialTrust + 1 -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/Windows.UI.Xaml.Interop/TypeKind.cs b/src/WinRT.Runtime2/Windows.UI.Xaml.Interop/TypeKind.cs index 963f9a2e0..f97858b6c 100644 --- a/src/WinRT.Runtime2/Windows.UI.Xaml.Interop/TypeKind.cs +++ b/src/WinRT.Runtime2/Windows.UI.Xaml.Interop/TypeKind.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using WindowsRuntime; namespace Windows.UI.Xaml.Interop; @@ -14,10 +13,7 @@ namespace Windows.UI.Xaml.Interop; /// This type is required for ABI projection of the class, but marshalling it is not supported. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public enum TypeKind { /// @@ -34,4 +30,4 @@ public enum TypeKind /// The type is a custom type declared by means other than WinMD. /// Custom -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/WindowsRuntimeInspectable.cs b/src/WinRT.Runtime2/WindowsRuntimeInspectable.cs index 862b2b3c9..e45420c30 100644 --- a/src/WinRT.Runtime2/WindowsRuntimeInspectable.cs +++ b/src/WinRT.Runtime2/WindowsRuntimeInspectable.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using WindowsRuntime.InteropServices; namespace WindowsRuntime; @@ -29,19 +28,13 @@ public WindowsRuntimeInspectable(WindowsRuntimeObjectReference nativeObjectRefer } /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal override bool HasUnwrappableNativeObjectReference => true; /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected override bool IsOverridableInterface(in Guid iid) { return false; } -} \ No newline at end of file +} diff --git a/src/WinRT.Runtime2/WindowsRuntimeObject.cs b/src/WinRT.Runtime2/WindowsRuntimeObject.cs index 0f634f2ac..ce1cf45e7 100644 --- a/src/WinRT.Runtime2/WindowsRuntimeObject.cs +++ b/src/WinRT.Runtime2/WindowsRuntimeObject.cs @@ -5,7 +5,6 @@ using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -50,10 +49,7 @@ public abstract unsafe class WindowsRuntimeObject : /// /// The inner Windows Runtime object reference to wrap in the current instance. /// Thrown if is . - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected WindowsRuntimeObject(WindowsRuntimeObjectReference nativeObjectReference) { ArgumentNullException.ThrowIfNull(nativeObjectReference); @@ -74,10 +70,7 @@ protected WindowsRuntimeObject(WindowsRuntimeObjectReference nativeObjectReferen /// /// This constructor should only be used when activating sealed types (both projected and user-defined types). /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected WindowsRuntimeObject( WindowsRuntimeActivationTypes.DerivedSealed _, WindowsRuntimeObjectReference activationFactoryObjectReference, @@ -120,10 +113,7 @@ protected WindowsRuntimeObject( /// /// This constructor should only be used when activating composable types (both projected and user-defined types). /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected WindowsRuntimeObject( WindowsRuntimeActivationTypes.DerivedComposed _, WindowsRuntimeObjectReference activationFactoryObjectReference, @@ -203,10 +193,7 @@ protected WindowsRuntimeObject( /// overload should be used instead, as that is more efficient in case the default signature is sufficient. /// /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected WindowsRuntimeObject( WindowsRuntimeActivationFactoryCallback.DerivedSealed activationFactoryCallback, in Guid iid, @@ -252,10 +239,7 @@ protected WindowsRuntimeObject( /// overload should be used instead, as that is more efficient in case the default signature is sufficient. /// /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected WindowsRuntimeObject( WindowsRuntimeActivationFactoryCallback.DerivedComposed activationFactoryCallback, in Guid iid, @@ -295,10 +279,7 @@ protected WindowsRuntimeObject( /// /// This object reference should point to an IInspectable native object. /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal WindowsRuntimeObjectReference NativeObjectReference { get; } /// @@ -308,10 +289,7 @@ protected WindowsRuntimeObject( /// This value is in aggregation scenarios, as the instance that should be marshalled /// to native is the derived managed type for the projected class, and not the inner object for the base type. /// - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected internal virtual bool HasUnwrappableNativeObjectReference => UnreachableException.Throw(); /// @@ -364,10 +342,7 @@ ConcurrentDictionary InitializeTypeHandleCache() /// /// The interface to check. /// Whether the interface represented by is an overridable interface for the current type. - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] protected virtual bool IsOverridableInterface(in Guid iid) { return UnreachableException.Throw(); @@ -379,10 +354,7 @@ protected virtual bool IsOverridableInterface(in Guid iid) /// The type handle for the interface to retrieve the object reference for. /// The resulting object. /// Thrown if the interface specified by is not implemented. - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public WindowsRuntimeObjectReference GetObjectReferenceForInterface(RuntimeTypeHandle interfaceType) { // Throw an exception if we couldn't resolve the interface reference @@ -411,10 +383,7 @@ static void ThrowArgumentException(RuntimeTypeHandle interfaceType) /// The type handle for the interface to retrieve the object reference for. /// The resulting object, if the interface could be retrieved. /// Whether could be retrieved successfully. - [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] - [EditorBrowsable(EditorBrowsableState.Never)] + [WindowsRuntimeImplementationOnlyMember] public bool TryGetObjectReferenceForInterface(RuntimeTypeHandle interfaceType, [NotNullWhen(true)] out WindowsRuntimeObjectReference? interfaceReference) { return TryGetCastResult( @@ -958,4 +927,4 @@ public static NotSupportedException GetNotSupportedException() $"Support for 'IDynamicInterfaceCastable' is disabled (make sure that the 'CsWinRTEnableIDynamicInterfaceCastableSupport' property is not set to 'false'). " + $"In this configuration, runtime casts on Windows Runtime objects will only work if the managed object implements the target interface in metadata."); } -} \ No newline at end of file +} From 2effb4494dcb90d3418c4b1fd966f4fd9524d05d Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 16 Apr 2026 16:11:56 -0700 Subject: [PATCH 3/7] Remove WindowsRuntimeConstants.cs Delete WindowsRuntimeConstants.cs which contained constants for WinRT private implementation detail messaging, the PrivateImplementationDetailObsoleteDiagnosticId (CSWINRT3001), and the CsWinRT diagnostics URL format. These constants have been removed from the project. --- .../Properties/WindowsRuntimeConstants.cs | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs diff --git a/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs b/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs deleted file mode 100644 index e871e1033..000000000 --- a/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace WindowsRuntime; - -/// -/// A type containing constants for various scenarios related to Windows Runtime functionality and projections. -/// -internal static class WindowsRuntimeConstants -{ - /// - /// A message for private implementation detail types. - /// - public const string PrivateImplementationDetailObsoleteMessage = - "This type or method is a private implementation detail, and it's only meant to be consumed by generated projections (produced by 'cswinrt.exe') " + - "and by generated interop code (produced by 'cswinrtinteropgen.exe'). Private implementation detail types are not considered part of the versioned " + - "API surface, and they are ignored when determining the assembly version following semantic versioning. Types might be modified or removed " + - "across any version change for 'WinRT.Runtime.dll', and using them in user code is undefined behavior and not supported."; - - /// - /// The diagnostic id for private implementation detail types. - /// - public const string PrivateImplementationDetailObsoleteDiagnosticId = "CSWINRT3001"; - - /// - /// The URL format for all custom diagnostics for CsWinRT. - /// - /// - /// This URL format assumes it will receive the diagnostic id as a parameter. - /// - public const string CsWinRTDiagnosticsUrlFormat = "https://aka.ms/cswinrt/errors/{0}"; -} \ No newline at end of file From 4a7d0576dfeab0c7f11c958981786edd6ab5d101 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 16 Apr 2026 16:14:49 -0700 Subject: [PATCH 4/7] Remove CSWINRT3001 NoWarn suppression Delete the NoWarn entry and its comment for CSWINRT3001 from src/WinRT.Runtime2/WinRT.Runtime.csproj so warnings about '[Obsolete]' private implementation details are no longer suppressed. This change surfaces those warnings for visibility during builds. --- src/WinRT.Runtime2/WinRT.Runtime.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/WinRT.Runtime2/WinRT.Runtime.csproj b/src/WinRT.Runtime2/WinRT.Runtime.csproj index 2b734d5c1..110687d44 100644 --- a/src/WinRT.Runtime2/WinRT.Runtime.csproj +++ b/src/WinRT.Runtime2/WinRT.Runtime.csproj @@ -81,9 +81,6 @@ --> $(NoWarn);AD0001 - - $(NoWarn);CSWINRT3001 - true key.snk From b31c844cd30f7b7f62b370854e1ff46f26cb7644 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 29 Mar 2026 20:00:03 -0700 Subject: [PATCH 5/7] Delete CSWINRT3001 diagnostic documentation This diagnostic is no longer applicable now that the private implementation detail [Obsolete] attributes have been removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/diagnostics/cswinrt30001.md | 34 -------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 docs/diagnostics/cswinrt30001.md diff --git a/docs/diagnostics/cswinrt30001.md b/docs/diagnostics/cswinrt30001.md deleted file mode 100644 index c9877706f..000000000 --- a/docs/diagnostics/cswinrt30001.md +++ /dev/null @@ -1,34 +0,0 @@ -# CsWinRT warning CSWINRT3001 - -This type or method is a private implementation detail, and it's only meant to be consumed by generated projections (produced by 'cswinrt.exe') and by generated interop code (produced by 'cswinrtinteropgen.exe'). Private implementation detail types are not considered part of the versioned API surface, and they are ignored when determining the assembly version following semantic versioning. Types might be modified or removed across any version change for 'WinRT.Runtime.dll', and using them in user code is undefined behavior and not supported. - -For instance, the following sample generates CSWINRT3001: - -```csharp -using Microsoft.UI.Xaml; -using WindowsRuntime.InteropServices; - -namespace MyProgram; - -Window window = Window.Current; - -// CSWINRT3001: 'GetObjectReferenceForInterface' is a private implementation detail API -WindowsRuntimeObjectReference objectReference = window.GetObjectReferenceForInterface(typeof(object).TypeHandle); -``` - -Using any private implementation detail API is not supported, and should be considered undefined behavior. - -## Additional resources - -`CSWINRT30001` is emitted when user code tries to reference a type that is marked as a **private implementation detail** within `WinRT.Runtime.dll` or the generated `WinRT.Interop.dll`. These private implementation detail types exist solely to support the marshalling pipeline that CsWinRT and the .NET SDK generate at build time. They are not part of the public, versioned API surface, and consuming them from application code is unsupported. - -While all of these types are public (as they are used across assembglies), they are intentionally hidden from IntelliSense and decorated with `[Obsolete]` (with `CSWINRT3001` as the diagnostic id) to warn when they are referenced. Their names often include `Impl`, `Helpers`, or other internal wording, and their diagnostic message explicitly states that they are private implementation details. During a build, `cswinrt.exe` produces projections and `cswinrtinteropgen.exe` produces `WinRT.Interop.dll`. The generated code inside these tools uses private implementation detail types to perform marshalling work. See `docs/winrt-interop-dll-spec.md` for a description of the generated interop assembly. Because the tooling controls all references to these types, their shape can change whenever needed without breaking consumers. This flexibility is what allows performance and reliability improvements across releases. - -## Recommended action - -- Remove all references to any private implementation detail types. -- Look for supported alternatives in `WinRT.Runtime.dll`, the Windows SDK projections, or your own code. -- If you are authoring source generators or tooling, never take a dependency on private implementation detail types. -- When in doubt, file an issue describing the scenario so the CsWinRT team can help identify a stable API or consider exposing a supported helper. - -Keeping private implementation detail types exclusive to generated code is what allows CsWinRT to deliver fast, safe interop while evolving rapidly. Respecting the diagnostic ensures your applications remain stable across updates (and also avoids accidentally breaking builds when updating the CsWinRT version). From 25692f4335fd809ce74c4f52f1e87094140474f5 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 11 Jun 2026 16:32:16 -0700 Subject: [PATCH 6/7] Use [WindowsRuntimeImplementationOnlyMember] in IActivationFactoryImpl This file was missed in the bulk conversion to the new attribute; it still referenced the now-deleted WindowsRuntimeConstants type, which would break the build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ProjectionImpls/IActivationFactoryImpl.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IActivationFactoryImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IActivationFactoryImpl.cs index 7c6d9491c..35914fdbe 100644 --- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IActivationFactoryImpl.cs +++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IActivationFactoryImpl.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using WindowsRuntime; @@ -16,10 +15,7 @@ namespace ABI.WindowsRuntime.InteropServices; /// The IActivationFactory implementation for managed types. /// /// -[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage, - DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId, - UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)] -[EditorBrowsable(EditorBrowsableState.Never)] +[WindowsRuntimeImplementationOnlyMember] public static unsafe class IActivationFactoryImpl { /// From a14da8d12ec5e3b125d1aff49587fed74038b813 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 13 Jun 2026 11:49:26 -0700 Subject: [PATCH 7/7] Remove CSWINRT3001 warning suppressions Remove pragma suppressions and documentation references for the CSWINRT3001 diagnostic. Deleted several "#pragma warning disable CSWINRT3001" (and matching restores) from source files and code-generation templates, and removed CSWINRT3001 from the suppressed warnings list and obsolete-marker table in docs. Affected files include .github/copilot-instructions.md, docs/interop.md, various tests and shim sources, and cswinrt code/template headers. --- .github/copilot-instructions.md | 3 +-- docs/interop.md | 2 -- src/Authoring/WinRT.Host.Shim/Module.cs | 2 -- src/Tests/FunctionalTests/CCW/Program.cs | 2 -- src/Tests/FunctionalTests/Collections/Program.cs | 2 -- src/Tests/UnitTest/TestComponent_Tests.cs | 2 -- src/cswinrt/code_writers.h | 4 ---- src/cswinrt/strings/ComInteropExtensions.cs | 2 -- src/cswinrt/strings/InspectableVftbl.cs | 2 -- src/cswinrt/type_writers.h | 1 - 10 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 46b096968..603de2ff6 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -555,7 +555,7 @@ The MSBuild integration is orchestrated through several `.props` and `.targets` - **Compiler strict mode**: `strict` in all projects - **XML documentation**: generated for all projects - **`SkipLocalsInit`**: enabled in runtime and build tools for performance -- **Suppressed warnings**: `CS8500` (ref safety in unsafe contexts), `AD0001` (analyzer crashes), `CSWINRT3001` (obsolete internal members) +- **Suppressed warnings**: `CS8500` (ref safety in unsafe contexts), `AD0001` (analyzer crashes) - **Strong-name signing**: all assemblies signed with `src/WinRT.Runtime2/key.snk` ### C++ project (cswinrt) @@ -598,7 +598,6 @@ All four .NET build tools (`cswinrtimplgen`, `cswinrtprojectiongen`, `cswinrtint | Projection Generator | `CSWINRTPROJECTIONGENxxxx` | `0001`–`0008`, `9999` | | Interop Generator | `CSWINRTINTEROPGENxxxx` | Various, `9999` | | WinMD Generator | `CSWINRTWINMDGENxxxx` | `0001`–`0007` | -| Runtime (obsolete markers) | `CSWINRT3xxx` | `CSWINRT3001` | --- diff --git a/docs/interop.md b/docs/interop.md index fd5b24d9c..6b53c04b1 100644 --- a/docs/interop.md +++ b/docs/interop.md @@ -4,8 +4,6 @@ CsWinRT 3.0 provides a complete COM interop layer for Windows Runtime types on .NET 10+. All interop types are in the `WindowsRuntime.InteropServices` namespace (assembly: `WinRT.Runtime.dll`). Most marshalling is handled automatically by the generated projection and interop assemblies, but advanced scenarios may require direct use of the APIs below. -> **Note:** CsWinRT exposes many types and methods marked `[Obsolete]` with diagnostic `CSWINRT3001`. These are **private implementation details** consumed only by generated code (`cswinrt.exe` and `cswinrtinteropgen.exe`). They are not part of the versioned API surface, may change without notice, and should not be used in application code. This guide covers only the supported public APIs. - ## Summary | Scenario | CsWinRT 3.0 API | diff --git a/src/Authoring/WinRT.Host.Shim/Module.cs b/src/Authoring/WinRT.Host.Shim/Module.cs index cf0e5b38c..31a64e622 100644 --- a/src/Authoring/WinRT.Host.Shim/Module.cs +++ b/src/Authoring/WinRT.Host.Shim/Module.cs @@ -11,8 +11,6 @@ [assembly: global::System.Runtime.Versioning.SupportedOSPlatform("Windows")] -#pragma warning disable CSWINRT3001 // Type or member is obsolete - namespace WinRT.Host; public static class Shim diff --git a/src/Tests/FunctionalTests/CCW/Program.cs b/src/Tests/FunctionalTests/CCW/Program.cs index ffb740732..792c5061e 100644 --- a/src/Tests/FunctionalTests/CCW/Program.cs +++ b/src/Tests/FunctionalTests/CCW/Program.cs @@ -10,8 +10,6 @@ using WindowsRuntime.InteropServices; using WindowsRuntime.InteropServices.Marshalling; -#pragma warning disable CSWINRT3001 // Type or member is obsolete - var managedProperties = new ManagedProperties(42); var instance = new Class(); diff --git a/src/Tests/FunctionalTests/Collections/Program.cs b/src/Tests/FunctionalTests/Collections/Program.cs index 082f64168..e204c60fd 100644 --- a/src/Tests/FunctionalTests/Collections/Program.cs +++ b/src/Tests/FunctionalTests/Collections/Program.cs @@ -80,7 +80,6 @@ return 101; } -#pragma warning disable CSWINRT3001 // Type or member is obsolete TestComponent.Nested[] nestedArr = new TestComponent.Nested[]{ new TestComponent.Nested( new TestComponent.Blittable(1, 2, 3, 4, -5, -6, -7, 8.0f, 9.0, typeof(TestComponent.ITests).GUID), @@ -92,7 +91,6 @@ new TestComponent.Blittable(1, 2, 3, 4, -5, -6, -7, 8.0f, 9.0, WellKnownInterfaceIIDs.IID_IInspectable), new TestComponent.NonBlittable(false, 'Z', "Third", (long?)PropertyValue.CreateInt64(789))) }; -#pragma warning restore CSWINRT3001 // Type or member is obsolete TestComponent.Nested[] nestedArr2 = new TestComponent.Nested[nestedArr.Length]; TestComponent.Nested[] outNestedArr; TestComponent.Nested[] retNestedArr = instance2.Array15(nestedArr, nestedArr2, out outNestedArr); diff --git a/src/Tests/UnitTest/TestComponent_Tests.cs b/src/Tests/UnitTest/TestComponent_Tests.cs index 7b23bcd00..2581b6517 100644 --- a/src/Tests/UnitTest/TestComponent_Tests.cs +++ b/src/Tests/UnitTest/TestComponent_Tests.cs @@ -599,10 +599,8 @@ public void Collections_Dictionary() class TestIDICInspectable : WindowsRuntimeObject { -#pragma warning disable CSWINRT3001 // Type or member is obsolete public unsafe TestIDICInspectable(void* ptr) : base(WindowsRuntimeComWrappersMarshal.CreateObjectReferenceUnsafe(ptr, WellKnownInterfaceIIDs.IID_IInspectable, out _)) -#pragma warning restore CSWINRT3001 // Type or member is obsolete { } diff --git a/src/cswinrt/code_writers.h b/src/cswinrt/code_writers.h index a780db203..d088af24d 100644 --- a/src/cswinrt/code_writers.h +++ b/src/cswinrt/code_writers.h @@ -5212,8 +5212,6 @@ R"( w.write(R"(using System; using WindowsRuntime; -#pragma warning disable CSWINRT3001 - namespace ABI { %internal static class WindowsRuntimeDefaultInterfaces; @@ -5269,8 +5267,6 @@ namespace ABI w.write(R"(using System; using WindowsRuntime; -#pragma warning disable CSWINRT3001 - namespace ABI { %internal static class WindowsRuntimeExclusiveToInterfaces; diff --git a/src/cswinrt/strings/ComInteropExtensions.cs b/src/cswinrt/strings/ComInteropExtensions.cs index 644b8c94c..36c6c27c9 100644 --- a/src/cswinrt/strings/ComInteropExtensions.cs +++ b/src/cswinrt/strings/ComInteropExtensions.cs @@ -25,8 +25,6 @@ // minimum Windows SDK that is currently supported. See this mapping // in the Windows SDK projection project. The two should be kept in sync. -#pragma warning disable CSWINRT3001 - using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/cswinrt/strings/InspectableVftbl.cs b/src/cswinrt/strings/InspectableVftbl.cs index 8a8f2053b..d11da4278 100644 --- a/src/cswinrt/strings/InspectableVftbl.cs +++ b/src/cswinrt/strings/InspectableVftbl.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -#pragma warning disable CSWINRT3001 // "Type or member '...' is a private implementation detail" - #if CSWINRT_REFERENCE_PROJECTION [assembly: WindowsRuntime.InteropServices.WindowsRuntimeReferenceAssembly] #else diff --git a/src/cswinrt/type_writers.h b/src/cswinrt/type_writers.h index fd02a17bc..43715c4ff 100644 --- a/src/cswinrt/type_writers.h +++ b/src/cswinrt/type_writers.h @@ -58,7 +58,6 @@ using static System.Runtime.InteropServices.ComWrappers; #pragma warning disable CS0169 // "The field '...' is never used" #pragma warning disable CS0649 // "Field '...' is never assigned to" #pragma warning disable CA2207, CA1063, CA1033, CA1001, CA2213 -#pragma warning disable CSWINRT3001 // "Type or member '...' is a private implementation detail" #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type )", VERSION_STRING);