From e18a77feff92fe6cdf8b891aa3b44fb1acb972d1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 1 Mar 2022 20:31:17 +0100 Subject: [PATCH] Keep Obsolete and EditorBrowsable attributes consistent between ref and src and DefineConst clean-up (#65847) * NET5_0_OR_GREATER, NET6_0_OR_GREATER -> NETCOREAPP The minimum supported .NETCoreApp version in the repository is 6.0, hence both defines can be replaced with the versionless NETCOREAPP one. There is no need to version APIs below the minimum supported .NETCoreApp version. * Sync ObsoleteAttribute between ref and src ApiCompat wasn't enabled to check if the ObsoleteAttribute is in sync between the ref and the src assembly. Enabling it showed numerous mismatches which this commit fixes. Also making sure that the ApiCompat run that compares the live build against the previous version of .NETCoreApp and .NETStandard2.x doesn't complain about ObsoleteAttribute API changes as those are intentional. * Sync EditorBrowsableAttribute between ref and src The EditorBrowsableAttribute attribute wasn't enabled to be checked by ApiCompat and in many cases there were mismatches. The most prominent were InteropServices. * HttpListenerContext pr feedback * ResourceManager pr feedback * Json PR feedback * Fix cryptography PNSE build --- eng/DefaultGenApiDocIds.txt | 4 - .../InteropServices/ComEventsHelper.cs | 2 + .../InteropServices/Marshal.CoreCLR.cs | 32 ++ .../src/System/RuntimeType.CoreCLR.cs | 4 + .../src/System/Variant.cs | 4 + .../src/System/Reflection/Assembly.CoreRT.cs | 2 +- .../InteropServices/ComEventsHelper.CoreRT.cs | 2 + .../Runtime/InteropServices/Marshal.Com.cs | 13 + .../Runtime/InteropServices/Marshal.CoreRT.cs | 22 ++ .../src/System/Threading/Overlapped.cs | 6 +- .../src/System/Threading/ThreadPool.CoreRT.cs | 2 +- .../Common/src/System/Obsoletions.cs | 3 +- .../Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs | 2 +- .../System/Security/Cryptography/Helpers.cs | 10 +- .../src/System/Text/ValueStringBuilder.cs | 4 +- .../src/HostingHostBuilderExtensions.cs | 4 +- .../CompilerServices/Conversions.vb | 2 +- .../CompilerServices/NewLateBinding.vb | 16 +- .../CompilerServices/Operators.Resolution.vb | 2 +- .../VisualBasic/FileIO/TextFieldParser.vb | 1 + .../ref/System.Collections.Immutable.cs | 4 +- .../Immutable/ImmutableHashSet_1.cs | 2 +- .../Immutable/ImmutableSortedSet_1.cs | 2 +- .../System.ComponentModel.TypeConverter.cs | 32 ++ .../RootDesignerSerializerAttribute.cs | 2 +- .../Configuration/ConfigurationException.cs | 2 +- .../ref/System.Data.OleDb.cs | 7 + .../Diagnostics/SymbolStore/ISymbolBinder.cs | 2 +- ...tem.DirectoryServices.AccountManagement.cs | 4 + .../ref/System.Drawing.Common.netcoreapp.cs | 2 + .../src/System/Drawing/Graphics.Unix.cs | 3 +- .../src/System/Drawing/Graphics.Windows.cs | 4 +- .../src/misc/GDI/WindowsGraphics.cs | 2 +- .../Formats/Cbor/CborConformanceLevel.cs | 2 +- .../Hashing/NonCryptographicHashAlgorithm.cs | 2 +- .../tests/NonCryptoHashTestDriver.cs | 4 +- .../ref/System.IO.Pipes.Forwards.cs | 0 .../ref/System.IO.Pipes.Internal.cs | 20 -- .../ref/System.Linq.Expressions.cs | 1 + .../System.Net.Http/ref/System.Net.Http.cs | 2 +- .../Managed/HttpListenerContext.Managed.cs | 1 - .../Windows/HttpListenerContext.Windows.cs | 1 - .../NetworkAddressChange.UnknownUnix.cs | 10 +- .../NetworkAddressChange.cs | 8 + .../ref/System.Net.Requests.cs | 11 +- .../src/System/Net/FileWebRequest.cs | 2 + .../src/System/Net/FileWebResponse.cs | 2 + .../src/System/Net/HttpWebRequest.cs | 2 + .../src/System/Net/HttpWebResponse.cs | 4 +- .../src/System/Net/WebRequest.cs | 2 + .../src/System/Net/WebResponse.cs | 3 + .../src/System/ReadOnlySpan.cs | 2 +- .../MissingManifestResourceException.cs | 2 + .../NeutralResourcesLanguageAttribute.cs | 3 + .../SatelliteContractVersionAttribute.cs | 3 + .../Runtime/InteropServices/BStrWrapper.cs | 3 + .../ComEventInterfaceAttribute.cs | 2 + .../InteropServices/ComEventsHelpers.NoCom.cs | 2 + .../ComSourceInterfacesAttribute.cs | 3 + .../InteropServices/ComTypes/IBindCtx.cs | 4 + .../ComTypes/IConnectionPoint.cs | 3 + .../ComTypes/IConnectionPointContainer.cs | 3 + .../ComTypes/IEnumConnectionPoints.cs | 3 + .../ComTypes/IEnumConnections.cs | 4 + .../InteropServices/ComTypes/IEnumMoniker.cs | 3 + .../InteropServices/ComTypes/IEnumString.cs | 3 + .../InteropServices/ComTypes/IEnumVARIANT.cs | 3 + .../InteropServices/ComTypes/IMoniker.cs | 4 + .../InteropServices/ComTypes/IPersistFile.cs | 3 + .../ComTypes/IRunningObjectTable.cs | 3 + .../InteropServices/ComTypes/IStream.cs | 4 + .../InteropServices/ComTypes/ITypeComp.cs | 5 + .../InteropServices/ComTypes/ITypeInfo.cs | 24 +- .../InteropServices/ComTypes/ITypeInfo2.cs | 3 + .../InteropServices/ComTypes/ITypeLib.cs | 6 + .../InteropServices/ComTypes/ITypeLib2.cs | 3 + .../InteropServices/CurrencyWrapper.cs | 4 + .../CustomQueryInterfaceMode.cs | 3 + .../CustomQueryInterfaceResult.cs | 3 + .../InteropServices/DispatchWrapper.cs | 2 + .../Runtime/InteropServices/ErrorWrapper.cs | 3 + .../Runtime/InteropServices/ICustomAdapter.cs | 3 + .../InteropServices/ICustomQueryInterface.cs | 3 + .../Runtime/InteropServices/Marshal.NoCom.cs | 11 + .../System/Runtime/InteropServices/Marshal.cs | 14 + .../Runtime/InteropServices/UnknownWrapper.cs | 3 + .../System/Runtime/InteropServices/VarEnum.cs | 3 + .../Runtime/InteropServices/VariantWrapper.cs | 3 + .../src/System/String.cs | 3 + .../src/System/Threading/Thread.cs | 2 +- .../System.Private.Uri/src/System/Uri.cs | 2 +- .../src/System/Xml/Schema/XmlSchema.cs | 4 +- .../Xml/Serialization/IXmlSerializable.cs | 2 + .../Context/Delegation/DelegatingModule.cs | 4 +- .../Assemblies/RoAssembly.Modules.cs | 4 +- .../TypeLoading/Assemblies/RoAssembly.cs | 6 +- .../TypeLoading/Modules/RoModule.cs | 4 +- .../Configuration/CachingSectionGroup.cs | 2 +- .../Configuration/MemoryCacheElement.cs | 2 +- .../Configuration/MemoryCacheSection.cs | 2 +- .../MemoryCacheSettingsCollection.cs | 2 +- .../Caching/FileChangeNotificationSystem.cs | 2 +- .../Runtime/Caching/HostFileChangeMonitor.cs | 2 +- .../src/System/Runtime/Caching/MemoryCache.cs | 2 +- .../Runtime/Caching/MemoryCacheStatistics.cs | 2 +- .../Runtime/Caching/MemoryCacheStore.cs | 2 +- .../InteropServices/ComAwareEventInfo.cs | 2 + .../Runtime/InteropServices/ComTypes/ADVF.cs | 3 + .../InteropServices/ComTypes/DATADIR.cs | 3 + .../InteropServices/ComTypes/DVASPECT.cs | 3 + .../InteropServices/ComTypes/FORMATETC.cs | 3 + .../InteropServices/ComTypes/IAdviseSink.cs | 3 + .../ComTypes/IEnumFormatETC.cs | 3 + .../InteropServices/ComTypes/STATDATA.cs | 3 + .../InteropServices/ComTypes/STGMEDIUM.cs | 3 + .../Runtime/InteropServices/ComTypes/TYMED.cs | 3 + .../System.Runtime/ref/System.Runtime.cs | 17 +- .../ref/System.Security.Cryptography.Pkcs.cs | 4 +- .../Security/Cryptography/Pkcs/CmsSigner.cs | 4 +- .../Security/Cryptography/Pkcs/SignedCms.cs | 4 +- .../Security/Cryptography/Pkcs/SignerInfo.cs | 4 +- .../ref/System.Security.Cryptography.cs | 11 +- .../ref/System.Security.Cryptography.csproj | 2 + .../src/System.Security.Cryptography.csproj | 2 + .../RC2CryptoServiceProvider.NotSupported.cs | 3 + .../RC2CryptoServiceProvider.Unix.cs | 3 + .../ref/System.Security.Permissions.cs | 274 +++++++++--------- .../System.Security.Permissions.netcoreapp.cs | 2 +- .../Configuration/ConfigurationPermission.cs | 2 +- .../ConfigurationPermissionAttribute.cs | 2 +- .../System/Data/Common/DBDataPermission.cs | 2 +- .../Data/Common/DBDataPermissionAttribute.cs | 2 +- .../src/System/Data/Odbc/OdbcPermission.cs | 2 +- .../Data/Odbc/OdbcPermissionAttribute.cs | 3 + .../src/System/Data/OleDb/OleDbPermission.cs | 2 +- .../Data/OleDb/OleDbPermissionAttribute.cs | 3 + .../Data/OracleClient/OraclePermission.cs | 2 +- .../OracleClient/OraclePermissionAttribute.cs | 2 +- .../Data/SqlClient/SqlClientPermission.cs | 2 +- .../SqlClient/SqlClientPermissionAttribute.cs | 3 + .../System/Diagnostics/EventLogPermission.cs | 2 +- .../EventLogPermissionAttribute.cs | 2 +- .../PerformanceCounterPermission.cs | 2 +- .../PerformanceCounterPermissionAttribute.cs | 2 +- .../Drawing/Printing/PrintingPermission.cs | 2 +- .../Printing/PrintingPermissionAttribute.cs | 2 +- .../src/System/Net/DnsPermission.cs | 2 +- .../src/System/Net/DnsPermissionAttribute.cs | 2 +- .../src/System/Net/Mail/SmtpPermission.cs | 2 +- .../Net/Mail/SmtpPermissionAttribute.cs | 2 +- .../NetworkInformationPermission.cs | 2 +- .../NetworkInformationPermissionAttribute.cs | 2 +- .../PeerCollaborationPermission.cs | 2 +- .../PeerCollaborationPermissionAttribute.cs | 2 +- .../System/Net/PeerToPeer/PnrpPermission.cs | 2 +- .../Net/PeerToPeer/PnrpPermissionAttribute.cs | 2 +- .../src/System/Net/SocketPermission.cs | 2 +- .../System/Net/SocketPermissionAttribute.cs | 2 +- .../src/System/Net/WebPermission.cs | 2 +- .../src/System/Net/WebPermissionAttribute.cs | 2 +- .../System/Security/CodeAccessPermission.cs | 2 +- .../Security/HostProtectionException.cs | 2 +- .../src/System/Security/NamedPermissionSet.cs | 2 +- .../Permissions/DataProtectionPermission.cs | 2 +- .../DataProtectionPermissionAttribute.cs | 2 +- .../DataProtectionPermissionFlags.cs | 2 +- .../Permissions/EnvironmentPermission.cs | 2 +- .../EnvironmentPermissionAccess.cs | 2 +- .../EnvironmentPermissionAttribute.cs | 2 +- .../Permissions/FileDialogPermission.cs | 2 +- .../Permissions/FileDialogPermissionAccess.cs | 2 +- .../FileDialogPermissionAttribute.cs | 2 +- .../Security/Permissions/FileIOPermission.cs | 2 +- .../Permissions/FileIOPermissionAccess.cs | 2 +- .../Permissions/FileIOPermissionAttribute.cs | 2 +- .../Permissions/GacIdentityPermission.cs | 2 +- .../GacIdentityPermissionAttribute.cs | 2 +- .../Permissions/HostProtectionAttribute.cs | 2 +- .../Permissions/HostProtectionResource.cs | 2 +- .../Permissions/IUnrestrictedPermission.cs | 2 +- .../Permissions/IsolatedStorageContainment.cs | 2 +- .../IsolatedStorageFilePermission.cs | 2 +- .../IsolatedStorageFilePermissionAttribute.cs | 2 +- .../Permissions/IsolatedStoragePermission.cs | 2 +- .../IsolatedStoragePermissionAttribute.cs | 2 +- .../Permissions/KeyContainerPermission.cs | 2 +- .../KeyContainerPermissionAccessEntry.cs | 2 +- ...ontainerPermissionAccessEntryCollection.cs | 2 +- ...ontainerPermissionAccessEntryEnumerator.cs | 2 +- .../KeyContainerPermissionAttribute.cs | 2 +- .../KeyContainerPermissionFlags.cs | 2 +- .../Security/Permissions/MediaPermission.cs | 10 +- .../Permissions/PermissionSetAttribute.cs | 2 +- .../Permissions/PrincipalPermission.cs | 2 +- .../PrincipalPermissionAttribute.cs | 4 +- .../PublisherIdentityPermission.cs | 2 +- .../PublisherIdentityPermissionAttribute.cs | 2 +- .../Permissions/ReflectionPermission.cs | 2 +- .../ReflectionPermissionAttribute.cs | 2 +- .../Permissions/ReflectionPermissionFlag.cs | 2 +- .../Permissions/RegistryPermission.cs | 2 +- .../Permissions/RegistryPermissionAccess.cs | 2 +- .../RegistryPermissionAttribute.cs | 2 +- .../Permissions/ResourcePermissionBase.cs | 2 +- .../ResourcePermissionBaseEntry.cs | 2 +- .../Permissions/SecurityPermission.cs | 2 +- .../Permissions/SiteIdentityPermission.cs | 2 +- .../SiteIdentityPermissionAttribute.cs | 2 +- .../Security/Permissions/StorePermission.cs | 2 +- .../Permissions/StorePermissionAttribute.cs | 2 +- .../Permissions/StorePermissionFlags.cs | 2 +- .../StrongNameIdentityPermission.cs | 2 +- .../StrongNameIdentityPermissionAttribute.cs | 2 +- .../Permissions/StrongNamePublicKeyBlob.cs | 2 +- .../Permissions/TypeDescriptorPermission.cs | 2 +- .../TypeDescriptorPermissionAttribute.cs | 2 +- .../TypeDescriptorPermissionFlags.cs | 2 +- .../Security/Permissions/UIPermission.cs | 2 +- .../Permissions/UIPermissionAttribute.cs | 2 +- .../Permissions/UIPermissionClipboard.cs | 2 +- .../Permissions/UIPermissionWindow.cs | 2 +- .../Permissions/UrlIdentityPermission.cs | 2 +- .../UrlIdentityPermissionAttribute.cs | 2 +- .../Permissions/WebBrowserPermission.cs | 6 +- .../Permissions/ZoneIdentityPermission.cs | 2 +- .../ZoneIdentityPermissionAttribute.cs | 2 +- .../Security/Policy/ApplicationTrust.cs | 4 +- .../System/Security/Policy/FileCodeGroup.cs | 2 +- .../Security/Policy/FirstMatchCodeGroup.cs | 2 +- .../System/Security/Policy/GacInstalled.cs | 2 +- .../Policy/IIdentityPermissionFactory.cs | 2 +- .../Policy/PermissionRequestEvidence.cs | 2 +- .../src/System/Security/Policy/PolicyLevel.cs | 25 +- .../System/Security/Policy/PolicyStatement.cs | 7 +- .../src/System/Security/Policy/Publisher.cs | 2 +- .../src/System/Security/Policy/Site.cs | 2 +- .../src/System/Security/Policy/StrongName.cs | 2 +- .../Policy/StrongNameMembershipCondition.cs | 2 +- .../System/Security/Policy/UnionCodeGroup.cs | 2 +- .../src/System/Security/Policy/Url.cs | 2 +- .../src/System/Security/Policy/Zone.cs | 2 +- .../src/System/Security/SecurityContext.cs | 2 +- .../src/System/Security/SecurityManager.cs | 2 +- .../ServiceControllerPermission.cs | 2 +- .../ServiceControllerPermissionAttribute.cs | 2 +- .../DistributedTransactionPermission.cs | 2 +- ...stributedTransactionPermissionAttribute.cs | 2 +- .../src/System/Web/AspNetHostingPermission.cs | 2 +- .../Web/AspNetHostingPermissionAttribute.cs | 2 +- .../Xaml/Permissions/XamlLoadPermission.cs | 2 +- .../src/AudioFormat/SpeechAudioFormatInfo.cs | 2 +- .../System.Speech/src/Recognition/Grammar.cs | 8 +- .../src/Synthesis/PromptBuilder.cs | 3 +- .../Web/OptimizedInboxTextEncoder.cs | 10 +- .../Common/JsonCamelCaseNamingPolicy.cs | 2 +- .../Value/UnsupportedTypeConverterFactory.cs | 2 +- .../Json/Serialization/JsonConverterOfT.cs | 2 +- .../Serialization/JsonSerializerContext.cs | 2 - .../Metadata/JsonPropertyInfoOfT.cs | 2 +- .../Metadata/JsonPropertyInfoValuesOfT.cs | 3 + .../System.Text.Json.Tests/JsonTestHelper.cs | 2 +- .../ref/System.Web.HttpUtility.cs | 2 + .../src/System/Web/HttpUtility.cs | 9 +- .../ApiCompatExcludedAttributes.txt | 3 + .../Directory.Build.props | 1 + .../ref/System.Xml.ReaderWriter.cs | 2 +- src/libraries/apicompat/ApiCompat.proj | 9 +- .../ApiCompatBaselineExcludedAttributes.txt | 4 + src/libraries/shims/Directory.Build.props | 4 - src/libraries/shims/System.Xml.props | 6 - src/libraries/shims/ref/System.Xml.csproj | 6 +- .../src/System/Reflection/Assembly.Mono.cs | 1 + .../Runtime/InteropServices/Marshal.Mono.cs | 33 ++- .../src/System/Threading/ThreadPool.Mono.cs | 2 +- 274 files changed, 813 insertions(+), 444 deletions(-) delete mode 100644 src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Forwards.cs delete mode 100644 src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs create mode 100644 src/libraries/System.Xml.ReaderWriter/ApiCompatExcludedAttributes.txt create mode 100644 src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt delete mode 100644 src/libraries/shims/System.Xml.props diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index 43401c67277d1..f1690b0672b23 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -52,7 +52,3 @@ T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute T:System.Reflection.DefaultMemberAttribute T:System.Timers.TimersDescriptionAttribute - -// These do not need to be persisted in the implementation -T:System.ComponentModel.EditorBrowsableAttribute -T:System.ObsoleteAttribute diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs index 93fd276b9d269..ef0e80bde52a7 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs @@ -81,6 +81,7 @@ // means that the problem is already quite complex and we should not be dealing with it - see // ComEventsMethod.Invoke +using System.ComponentModel; using System.Runtime.Versioning; namespace System.Runtime.InteropServices @@ -90,6 +91,7 @@ namespace System.Runtime.InteropServices /// raised COM objects. /// [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static class ComEventsHelper { /// diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs index c7962bb586bce..b1ae527fa196a 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; @@ -28,6 +29,7 @@ public static partial class Marshal [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", Justification = "Trimming doesn't affect types eligible for marshalling. Different exception for invalid inputs doesn't matter.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr OffsetOf(Type t!!, string fieldName) { FieldInfo? f = t.GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); @@ -48,24 +50,32 @@ public static IntPtr OffsetOf(Type t!!, string fieldName) [MethodImpl(MethodImplOptions.InternalCall)] private static extern IntPtr OffsetOfHelper(IRuntimeFieldInfo f); + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadByte(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static byte ReadByte(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, (IntPtr nativeHome, int offset) => ReadByte(nativeHome, offset)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt16(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static short ReadInt16(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, (IntPtr nativeHome, int offset) => ReadInt16(nativeHome, offset)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt32(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static int ReadInt32(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, (IntPtr nativeHome, int offset) => ReadInt32(nativeHome, offset)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt64(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static long ReadInt64([MarshalAs(UnmanagedType.AsAny), In] object ptr, int ofs) { @@ -106,24 +116,32 @@ private static unsafe T ReadValueSlow(object ptr, int ofs, Func WriteByte(nativeHome, offset, value)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt16(Object, Int32, Int16) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt16(object ptr, int ofs, short val) { WriteValueSlow(ptr, ofs, val, (IntPtr nativeHome, int offset, short value) => Marshal.WriteInt16(nativeHome, offset, value)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt32(Object, Int32, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt32(object ptr, int ofs, int val) { WriteValueSlow(ptr, ofs, val, (IntPtr nativeHome, int offset, int value) => Marshal.WriteInt32(nativeHome, offset, value)); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt64(Object, Int32, Int64) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt64(object ptr, int ofs, long val) { @@ -201,6 +219,8 @@ private static void PrelinkCore(MethodInfo m) [MethodImpl(MethodImplOptions.InternalCall)] public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers(); + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("GetExceptionCode() may be unavailable in future releases.")] [MethodImpl(MethodImplOptions.InternalCall)] public static extern int GetExceptionCode(); @@ -211,6 +231,7 @@ private static void PrelinkCore(MethodInfo m) /// [RequiresDynamicCode("Marshalling code for the object might not be available. Use the StructureToPtr overload instead.")] [MethodImpl(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld); /// @@ -225,6 +246,7 @@ private static void PrelinkCore(MethodInfo m) /// [RequiresDynamicCode("Marshalling code for the object might not be available. Use the DestroyStructure overload instead.")] [MethodImpl(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void DestroyStructure(IntPtr ptr, Type structuretype); [MethodImpl(MethodImplOptions.InternalCall)] @@ -327,6 +349,7 @@ public static string GetTypeInfoName(ITypeInfo typeInfo!!) /// Object o should support Type T /// [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr /* IUnknown* */ GetComInterfaceForObject(object o!!, Type T!!) { return GetComInterfaceForObjectNative(o, T, true); @@ -341,6 +364,7 @@ public static string GetTypeInfoName(ITypeInfo typeInfo!!) /// invoke customized QueryInterface or not. /// [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr /* IUnknown* */ GetComInterfaceForObject(object o!!, Type T!!, CustomQueryInterfaceMode mode) { bool bEnableCustomizedQueryInterface = ((mode == CustomQueryInterfaceMode.Allow) ? true : false); @@ -390,6 +414,7 @@ public static object GetUniqueObjectForIUnknown(IntPtr unknown) public static extern object GetTypedObjectForIUnknown(IntPtr /* IUnknown* */ pUnk, Type t); [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o) { if (!IsBuiltInComSupported) @@ -530,6 +555,7 @@ public static bool SetComObjectData(object obj, object key, object? data) /// of the specified type. The type must be derived from __ComObject. /// [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] [return: NotNullIfNotNull("o")] public static object? CreateWrapperOfType(object? o, Type t) { @@ -603,6 +629,7 @@ public static TWrapper CreateWrapperOfType(T? o) public static extern bool IsTypeVisibleFromCom(Type t); [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void GetNativeVariantForObject(object? obj, /* VARIANT * */ IntPtr pDstNativeVariant) { if (!IsBuiltInComSupported) @@ -617,6 +644,7 @@ public static void GetNativeVariantForObject(object? obj, /* VARIANT * */ IntPtr private static extern void GetNativeVariantForObjectNative(object? obj, /* VARIANT * */ IntPtr pDstNativeVariant); [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant) { if (!IsBuiltInComSupported) @@ -628,6 +656,7 @@ public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? GetObjectForNativeVariant(/* VARIANT * */ IntPtr pSrcNativeVariant) { if (!IsBuiltInComSupported) @@ -642,6 +671,7 @@ public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant private static extern object? GetObjectForNativeVariantNative(/* VARIANT * */ IntPtr pSrcNativeVariant); [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { if (!IsBuiltInComSupported) @@ -653,6 +683,7 @@ public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object?[] GetObjectsForNativeVariants(/* VARIANT * */ IntPtr aSrcNativeVariant, int cVars) { if (!IsBuiltInComSupported) @@ -667,6 +698,7 @@ public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant private static extern object?[] GetObjectsForNativeVariantsNative(/* VARIANT * */ IntPtr aSrcNativeVariant, int cVars); [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { if (!IsBuiltInComSupported) diff --git a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index 3ea1496468ffd..82acbcdb354b6 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -3887,9 +3887,11 @@ private static void WrapArgsForInvokeCall(object[] aArgs, int[] aArgsWrapperType case DispatchWrapperType.Error: wrapperType = typeof(ErrorWrapper); break; +#pragma warning disable 0618 // CurrencyWrapper is obsolete case DispatchWrapperType.Currency: wrapperType = typeof(CurrencyWrapper); break; +#pragma warning restore 0618 case DispatchWrapperType.BStr: wrapperType = typeof(BStrWrapper); isString = true; @@ -3946,9 +3948,11 @@ private static void WrapArgsForInvokeCall(object[] aArgs, int[] aArgsWrapperType case DispatchWrapperType.Error: aArgs[i] = new ErrorWrapper(aArgs[i]); break; +#pragma warning disable 0618 // CurrencyWrapper is obsolete case DispatchWrapperType.Currency: aArgs[i] = new CurrencyWrapper(aArgs[i]); break; +#pragma warning restore 0618 case DispatchWrapperType.BStr: aArgs[i] = new BStrWrapper((string)aArgs[i]); break; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Variant.cs b/src/coreclr/System.Private.CoreLib/src/System/Variant.cs index 8d2c55444072d..d43f098393749 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Variant.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Variant.cs @@ -288,12 +288,14 @@ public Variant(object? obj) obj = (object)(((ErrorWrapper)obj).ErrorCode); Debug.Assert(obj != null, "obj != null"); } +#pragma warning disable 0618 // CurrencyWrapper is obsolete else if (obj is CurrencyWrapper) { vt = VarEnum.VT_CY; obj = (object)(((CurrencyWrapper)obj).WrappedObject); Debug.Assert(obj != null, "obj != null"); } +#pragma warning restore 0618 else if (obj is BStrWrapper) { vt = VarEnum.VT_BSTR; @@ -441,7 +443,9 @@ internal static void MarshalHelperCastVariant(object pValue, int vt, ref Variant 3 => /*VT_I4*/ new Variant(iv.ToInt32(provider)), 4 => /*VT_R4*/ new Variant(iv.ToSingle(provider)), 5 => /*VT_R8*/ new Variant(iv.ToDouble(provider)), +#pragma warning disable 0618 // CurrencyWrapper is obsolete 6 => /*VT_CY*/ new Variant(new CurrencyWrapper(iv.ToDecimal(provider))), +#pragma warning restore 0618 7 => /*VT_DATE*/ new Variant(iv.ToDateTime(provider)), 8 => /*VT_BSTR*/ new Variant(iv.ToString(provider)), #pragma warning disable CA1416 // Validate platform compatibility diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.CoreRT.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.CoreRT.cs index d42d16e742ffd..fd1e3e899fd7a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.CoreRT.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.CoreRT.cs @@ -36,7 +36,7 @@ public static Assembly Load(string assemblyString) return Load(name); } - [Obsolete("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")] + [Obsolete("Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.")] public static Assembly LoadWithPartialName(string partialName) { if (partialName == null) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.CoreRT.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.CoreRT.cs index 2ae1a795dc1f2..61d618f08d2bd 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.CoreRT.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.CoreRT.cs @@ -1,11 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Versioning; namespace System.Runtime.InteropServices { [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static class ComEventsHelper { public static void Combine(object rcw, Guid iid, int dispid, Delegate d) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs index a7588ee047d5c..12666933852d5 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices.ComTypes; @@ -24,6 +25,7 @@ public static int GetHRForException(Exception? e) public static bool AreComObjectsAvailableForCleanup() => false; [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -47,6 +49,7 @@ public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) where T : not } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? CreateWrapperOfType(object? o, Type t) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -71,6 +74,7 @@ public static int FinalReleaseComObject(object o) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr GetComInterfaceForObject(object o, Type T) { if (o is null) @@ -87,6 +91,7 @@ public static IntPtr GetComInterfaceForObject(object o, Type T) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -122,6 +127,7 @@ public static IntPtr GetIUnknownForObject(object o) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static unsafe void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVariant) { if (pDstNativeVariant == IntPtr.Zero) @@ -188,9 +194,11 @@ public static unsafe void GetNativeVariantForObject(object? obj, IntPtr pDstNati case BStrWrapper value: data->AsBstr = value.WrappedObject; break; +#pragma warning disable 0618 // CurrencyWrapper is obsolete case CurrencyWrapper value: data->AsCy = value.WrappedObject; break; +#pragma warning restore 0618 case UnknownWrapper value: data->AsUnknown = value.WrappedObject; break; @@ -285,6 +293,7 @@ public static unsafe void GetNativeVariantForObject(object? obj, IntPtr pDstNati } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant) { GetNativeVariantForObject((object?)obj, pDstNativeVariant); @@ -303,6 +312,7 @@ public static object GetObjectForIUnknown(IntPtr pUnk) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static unsafe object? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { if (pSrcNativeVariant == IntPtr.Zero) @@ -351,18 +361,21 @@ public static object GetObjectForIUnknown(IntPtr pUnk) [return: MaybeNull] [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object?[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreRT.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreRT.cs index b15d63444af4f..53c8f5dc06fca 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreRT.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreRT.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; @@ -19,6 +20,7 @@ internal static int SizeOfHelper(Type t, bool throwIfNotMarshalable) return RuntimeAugments.InteropCallbacks.GetStructUnsafeStructSize(t.TypeHandle); } + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr OffsetOf(Type t, string fieldName) { if (t == null) @@ -86,6 +88,7 @@ internal static unsafe void PtrToStructureImpl(IntPtr ptr, object structure) } [RequiresDynamicCode("Marshalling code for the object might not be available. Use the DestroyStructure overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static unsafe void DestroyStructure(IntPtr ptr, Type structuretype) { if (ptr == IntPtr.Zero) @@ -123,6 +126,7 @@ public static unsafe void DestroyStructure(IntPtr ptr, Type structuretype) } [RequiresDynamicCode("Marshalling code for the object might not be available. Use the StructureToPtr overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static unsafe void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld) { if (structure == null) @@ -206,6 +210,8 @@ internal static bool IsPinnable(object o) return (o == null) || o.EETypePtr.MightBeBlittable(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("GetExceptionCode() may be unavailable in future releases.")] public static int GetExceptionCode() { // Obsolete @@ -218,24 +224,32 @@ public static IntPtr GetExceptionPointers() } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadByte(Object, Int32) may be unavailable in future releases.")] public static unsafe byte ReadByte(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, &ReadByte); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt16(Object, Int32) may be unavailable in future releases.")] public static unsafe short ReadInt16(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, &ReadInt16); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt32(Object, Int32) may be unavailable in future releases.")] public static unsafe int ReadInt32(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, &ReadInt32); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt64(Object, Int32) may be unavailable in future releases.")] public static unsafe long ReadInt64(object ptr, int ofs) { return ReadValueSlow(ptr, ofs, &ReadInt64); @@ -295,24 +309,32 @@ ptr is string || } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteByte(Object, Int32, Byte) may be unavailable in future releases.")] public static unsafe void WriteByte(object ptr, int ofs, byte val) { WriteValueSlow(ptr, ofs, val, &WriteByte); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt16(Object, Int32, Int16) may be unavailable in future releases.")] public static unsafe void WriteInt16(object ptr, int ofs, short val) { WriteValueSlow(ptr, ofs, val, &WriteInt16); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt32(Object, Int32, Int32) may be unavailable in future releases.")] public static unsafe void WriteInt32(object ptr, int ofs, int val) { WriteValueSlow(ptr, ofs, val, &WriteInt32); } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt64(Object, Int32, Int64) may be unavailable in future releases.")] public static unsafe void WriteInt64(object ptr, int ofs, long val) { WriteValueSlow(ptr, ofs, val, &WriteInt64); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Overlapped.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Overlapped.cs index df86052ba3d23..2c34e68fb5a78 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Overlapped.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Overlapped.cs @@ -239,7 +239,7 @@ public Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ar) : _overlappedData.AsyncResult = ar; } - [Obsolete("This constructor is not 64-bit compatible. Use the constructor that takes an IntPtr for the event handle. http://go.microsoft.com/fwlink/?linkid=14202")] + [Obsolete("This constructor is not 64-bit compatible and has been deprecated. Use the constructor that accepts an IntPtr for the event handle instead.")] public Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar) : this(offsetLo, offsetHi, new IntPtr(hEvent), ar) { } @@ -280,7 +280,7 @@ public IntPtr EventHandleIntPtr * Roots the iocb and stores it in the ReservedCOR field of native Overlapped * Pins the native Overlapped struct and returns the pinned index. ====================================================================*/ - [Obsolete("This method is not safe. Use Pack (iocb, userData) instead. http://go.microsoft.com/fwlink/?linkid=14202")] + [Obsolete("This overload is not safe and has been deprecated. Use Pack(IOCompletionCallback?, object?) instead.")] [CLSCompliant(false)] public unsafe NativeOverlapped* Pack(IOCompletionCallback iocb) { @@ -293,7 +293,7 @@ public IntPtr EventHandleIntPtr return _overlappedData.Pack(iocb, userData); } - [Obsolete("This method is not safe. Use UnsafePack (iocb, userData) instead. http://go.microsoft.com/fwlink/?linkid=14202")] + [Obsolete("This overload is not safe and has been deprecated. Use UnsafePack(IOCompletionCallback?, object?) instead.")] [CLSCompliant(false)] public unsafe NativeOverlapped* UnsafePack(IOCompletionCallback iocb) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreRT.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreRT.cs index 06666525d3e34..4d4e661160eb4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreRT.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreRT.cs @@ -41,7 +41,7 @@ public static unsafe bool UnsafeQueueNativeOverlapped(NativeOverlapped* overlapp return UnsafeQueueUserWorkItem(NativeOverlappedCallback, (IntPtr)overlapped); } - [Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Please use ThreadPool.BindHandle(SafeHandle) instead.", false)] + [Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")] [SupportedOSPlatform("windows")] public static bool BindHandle(IntPtr osHandle) { diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index d8800db97a510..6330a9f45a8d6 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -28,6 +28,7 @@ internal static class Obsoletions internal const string GlobalAssemblyCacheDiagId = "SYSLIB0005"; internal const string ThreadAbortMessage = "Thread.Abort is not supported and throws PlatformNotSupportedException."; + internal const string ThreadResetAbortMessage = "Thread.ResetAbort is not supported and throws PlatformNotSupportedException."; internal const string ThreadAbortDiagId = "SYSLIB0006"; internal const string DefaultCryptoAlgorithmsMessage = "The default implementation of this cryptography algorithm is not supported."; @@ -117,7 +118,7 @@ internal static class Obsoletions internal const string SignerInfoCounterSigMessage = "ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner."; internal const string SignerInfoCounterSigDiagId = "SYSLIB0035"; - internal const string RegexCompileToAssemblyMessage = "Regex.CompileToAssembly is obsolete and not supported. Use RegexGeneratorAttribute with the regular expression source generator instead."; + internal const string RegexCompileToAssemblyMessage = "Regex.CompileToAssembly is obsolete and not supported. Use the RegexGeneratorAttribute with the regular expression source generator instead."; internal const string RegexCompileToAssemblyDiagId = "SYSLIB0036"; internal const string AssemblyNameMembersMessage = "AssemblyName members HashAlgorithm, ProcessorArchitecture, and VersionCompatibility are obsolete and not supported."; diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs index f79cebca8f7c7..85c0697114db3 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs @@ -51,7 +51,7 @@ internal bool VerifyMac( throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } -#if NET5_0_OR_GREATER +#if NETCOREAPP Debug.Assert(expectedOutputSize <= 64); // SHA512 is the largest digest size we know about Span derived = stackalloc byte[expectedOutputSize]; #else diff --git a/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs b/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs index 105ccac93759f..3d1b8de29d435 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs @@ -12,7 +12,7 @@ internal static partial class Helpers { [UnsupportedOSPlatformGuard("browser")] internal static bool HasSymmetricEncryption { get; } = -#if NET5_0_OR_GREATER +#if NETCOREAPP !OperatingSystem.IsBrowser(); #else true; @@ -20,13 +20,13 @@ internal static partial class Helpers [UnsupportedOSPlatformGuard("browser")] internal static bool HasHMAC { get; } = -#if NET5_0_OR_GREATER +#if NETCOREAPP !OperatingSystem.IsBrowser(); #else true; #endif -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatformGuard("ios")] [UnsupportedOSPlatformGuard("tvos")] public static bool IsDSASupported => !OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS(); @@ -34,7 +34,7 @@ internal static partial class Helpers public static bool IsDSASupported => true; #endif -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatformGuard("android")] [UnsupportedOSPlatformGuard("browser")] public static bool IsRC2Supported => !OperatingSystem.IsAndroid(); @@ -44,7 +44,7 @@ internal static partial class Helpers [UnsupportedOSPlatformGuard("browser")] internal static bool HasMD5 { get; } = -#if NET5_0_OR_GREATER +#if NETCOREAPP !OperatingSystem.IsBrowser(); #else true; diff --git a/src/libraries/Common/src/System/Text/ValueStringBuilder.cs b/src/libraries/Common/src/System/Text/ValueStringBuilder.cs index f2cf107c5418a..9cd033f3986ee 100644 --- a/src/libraries/Common/src/System/Text/ValueStringBuilder.cs +++ b/src/libraries/Common/src/System/Text/ValueStringBuilder.cs @@ -159,7 +159,7 @@ public void Insert(int index, string? s) int remaining = _pos - index; _chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); s -#if !NET6_0_OR_GREATER +#if !NETCOREAPP .AsSpan() #endif .CopyTo(_chars.Slice(index)); @@ -210,7 +210,7 @@ private void AppendSlow(string s) } s -#if !NET6_0_OR_GREATER +#if !NETCOREAPP .AsSpan() #endif .CopyTo(_chars.Slice(pos)); diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs index 29fe14110db32..c46f089c488a2 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs @@ -224,7 +224,7 @@ public static IHostBuilder ConfigureDefaults(this IHostBuilder builder, string[] .ConfigureLogging((hostingContext, logging) => { bool isWindows = -#if NET6_0_OR_GREATER +#if NETCOREAPP OperatingSystem.IsWindows(); #else RuntimeInformation.IsOSPlatform(OSPlatform.Windows); @@ -239,7 +239,7 @@ public static IHostBuilder ConfigureDefaults(this IHostBuilder builder, string[] } logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); -#if NET6_0_OR_GREATER +#if NETCOREAPP if (!OperatingSystem.IsBrowser()) #endif { diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb index 4510144ebca2b..03de5ecac8ed3 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb @@ -2558,7 +2558,7 @@ MisMatch: Return ObjectUserDefinedConversion(Expression, TargetType) End Function - + diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb index e1ba2ce3dd953..de0bde5e73a2f 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb @@ -57,7 +57,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Function 'This method is only called from DynamicMethods generated at runtime - + @@ -197,7 +197,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Function 'This method is only called from DynamicMethods generated at runtime - + @@ -212,7 +212,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Function 'This method is only called from DynamicMethods generated at runtime - + @@ -383,7 +383,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Function 'LateGet 'This method is only called from DynamicMethods generated at runtime - + @@ -600,7 +600,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Sub 'This method is only called from DynamicMethods generated at runtime - + @@ -778,7 +778,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Sub 'LateIndexSet 'This method is only called from DynamicMethods generated at runtime - + @@ -824,7 +824,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Sub 'This method is only called from DynamicMethods generated at runtime - + @@ -876,7 +876,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Sub 'This method is only called from DynamicMethods generated at runtime - + diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Operators.Resolution.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Operators.Resolution.vb index 8ad6f33e05507..9c4d4bcf96fa6 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Operators.Resolution.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Operators.Resolution.vb @@ -242,7 +242,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End If End Function - + Public Shared Function FallbackInvokeUserDefinedOperator( diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/TextFieldParser.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/TextFieldParser.vb index d97358dcd5a5b..ac5417f3c4ec6 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/TextFieldParser.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/TextFieldParser.vb @@ -454,6 +454,7 @@ Namespace Microsoft.VisualBasic.FileIO ''' Closes the StreamReader ''' ''' + Public Sub Close() CloseReader() End Sub diff --git a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs index c04f557cf5437..830db433798c1 100644 --- a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs +++ b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs @@ -433,7 +433,7 @@ public static partial class ImmutableHashSet public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Immutable.ImmutableHashSet.Builder builder) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP public sealed partial class ImmutableHashSet : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.Immutable.IImmutableSet #else public sealed partial class ImmutableHashSet : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.ISet, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.Immutable.IImmutableSet @@ -921,7 +921,7 @@ public static partial class ImmutableSortedSet public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Immutable.ImmutableSortedSet.Builder builder) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP public sealed partial class ImmutableSortedSet : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.Immutable.IImmutableSet #else public sealed partial class ImmutableSortedSet : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.ISet, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.Immutable.IImmutableSet diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs index c29ccc50cb47d..92077a5970e3b 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs @@ -14,7 +14,7 @@ namespace System.Collections.Immutable /// The type of elements in the set. [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableEnumerableDebuggerProxy<>))] -#if NET5_0_OR_GREATER +#if NETCOREAPP public sealed partial class ImmutableHashSet : IImmutableSet, IHashKeyCollection, IReadOnlyCollection, ICollection, ISet, IReadOnlySet, ICollection, IStrongEnumerable.Enumerator> #else public sealed partial class ImmutableHashSet : IImmutableSet, IHashKeyCollection, IReadOnlyCollection, ICollection, ISet, ICollection, IStrongEnumerable.Enumerator> diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs index 8e635472f43d4..a1871e4738a35 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs @@ -19,7 +19,7 @@ namespace System.Collections.Immutable /// [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableEnumerableDebuggerProxy<>))] -#if NET5_0_OR_GREATER +#if NETCOREAPP public sealed partial class ImmutableSortedSet : IImmutableSet, ISortKeyCollection, IReadOnlySet, IReadOnlyList, IList, ISet, IList, IStrongEnumerable.Enumerator> #else public sealed partial class ImmutableSortedSet : IImmutableSet, ISortKeyCollection, IReadOnlyList, IList, ISet, IList, IStrongEnumerable.Enumerator> diff --git a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index 0cd5996b14700..f1a8f6f698f15 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -550,6 +550,7 @@ public partial interface ICancelAddNew void CancelNew(int itemIndex); void EndNew(int itemIndex); } + [System.ObsoleteAttribute("IComNativeDescriptorHandler has been deprecated. Add a TypeDescriptionProvider to handle type TypeDescriptor.ComObjectType instead.")] public partial interface IComNativeDescriptorHandler { System.ComponentModel.AttributeCollection GetAttributes(object component); @@ -988,6 +989,7 @@ protected virtual void FillAttributes(System.Collections.IList attributeList) { protected static System.Reflection.MethodInfo? FindMethod([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)] System.Type componentClass, string name, System.Type[] args, System.Type returnType, bool publicOnly) { throw null; } public override int GetHashCode() { throw null; } protected virtual object? GetInvocationTarget(System.Type type, object instance) { throw null; } + [System.ObsoleteAttribute("MemberDescriptor.GetInvokee has been deprecated. Use GetInvocationTarget instead.")] protected static object GetInvokee(System.Type componentClass, object component) { throw null; } protected static System.ComponentModel.ISite? GetSite(object? component) { throw null; } } @@ -1169,6 +1171,7 @@ public ProvidePropertyAttribute(string propertyName, [System.Diagnostics.CodeAna public override int GetHashCode() { throw null; } } [System.AttributeUsageAttribute(System.AttributeTargets.Property)] + [System.ObsoleteAttribute("RecommendedAsConfigurableAttribute has been deprecated. Use System.ComponentModel.SettingsBindableAttribute instead.")] public partial class RecommendedAsConfigurableAttribute : System.Attribute { public static readonly System.ComponentModel.RecommendedAsConfigurableAttribute Default; @@ -1384,14 +1387,22 @@ internal TypeDescriptor() { } public static System.Type ComObjectType { [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] get { throw null; } } public static System.Type InterfaceType { [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] get { throw null; } } public static event System.ComponentModel.RefreshEventHandler? Refreshed { add { } remove { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeDescriptionProvider AddAttributes(object instance, params System.Attribute[] attributes) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeDescriptionProvider AddAttributes(System.Type type, params System.Attribute[] attributes) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Types specified in table may be trimmed, or have their static construtors trimmed.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void AddEditorTable(System.Type editorBaseType, System.Collections.Hashtable table) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void AddProvider(System.ComponentModel.TypeDescriptionProvider provider, object instance) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void AddProvider(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void AddProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, object instance) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void AddProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void CreateAssociation(object primary, object secondary) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] public static System.ComponentModel.Design.IDesigner? CreateDesigner(System.ComponentModel.IComponent component, System.Type designerBaseType) { throw null; } @@ -1402,42 +1413,50 @@ public static void CreateAssociation(object primary, object secondary) { } public static System.ComponentModel.PropertyDescriptor CreateProperty([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params System.Attribute[] attributes) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered.")] public static System.ComponentModel.PropertyDescriptor CreateProperty([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType, string name, System.Type type, params System.Attribute[] attributes) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static object GetAssociation(System.Type type, object primary) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] public static System.ComponentModel.AttributeCollection GetAttributes(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.AttributeCollection GetAttributes(object component, bool noCustomTypeDesc) { throw null; } public static System.ComponentModel.AttributeCollection GetAttributes([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] public static string? GetClassName(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static string? GetClassName(object component, bool noCustomTypeDesc) { throw null; } public static string? GetClassName([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] public static string? GetComponentName(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static string? GetComponentName(object component, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All. The Type of component cannot be statically discovered.")] public static System.ComponentModel.TypeConverter GetConverter(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All. The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeConverter GetConverter(object component, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")] public static System.ComponentModel.TypeConverter GetConverter([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type type) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")] public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")] public static System.ComponentModel.EventDescriptor? GetDefaultEvent([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")] public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered.")] public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")] public static object? GetEditor(object component, System.Type editorBaseType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static object? GetEditor(object component, System.Type editorBaseType, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Editors registered in TypeDescriptor.AddEditorTable may be trimmed.")] public static object? GetEditor([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type type, System.Type editorBaseType) { throw null; } @@ -1446,8 +1465,10 @@ public static void CreateAssociation(object primary, object secondary) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")] public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, System.Attribute[] attributes) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, System.Attribute[]? attributes, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc) { throw null; } public static System.ComponentModel.EventDescriptorCollection GetEvents([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")] @@ -1461,26 +1482,37 @@ public static void CreateAssociation(object primary, object secondary) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")] public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, System.Attribute[]? attributes, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, bool noCustomTypeDesc) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered.")] public static System.ComponentModel.PropertyDescriptorCollection GetProperties([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("PropertyDescriptor's PropertyType cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")] public static System.ComponentModel.PropertyDescriptorCollection GetProperties([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type componentType, System.Attribute[]? attributes) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeDescriptionProvider GetProvider(object instance) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeDescriptionProvider GetProvider(System.Type type) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("GetReflectionType is not trim compatible because the Type of object cannot be statically discovered.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Type GetReflectionType(object instance) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] public static System.Type GetReflectionType([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] System.Type type) { throw null; } public static void Refresh(object component) { } public static void Refresh(System.Reflection.Assembly assembly) { } public static void Refresh(System.Reflection.Module module) { } public static void Refresh(System.Type type) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveAssociation(object primary, object secondary) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveAssociations(object primary) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveProvider(System.ComponentModel.TypeDescriptionProvider provider, object instance) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveProvider(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, object instance) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static void RemoveProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) { } public static void SortDescriptorArray(System.Collections.IList infos) { } } diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/RootDesignerSerializerAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/RootDesignerSerializerAttribute.cs index c22454c9d84b6..5063f826b0089 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/RootDesignerSerializerAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/RootDesignerSerializerAttribute.cs @@ -9,7 +9,7 @@ namespace System.ComponentModel.Design.Serialization /// being used as a root object. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)] - [Obsolete("RootDesignerSerializerAttribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)).")] + [Obsolete("RootDesignerSerializerAttribute has been deprecated. Use DesignerSerializerAttribute instead. For example, to specify a root designer for CodeDom, use DesignerSerializerAttribute(...,typeof(TypeCodeDomSerializer)) instead.")] public sealed class RootDesignerSerializerAttribute : Attribute { private string? _typeId; diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationException.cs index ccac0ebb39f58..775c1fdb291dc 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationException.cs @@ -100,7 +100,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont [Obsolete("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException.GetFilename instead.")] public static string GetXmlNodeFilename(XmlNode node) => (node as IConfigErrorInfo)?.Filename ?? string.Empty; - [Obsolete("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException.GetFilename instead.")] + [Obsolete("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException.GetLinenumber instead.")] public static int GetXmlNodeLineNumber(XmlNode node) => (node as IConfigErrorInfo)?.LineNumber ?? 0; } } diff --git a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs index a29a00d7a6af5..fb65b3f712075 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -120,6 +120,7 @@ public override void EnlistTransaction(System.Transactions.Transaction? transact public override System.Data.DataTable GetSchema(string collectionName, string?[]? restrictionValues) { throw null; } public override void Open() { } public static void ReleaseObjectPool() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public void ResetState() { } object System.ICloneable.Clone() { throw null; } } @@ -196,8 +197,10 @@ public override void Close() { } public override bool GetBoolean(int ordinal) { throw null; } public override byte GetByte(int ordinal) { throw null; } public override long GetBytes(int ordinal, long dataIndex, byte[]? buffer, int bufferIndex, int length) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override char GetChar(int ordinal) { throw null; } public override long GetChars(int ordinal, long dataIndex, char[]? buffer, int bufferIndex, int length) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public new System.Data.OleDb.OleDbDataReader GetData(int ordinal) { throw null; } public override string GetDataTypeName(int index) { throw null; } public override System.DateTime GetDateTime(int ordinal) { throw null; } @@ -336,7 +339,9 @@ public sealed partial class OleDbParameter : System.Data.Common.DbParameter, Sys public OleDbParameter() { } public OleDbParameter(string? name, System.Data.OleDb.OleDbType dataType) { } public OleDbParameter(string? name, System.Data.OleDb.OleDbType dataType, int size) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public OleDbParameter(string? parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string? srcColumn, System.Data.DataRowVersion srcVersion, object? value) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public OleDbParameter(string? parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, byte precision, byte scale, string? sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object? value) { } public OleDbParameter(string? name, System.Data.OleDb.OleDbType dataType, int size, string? srcColumn) { } public OleDbParameter(string? name, object? value) { } @@ -386,6 +391,8 @@ internal OleDbParameterCollection() { } public System.Data.OleDb.OleDbParameter Add(string? parameterName, System.Data.OleDb.OleDbType oleDbType) { throw null; } public System.Data.OleDb.OleDbParameter Add(string? parameterName, System.Data.OleDb.OleDbType oleDbType, int size) { throw null; } public System.Data.OleDb.OleDbParameter Add(string? parameterName, System.Data.OleDb.OleDbType oleDbType, int size, string? sourceColumn) { throw null; } + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated. Use AddWithValue(String parameterName, Object value) instead.")] public System.Data.OleDb.OleDbParameter Add(string? parameterName, object? value) { throw null; } public override void AddRange(System.Array values) { } public void AddRange(System.Data.OleDb.OleDbParameter[] values) { } diff --git a/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs b/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs index 86ce49c7dcc1b..162df87f6d6a7 100644 --- a/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs +++ b/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs @@ -7,7 +7,7 @@ public interface ISymbolBinder { // The importer parameter should be an IntPtr, not an int. This interface can not be modified without // a breaking change, and so ISymbolBinderEx.GetReader() has been added with the correct marshalling layout. - [Obsolete("ISymbolBinder.GetReader has been deprecated because it is not 64-bit compatible. Use ISymbolBinder1.GetReader instead. ISymbolBinder1.GetReader takes the importer interface pointer as an IntPtr instead of an Int32, and thus works on both 32-bit and 64-bit architectures.")] + [Obsolete("ISymbolBinder.GetReader has been deprecated because it is not 64-bit compatible. Use ISymbolBinder1.GetReader instead. ISymbolBinder1.GetReader accepts the importer interface pointer as an IntPtr instead of an Int32, and thus works on both 32-bit and 64-bit architectures.")] ISymbolReader? GetReader(int importer, string filename, string searchPath); } diff --git a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs index d64ef98f18e38..3b9228be10af8 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs @@ -171,6 +171,7 @@ public partial class PasswordException : System.DirectoryServices.AccountManagem } public abstract partial class Principal : System.IDisposable { + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] protected Principal() { } public System.DirectoryServices.AccountManagement.PrincipalContext Context { get { throw null; } } [System.ComponentModel.BrowsableAttribute(false)] @@ -186,6 +187,7 @@ protected Principal() { } public System.Security.Principal.SecurityIdentifier Sid { get { throw null; } } public string StructuralObjectClass { get { throw null; } } public string UserPrincipalName { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] protected void CheckDisposedOrDeleted() { } public void Delete() { } public virtual void Dispose() { } @@ -194,7 +196,9 @@ public virtual void Dispose() { } protected void ExtensionSet(string attribute, object value) { } public static System.DirectoryServices.AccountManagement.Principal FindByIdentity(System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue) { throw null; } public static System.DirectoryServices.AccountManagement.Principal FindByIdentity(System.DirectoryServices.AccountManagement.PrincipalContext context, string identityValue) { throw null; } + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] protected static System.DirectoryServices.AccountManagement.Principal FindByIdentityWithType(System.DirectoryServices.AccountManagement.PrincipalContext context, System.Type principalType, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue) { throw null; } + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] protected static System.DirectoryServices.AccountManagement.Principal FindByIdentityWithType(System.DirectoryServices.AccountManagement.PrincipalContext context, System.Type principalType, string identityValue) { throw null; } public System.DirectoryServices.AccountManagement.PrincipalSearchResult GetGroups() { throw null; } public System.DirectoryServices.AccountManagement.PrincipalSearchResult GetGroups(System.DirectoryServices.AccountManagement.PrincipalContext contextToQuery) { throw null; } diff --git a/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netcoreapp.cs b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netcoreapp.cs index 1514ee19e8c33..ca75837862797 100644 --- a/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netcoreapp.cs +++ b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netcoreapp.cs @@ -20,8 +20,10 @@ public void FillPie(System.Drawing.Brush brush, System.Drawing.RectangleF rect, [System.ObsoleteAttribute("Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations.", DiagnosticId = "SYSLIB0016", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public object GetContextInfo() { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetContextInfo(out PointF offset) { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetContextInfo(out PointF offset, out Region? clip) { throw null; } } } diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs index f38a92fb91178..b00cb16f937ac 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs @@ -540,13 +540,14 @@ public RectangleF VisibleClipBounds } [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete(Obsoletions.GetContextInfoMessage, DiagnosticId = Obsoletions.GetContextInfoDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [SupportedOSPlatform("windows")] public object GetContextInfo() { throw new NotImplementedException(); } -#if NETCOREAPP3_1_OR_GREATER +#if NETCOREAPP [EditorBrowsable(EditorBrowsableState.Never)] [SupportedOSPlatform("windows")] public void GetContextInfo(out PointF offset) diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Windows.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Windows.cs index 1aa55c9ab649c..afba2a3306ee3 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Windows.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Windows.cs @@ -642,7 +642,7 @@ public unsafe void EnumerateMetafile( /// WARNING: This method is for internal FX support only. /// [EditorBrowsable(EditorBrowsableState.Never)] -#if NETCOREAPP3_1_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.GetContextInfoMessage, DiagnosticId = Obsoletions.GetContextInfoDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [SupportedOSPlatform("windows")] @@ -723,7 +723,7 @@ private void GetContextInfo(out Matrix3x2 cumulativeTransform, bool calculateCli } } -#if NETCOREAPP3_1_OR_GREATER +#if NETCOREAPP /// /// Gets the cumulative offset. /// diff --git a/src/libraries/System.Drawing.Common/src/misc/GDI/WindowsGraphics.cs b/src/libraries/System.Drawing.Common/src/misc/GDI/WindowsGraphics.cs index 1322bd6e81d08..f034b5e67d89d 100644 --- a/src/libraries/System.Drawing.Common/src/misc/GDI/WindowsGraphics.cs +++ b/src/libraries/System.Drawing.Common/src/misc/GDI/WindowsGraphics.cs @@ -61,7 +61,7 @@ public static WindowsGraphics FromGraphics(Graphics g, ApplyGraphicsProperties p { Region? clip = null; -#if NETCOREAPP3_1_OR_GREATER +#if NETCOREAPP if (properties.HasFlag(ApplyGraphicsProperties.Clipping)) { g.GetContextInfo(out offset, out clip); diff --git a/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborConformanceLevel.cs b/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborConformanceLevel.cs index bc9111a112ba5..f03c4129e2486 100644 --- a/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborConformanceLevel.cs +++ b/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborConformanceLevel.cs @@ -207,7 +207,7 @@ public static bool RequireCanonicalSimpleValueEncodings(CborConformanceMode conf public static int GetKeyEncodingHashCode(ReadOnlySpan encoding) { HashCode hash = default; -#if NET6_0_OR_GREATER +#if NETCOREAPP hash.AddBytes(encoding); #else while (encoding.Length >= sizeof(int)) diff --git a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/NonCryptographicHashAlgorithm.cs b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/NonCryptographicHashAlgorithm.cs index 59c58059a946f..e1e00a803283a 100644 --- a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/NonCryptographicHashAlgorithm.cs +++ b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/NonCryptographicHashAlgorithm.cs @@ -137,7 +137,7 @@ private async Task AppendAsyncCore(Stream stream, CancellationToken cancellation while (true) { -#if NET5_0_OR_GREATER +#if NETCOREAPP int read = await stream.ReadAsync(buffer.AsMemory(), cancellationToken).ConfigureAwait(false); #else int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false); diff --git a/src/libraries/System.IO.Hashing/tests/NonCryptoHashTestDriver.cs b/src/libraries/System.IO.Hashing/tests/NonCryptoHashTestDriver.cs index 3cec2c0983621..0d4d9be1db455 100644 --- a/src/libraries/System.IO.Hashing/tests/NonCryptoHashTestDriver.cs +++ b/src/libraries/System.IO.Hashing/tests/NonCryptoHashTestDriver.cs @@ -324,7 +324,7 @@ internal void VerifyResponse(ReadOnlySpan response) internal static string ToHexString(ReadOnlySpan input) { -#if NET5_0_OR_GREATER +#if NETCOREAPP return Convert.ToHexString(input); #else var builder = new global::System.Text.StringBuilder(input.Length * 2); @@ -340,7 +340,7 @@ internal static string ToHexString(ReadOnlySpan input) internal static byte[] FromHexString(string hexString) { -#if NET5_0_OR_GREATER +#if NETCOREAPP return Convert.FromHexString(hexString); #else byte[] bytes = new byte[hexString.Length / 2]; diff --git a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Forwards.cs b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Forwards.cs deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs deleted file mode 100644 index ee58935c3f11a..0000000000000 --- a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the https://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - -namespace System.IO.Pipes -{ - // The following types are incomplete, meant only to be the target of type forwards - public enum PipeAccessRights { } - public sealed class PipeAccessRule { } - public sealed class PipeAuditRule { } - public static class PipesAclExtensions { } - public class PipeSecurity { } - -#if NET5_0_OR_GREATER - public static class AnonymousPipeServerStreamAcl { } - public static class NamedPipeServerStreamAcl { } -#endif -} \ No newline at end of file diff --git a/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.cs b/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.cs index 3407083dfed37..98bfd460ddb96 100644 --- a/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.cs +++ b/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.cs @@ -1213,6 +1213,7 @@ void System.Collections.IList.Remove(object? value) { } public T[] ToArray() { throw null; } public System.Collections.ObjectModel.ReadOnlyCollection ToReadOnlyCollection() { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RuleCache where T : class { internal RuleCache() { } diff --git a/src/libraries/System.Net.Http/ref/System.Net.Http.cs b/src/libraries/System.Net.Http/ref/System.Net.Http.cs index 0f63c2badb27b..a7710b0e5d35f 100644 --- a/src/libraries/System.Net.Http/ref/System.Net.Http.cs +++ b/src/libraries/System.Net.Http/ref/System.Net.Http.cs @@ -252,7 +252,7 @@ public HttpRequestMessage(System.Net.Http.HttpMethod method, System.Uri? request public System.Net.Http.HttpContent? Content { get { throw null; } set { } } public System.Net.Http.Headers.HttpRequestHeaders Headers { get { throw null; } } public System.Net.Http.HttpMethod Method { get { throw null; } set { } } - [Obsolete("HttpRequestMessage.Properties has been deprecated. Use Options instead.")] + [System.ObsoleteAttribute("HttpRequestMessage.Properties has been deprecated. Use Options instead.")] public System.Collections.Generic.IDictionary Properties { get { throw null; } } public HttpRequestOptions Options { get { throw null; } } public System.Uri? RequestUri { get { throw null; } set { } } diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListenerContext.Managed.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListenerContext.Managed.cs index c5cc376f02b0f..1edd250362c0b 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListenerContext.Managed.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListenerContext.Managed.cs @@ -91,7 +91,6 @@ public Task AcceptWebSocketAsync(string? subProtoc return HttpWebSocket.AcceptWebSocketAsyncCore(this, subProtocol, receiveBufferSize, keepAliveInterval); } - [EditorBrowsable(EditorBrowsableState.Never)] public Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment internalBuffer) { WebSocketValidate.ValidateArraySegment(internalBuffer, nameof(internalBuffer)); diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerContext.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerContext.Windows.cs index a253c75f0cd6e..f35ff98fc2e92 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerContext.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerContext.Windows.cs @@ -61,7 +61,6 @@ public Task AcceptWebSocketAsync(string? subProtoc internalBuffer); } - [EditorBrowsable(EditorBrowsableState.Never)] public Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs index 84482c14f7b56..bc0df09d18ac7 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs @@ -2,13 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Threading; +using System.ComponentModel; using System.Runtime.Versioning; +using System.Threading; namespace System.Net.NetworkInformation { public partial class NetworkChange { + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] + public NetworkChange() + { + } + [UnsupportedOSPlatform("illumos")] [UnsupportedOSPlatform("solaris")] public static event NetworkAddressChangedEventHandler? NetworkAddressChanged @@ -25,6 +32,7 @@ public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityC remove { throw new PlatformNotSupportedException(); } } + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] public static void RegisterNetworkChange(NetworkChange nc) { } } diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs index 0683434b9dffd..62be5501b88dd 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.ComponentModel; using System.Threading; namespace System.Net.NetworkInformation @@ -22,7 +23,14 @@ public partial class NetworkChange private static readonly ContextCallback s_runHandlerNotAvailable = new ContextCallback(RunAvailabilityHandlerNotAvailable!); private static readonly ContextCallback s_runAddressChangedHandler = new ContextCallback(RunAddressChangedHandler!); + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] + public NetworkChange() + { + } + // Introduced for supporting design-time loading of System.Windows.dll + [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] public static void RegisterNetworkChange(NetworkChange nc) { } diff --git a/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs b/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs index dfb7430357281..825698e157c17 100644 --- a/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs +++ b/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs @@ -51,11 +51,13 @@ public override void Abort() { } public override System.IAsyncResult BeginGetResponse(System.AsyncCallback? callback, object? state) { throw null; } public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; } public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")] protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override System.IO.Stream GetRequestStream() { throw null; } public override System.Threading.Tasks.Task GetRequestStreamAsync() { throw null; } public override System.Net.WebResponse GetResponse() { throw null; } public override System.Threading.Tasks.Task GetResponseAsync() { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")] void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable @@ -68,8 +70,10 @@ protected FileWebResponse(System.Runtime.Serialization.SerializationInfo seriali public override System.Uri ResponseUri { get { throw null; } } public override bool SupportsHeaders { get { throw null; } } public override void Close() { } + [System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")] protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override System.IO.Stream GetResponseStream() { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")] void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public enum FtpStatusCode @@ -173,7 +177,7 @@ public GlobalProxySelection() { } public delegate void HttpContinueDelegate(int StatusCode, System.Net.WebHeaderCollection httpHeaders); public partial class HttpWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable { - [System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected HttpWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public string? Accept { get { throw null; } set { } } public System.Uri Address { get { throw null; } } @@ -371,6 +375,7 @@ public virtual void Abort() { } public static System.Net.HttpWebRequest CreateHttp(System.Uri requestUri) { throw null; } public virtual System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; } public virtual System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for WebRequest.")] protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public virtual System.IO.Stream GetRequestStream() { throw null; } public virtual System.Threading.Tasks.Task GetRequestStreamAsync() { throw null; } @@ -378,6 +383,7 @@ protected virtual void GetObjectData(System.Runtime.Serialization.SerializationI public virtual System.Threading.Tasks.Task GetResponseAsync() { throw null; } public static System.Net.IWebProxy GetSystemWebProxy() { throw null; } public static bool RegisterPrefix(string prefix, System.Net.IWebRequestCreate creator) { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for WebRequest.")] void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public static partial class WebRequestMethods @@ -416,6 +422,7 @@ public static partial class Http public abstract partial class WebResponse : System.MarshalByRefObject, System.IDisposable, System.Runtime.Serialization.ISerializable { protected WebResponse() { } + [System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")] protected WebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public virtual long ContentLength { get { throw null; } set { } } public virtual string ContentType { get { throw null; } set { } } @@ -427,8 +434,10 @@ protected WebResponse(System.Runtime.Serialization.SerializationInfo serializati public virtual void Close() { } public void Dispose() { } protected virtual void Dispose(bool disposing) { } + [System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")] protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public virtual System.IO.Stream GetResponseStream() { throw null; } + [System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")] void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } } diff --git a/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs b/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs index c96739075619f..40c65dfe8c3c5 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs @@ -41,9 +41,11 @@ protected FileWebRequest(SerializationInfo serializationInfo, StreamingContext s throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for FileWebRequest.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) => GetObjectData(serializationInfo, streamingContext); + [Obsolete("Serialization has been deprecated for FileWebRequest.")] protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs b/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs index d02ef40fd17e6..1a2009c75f544 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs @@ -51,11 +51,13 @@ protected FileWebResponse(SerializationInfo serializationInfo, StreamingContext throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for FileWebResponse.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for FileWebResponse.")] protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs b/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs index 733646d4de206..9c140d9756930 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs @@ -174,11 +174,13 @@ protected HttpWebRequest(SerializationInfo serializationInfo, StreamingContext s throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for HttpWebRequest.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for HttpWebRequest.")] protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs b/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs index a8d1651502b7c..824cd2ba09d28 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs @@ -34,17 +34,19 @@ public HttpWebResponse() _cookies = null!; } - [ObsoleteAttribute("Serialization has been deprecated for HttpWebResponse.")] + [Obsolete("Serialization has been deprecated for HttpWebResponse.")] protected HttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for HttpWebResponse.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for HttpWebResponse.")] protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs b/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs index bd9df29bfaa25..46f1dad764929 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs @@ -42,11 +42,13 @@ protected WebRequest(SerializationInfo serializationInfo, StreamingContext strea throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for WebRequest.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for WebRequest.")] protected virtual void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/WebResponse.cs b/src/libraries/System.Net.Requests/src/System/Net/WebResponse.cs index b0cbbc498a7f7..8f43fabf1e566 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/WebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/WebResponse.cs @@ -23,16 +23,19 @@ protected WebResponse() { } + [Obsolete("Serialization has been deprecated for WebResponse.")] protected WebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for WebResponse.")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); } + [Obsolete("Serialization has been deprecated for WebResponse.")] protected virtual void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs b/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs index a7feb7b1366ae..1db05bfbae601 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs @@ -167,7 +167,7 @@ public bool IsEmpty /// Always thrown by this method. /// /// - [Obsolete("Equals() on ReadOnlySpan has will always throw an exception. Use the equality operator instead.")] + [Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use the equality operator instead.")] [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object? obj) => throw new NotSupportedException(SR.NotSupported_CannotCallEqualsOnSpan); diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs index 3aebc367086bc..b99dd7b3e2642 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs @@ -1,12 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Resources { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [EditorBrowsable(EditorBrowsableState.Never)] public class MissingManifestResourceException : SystemException { public MissingManifestResourceException() diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/NeutralResourcesLanguageAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/NeutralResourcesLanguageAttribute.cs index 134dc0a721e3b..bec4cdc06db09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/NeutralResourcesLanguageAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/NeutralResourcesLanguageAttribute.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Resources { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class NeutralResourcesLanguageAttribute : Attribute { public NeutralResourcesLanguageAttribute(string cultureName!!) diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/SatelliteContractVersionAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/SatelliteContractVersionAttribute.cs index d1b073405abaf..f68c2c317cd86 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/SatelliteContractVersionAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/SatelliteContractVersionAttribute.cs @@ -13,9 +13,12 @@ ** ===========================================================*/ +using System.ComponentModel; + namespace System.Resources { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class SatelliteContractVersionAttribute : Attribute { public SatelliteContractVersionAttribute(string version!!) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs index aa4e0454320c5..1e3ec2032f2b8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/BStrWrapper.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BSTR. + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class BStrWrapper { public BStrWrapper(string? value) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs index a23c62dac035a..fbf7b5e9683c5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs @@ -1,11 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Interface, Inherited = false)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class ComEventInterfaceAttribute : Attribute { private const DynamicallyAccessedMemberTypes EventProviderAccessedMemberTypes = diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs index 394aa67d4df58..7483b6209632f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs @@ -1,11 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Versioning; namespace System.Runtime.InteropServices { [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static class ComEventsHelper { public static void Combine(object rcw, Guid iid, int dispid, Delegate d) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs index 3ad4f74379c5e..286ee2422ea47 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class, Inherited = true)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class ComSourceInterfacesAttribute : Attribute { public ComSourceInterfacesAttribute(string sourceInterfaces) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IBindCtx.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IBindCtx.cs index a9d5af110d964..e63f494c48722 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IBindCtx.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IBindCtx.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential)] public struct BIND_OPTS { @@ -13,6 +16,7 @@ public struct BIND_OPTS } [Guid("0000000e-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IBindCtx diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs index 891a264b9929a..d1fff27d40e5b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B286-BAB4-101A-B69C-00AA00341D07")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IConnectionPoint diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs index 8bb6c52ed9dda..bb4a334762a47 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B284-BAB4-101A-B69C-00AA00341D07")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IConnectionPointContainer diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs index 203b61c155262..319a9db6b5676 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B285-BAB4-101A-B69C-00AA00341D07")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IEnumConnectionPoints diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs index 9148f974de172..f83e9e9a75402 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct CONNECTDATA { @@ -12,6 +15,7 @@ public struct CONNECTDATA } [Guid("B196B287-BAB4-101A-B69C-00AA00341D07")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IEnumConnections diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs index 3fc47a2197911..5a2964e510da7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00000102-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IEnumMoniker diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumString.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumString.cs index 7fc4314314378..20c47e1e96ce1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumString.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumString.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00000101-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IEnumString diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs index adc08c40f8a51..b095d1d730cd9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00020404-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IEnumVARIANT diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IMoniker.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IMoniker.cs index 22ed65f01f031..c60c49570b866 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IMoniker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IMoniker.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential)] public struct FILETIME { @@ -11,6 +14,7 @@ public struct FILETIME } [Guid("0000000f-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IMoniker diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IPersistFile.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IPersistFile.cs index 7c56b45a09514..73eee8da79ef3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IPersistFile.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IPersistFile.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("0000010b-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IPersistFile diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs index e43d9011ad56c..935d930354a55 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00000010-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IRunningObjectTable diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IStream.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IStream.cs index e799b94b0c0e4..365a4ca5795f4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IStream.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IStream.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct STATSTG { @@ -20,6 +23,7 @@ public struct STATSTG } [Guid("0000000c-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IStream diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeComp.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeComp.cs index 2f5769c0e851a..d4568567dd816 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeComp.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeComp.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public enum DESCKIND { DESCKIND_NONE = 0, @@ -13,6 +16,7 @@ public enum DESCKIND DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ + 1 } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)] public struct BINDPTR { @@ -25,6 +29,7 @@ public struct BINDPTR } [Guid("00020403-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface ITypeComp diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs index ca7ae80322285..51b541064d6ea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public enum TYPEKIND { TKIND_ENUM = 0, @@ -16,6 +19,7 @@ public enum TYPEKIND TKIND_MAX = TKIND_UNION + 1 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum TYPEFLAGS : short { @@ -36,6 +40,7 @@ public enum TYPEFLAGS : short TYPEFLAG_FPROXY = 0x4000 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum IMPLTYPEFLAGS { @@ -45,6 +50,7 @@ public enum IMPLTYPEFLAGS IMPLTYPEFLAG_FDEFAULTVTABLE = 0x8, } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct TYPEATTR { @@ -72,6 +78,7 @@ public struct TYPEATTR public IDLDESC idldescType; } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential)] public struct FUNCDESC { @@ -89,6 +96,7 @@ public struct FUNCDESC public short wFuncFlags; // WORD wFuncFlags; } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum IDLFLAG : short { @@ -99,6 +107,7 @@ public enum IDLFLAG : short IDLFLAG_FRETVAL = PARAMFLAG.PARAMFLAG_FRETVAL } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct IDLDESC { @@ -106,6 +115,7 @@ public struct IDLDESC public IDLFLAG wIDLFlags; } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum PARAMFLAG : short { @@ -119,6 +129,7 @@ public enum PARAMFLAG : short PARAMFLAG_FHASCUSTDATA = 0x40 } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct PARAMDESC { @@ -126,6 +137,7 @@ public struct PARAMDESC public PARAMFLAG wParamFlags; } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct TYPEDESC { @@ -133,6 +145,7 @@ public struct TYPEDESC public short vt; } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct ELEMDESC { @@ -149,6 +162,7 @@ public struct DESCUNION public DESCUNION desc; } + [EditorBrowsable(EditorBrowsableState.Never)] public enum VARKIND : int { VAR_PERINSTANCE = 0x0, @@ -157,8 +171,8 @@ public enum VARKIND : int VAR_DISPATCH = 0x3 } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct VARDESC { public int memid; @@ -180,6 +194,7 @@ public struct DESCUNION public VARKIND varkind; } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DISPPARAMS { @@ -189,6 +204,7 @@ public struct DISPPARAMS public int cNamedArgs; } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct EXCEPINFO { @@ -203,6 +219,7 @@ public struct EXCEPINFO public int scode; } + [EditorBrowsable(EditorBrowsableState.Never)] public enum FUNCKIND : int { FUNC_VIRTUAL = 0, @@ -212,6 +229,7 @@ public enum FUNCKIND : int FUNC_DISPATCH = 4 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum INVOKEKIND : int { @@ -221,6 +239,7 @@ public enum INVOKEKIND : int INVOKE_PROPERTYPUTREF = 0x8 } + [EditorBrowsable(EditorBrowsableState.Never)] public enum CALLCONV : int { CC_CDECL = 1, @@ -235,6 +254,7 @@ public enum CALLCONV : int CC_MAX = 9 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum FUNCFLAGS : short { @@ -253,6 +273,7 @@ public enum FUNCFLAGS : short FUNCFLAG_FIMMEDIATEBIND = 0x1000 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum VARFLAGS : short { @@ -272,6 +293,7 @@ public enum VARFLAGS : short } [Guid("00020401-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface ITypeInfo diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs index c809b580403ab..a3611e9085fb5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00020412-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface ITypeInfo2 : ITypeInfo diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib.cs index 472f096e028f6..539a9195e0942 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public enum SYSKIND { SYS_WIN16 = 0, @@ -11,6 +14,7 @@ public enum SYSKIND SYS_WIN64 = SYS_MAC + 1 } + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum LIBFLAGS : short { @@ -20,6 +24,7 @@ public enum LIBFLAGS : short LIBFLAG_FHASDISKIMAGE = 0x8 } + [EditorBrowsable(EditorBrowsableState.Never)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct TYPELIBATTR { @@ -32,6 +37,7 @@ public struct TYPELIBATTR } [Guid("00020402-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface ITypeLib diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs index bc83e1020a51c..da3dd8411a50a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { [Guid("00020411-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface ITypeLib2 : ITypeLib diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs index 33f81eb9c6ad2..978af3d649e9e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs @@ -1,9 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_CURRENCY. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("CurrencyWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")] public sealed class CurrencyWrapper { public CurrencyWrapper(decimal obj) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs index f29d16231af37..388e82db45be0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { + [EditorBrowsable(EditorBrowsableState.Never)] public enum CustomQueryInterfaceMode { Ignore = 0, diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs index d1edd75c4f947..753f441e42b13 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // The enum of the return value of IQuerable.GetInterface + [EditorBrowsable(EditorBrowsableState.Never)] public enum CustomQueryInterfaceResult { Handled = 0, diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs index 599830febf701..feb8ba7d65319 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/DispatchWrapper.cs @@ -1,12 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Versioning; namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_DISPATCH [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class DispatchWrapper { public DispatchWrapper(object? obj) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs index 862f3c9d7fed2..8040b7eb222d7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ErrorWrapper.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_ERROR. + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class ErrorWrapper { public ErrorWrapper(int errorCode) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs index 27e99a8f6aded..6aaf71985e7c3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomAdapter.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // This the base interface that custom adapters can chose to implement when they want to expose the underlying object. + [EditorBrowsable(EditorBrowsableState.Never)] public interface ICustomAdapter { [return: MarshalAs(UnmanagedType.IUnknown)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs index 974571ebf56f9..f6460fdc02d97 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // This the interface that be implemented by class that want to customize the behavior of QueryInterface. + [EditorBrowsable(EditorBrowsableState.Never)] public interface ICustomQueryInterface { CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs index 492a3620606a5..a4111396b053d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices.ComTypes; @@ -20,6 +21,7 @@ public static int GetHRForException(Exception? e) public static bool AreComObjectsAvailableForCleanup() => false; [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -43,6 +45,7 @@ public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) where T : not } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? CreateWrapperOfType(object? o, Type t) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -67,12 +70,14 @@ public static int FinalReleaseComObject(object o) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr GetComInterfaceForObject(object o, Type T) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -103,12 +108,14 @@ public static IntPtr GetIUnknownForObject(object o) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVariant) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); @@ -127,24 +134,28 @@ public static object GetObjectForIUnknown(IntPtr pUnk) } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object?[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static T[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs index c6dea8edb6267..870a1d426e0b3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; @@ -94,6 +95,7 @@ public static unsafe string PtrToStringUTF8(IntPtr ptr, int byteLen) } [RequiresDynamicCode("Marshalling code for the object might not be available. Use the SizeOf overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static int SizeOf(object structure!!) { return SizeOfHelper(structure.GetType(), throwIfNotMarshalable: true); @@ -105,6 +107,7 @@ public static int SizeOf(T structure!!) } [RequiresDynamicCode("Marshalling code for the object might not be available. Use the SizeOf overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static int SizeOf(Type t!!) { if (t is not RuntimeType) @@ -160,6 +163,7 @@ public static unsafe int Release(IntPtr pUnk) /// It must be used with EXTREME CAUTION since passing in invalid index or /// an array that is not pinned can cause unexpected results. /// + [EditorBrowsable(EditorBrowsableState.Never)] public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr!!, int index) { void* pRawData = Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(arr)); @@ -340,6 +344,8 @@ public static unsafe int ReadInt32(IntPtr ptr, int ofs) public static int ReadInt32(IntPtr ptr) => ReadInt32(ptr, 0); [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadIntPtr(Object, Int32) may be unavailable in future releases.")] public static IntPtr ReadIntPtr(object ptr, int ofs) { #if TARGET_64BIT @@ -427,6 +433,8 @@ public static unsafe void WriteInt16(IntPtr ptr, int ofs, short val) public static void WriteInt16(IntPtr ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val); [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt16(Object, Int32, Char) may be unavailable in future releases.")] public static void WriteInt16([In, Out]object ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val); public static void WriteInt16(IntPtr ptr, char val) => WriteInt16(ptr, 0, (short)val); @@ -465,6 +473,8 @@ public static void WriteIntPtr(IntPtr ptr, int ofs, IntPtr val) } [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [Obsolete("WriteIntPtr(Object, Int32, IntPtr) may be unavailable in future releases.")] public static void WriteIntPtr(object ptr, int ofs, IntPtr val) { #if TARGET_64BIT @@ -529,6 +539,7 @@ public static void StructureToPtr([DisallowNull] T structure, IntPtr ptr, boo /// native memory block to it. /// [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? PtrToStructure(IntPtr ptr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type structureType!!) @@ -556,6 +567,7 @@ public static void StructureToPtr([DisallowNull] T structure, IntPtr ptr, boo /// Marshals data from a native memory block to a preallocated structure class. /// [RequiresDynamicCode("Marshalling code for the object might not be available")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void PtrToStructure(IntPtr ptr, object structure) { PtrToStructureHelper(ptr, structure, allowValueClasses: false); @@ -1099,6 +1111,7 @@ public static Guid GenerateGuidForType(Type type!!) } [RequiresDynamicCode("Marshalling code for the delegate might not be available. Use the GetDelegateForFunctionPointer overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t!!) { ArgumentNullException.ThrowIfNull(ptr); @@ -1144,6 +1157,7 @@ public static TDelegate GetDelegateForFunctionPointer(IntPtr ptr) } [RequiresDynamicCode("Marshalling code for the delegate might not be available. Use the GetFunctionPointerForDelegate overload instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public static IntPtr GetFunctionPointerForDelegate(Delegate d!!) { return GetFunctionPointerForDelegateInternal(d); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs index cd80831454665..26bd5473804ba 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnknownWrapper.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_UNKNOWN. + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class UnknownWrapper { public UnknownWrapper(object? obj) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VarEnum.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VarEnum.cs index bc4bcd38e2c84..334b0f2699172 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VarEnum.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VarEnum.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { + [EditorBrowsable(EditorBrowsableState.Never)] public enum VarEnum { VT_EMPTY = 0, diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs index 5758946eacc76..96210a7dd4f30 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/VariantWrapper.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BYREF | VT_VARIANT. + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class VariantWrapper { public VariantWrapper(object? obj) diff --git a/src/libraries/System.Private.CoreLib/src/System/String.cs b/src/libraries/System.Private.CoreLib/src/System/String.cs index 624600bf39801..2183d5e59befe 100644 --- a/src/libraries/System.Private.CoreLib/src/System/String.cs +++ b/src/libraries/System.Private.CoreLib/src/System/String.cs @@ -4,6 +4,7 @@ using System.Buffers; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -364,6 +365,8 @@ public object Clone() return this; } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This API should not be used to create mutable strings. See https://go.microsoft.com/fwlink/?linkid=2084035 for alternatives.")] public static unsafe string Copy(string str!!) { string result = FastAllocateString(str.Length); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs index ad062d66024d5..df1e7a541fbec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs @@ -420,7 +420,7 @@ public void Abort(object? stateInfo) throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort); } - [Obsolete(Obsoletions.ThreadAbortMessage, DiagnosticId = Obsoletions.ThreadAbortDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [Obsolete(Obsoletions.ThreadResetAbortMessage, DiagnosticId = Obsoletions.ThreadAbortDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public static void ResetAbort() { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort); diff --git a/src/libraries/System.Private.Uri/src/System/Uri.cs b/src/libraries/System.Private.Uri/src/System/Uri.cs index abbd4e5ace695..84d74e9a43dc1 100644 --- a/src/libraries/System.Private.Uri/src/System/Uri.cs +++ b/src/libraries/System.Private.Uri/src/System/Uri.cs @@ -5153,7 +5153,7 @@ protected virtual void Escape() // UTF-8 sequences (e.g. %C4%D2 == 'Latin capital Ligature Ij') // /// - [Obsolete("Uri.Unescape has been deprecated. Use GetComponents() or static UnescapeDataString() to unescape a Uri component or a string.")] + [Obsolete("Uri.Unescape has been deprecated. Use GetComponents() or Uri.UnescapeDataString() to unescape a Uri component or a string.")] protected virtual string Unescape(string path) { // This method is dangerous since it gives path unescaping control diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs index b305f688fbd3f..f4f1595c758ee 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs @@ -174,7 +174,7 @@ public void Write(XmlWriter writer, XmlNamespaceManager? namespaceManager) serializer.Serialize(writer, this, ns); } - [Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation instead.")] + [Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")] public void Compile(ValidationEventHandler? validationEventHandler) { SchemaInfo sInfo = new SchemaInfo(); @@ -182,7 +182,7 @@ public void Compile(ValidationEventHandler? validationEventHandler) CompileSchema(null, null, sInfo, null, validationEventHandler, NameTable, false); } - [Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation instead.")] + [Obsolete("XmlSchema.Compile has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")] public void Compile(ValidationEventHandler? validationEventHandler, XmlResolver? resolver) { SchemaInfo sInfo = new SchemaInfo(); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/IXmlSerializable.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/IXmlSerializable.cs index afa8dfe5eaf92..bf007efb2d384 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/IXmlSerializable.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/IXmlSerializable.cs @@ -3,6 +3,7 @@ namespace System.Xml.Serialization { + using System.ComponentModel; using System.Xml; using System.Xml.Schema; @@ -12,6 +13,7 @@ namespace System.Xml.Serialization /// public interface IXmlSerializable { + [EditorBrowsable(EditorBrowsableState.Never)] XmlSchema? GetSchema(); void ReadXml(XmlReader reader); void WriteXml(XmlWriter writer); diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingModule.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingModule.cs index 0c34b67b4cf4e..d69e26494a779 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingModule.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingModule.cs @@ -25,7 +25,7 @@ public override Assembly Assembly internal const string UnknownStringMessageInRAF = "Returns for modules with no file path"; -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(UnknownStringMessageInRAF)] #endif public override string FullyQualifiedName @@ -48,7 +48,7 @@ public override Guid ModuleVersionId get { return UnderlyingModule.ModuleVersionId; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(UnknownStringMessageInRAF)] #endif public override string Name diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs index 6034180e54a1e..eac7148ec7843 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs @@ -17,7 +17,7 @@ internal abstract partial class RoAssembly public sealed override Module? GetModule(string name) => GetRoModule(name); public sealed override Module[] GetModules(bool getResourceModules) => ComputeRoModules(getResourceModules).CloneArray(); -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(ThrowingMessageInRAF)] #endif public sealed override FileStream? GetFile(string name) @@ -28,7 +28,7 @@ internal abstract partial class RoAssembly return new FileStream(m.FullyQualifiedName, FileMode.Open, FileAccess.Read, FileShare.Read); } -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(ThrowingMessageInRAF)] #endif public sealed override FileStream[] GetFiles(bool getResourceModules) diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.cs index 57fd648bbe12d..28d2ebc00feb6 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.cs @@ -44,12 +44,12 @@ protected RoAssembly(MetadataLoadContext loader, int assemblyFileCount) // Location and codebase public abstract override string Location { get; } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresAssemblyFiles(ThrowingMessageInRAF)] #endif public sealed override string CodeBase => throw new NotSupportedException(SR.NotSupported_AssemblyCodeBase); -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresAssemblyFiles(ThrowingMessageInRAF)] #endif @@ -153,7 +153,7 @@ public sealed override AssemblyName[] GetReferencedAssemblies() // Miscellaneous properties public sealed override bool ReflectionOnly => true; -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete("The Global Assembly Cache is not supported.", DiagnosticId = "SYSLIB0005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed override bool GlobalAssemblyCache => false; diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/RoModule.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/RoModule.cs index 4ddd4427edbb1..c932b87e373dd 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/RoModule.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/RoModule.cs @@ -33,7 +33,7 @@ internal RoModule(string fullyQualifiedName) internal const string UnknownStringMessageInRAF = "Returns for modules with no file path"; -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(UnknownStringMessageInRAF)] #endif public sealed override string FullyQualifiedName => _fullyQualifiedName; @@ -41,7 +41,7 @@ internal RoModule(string fullyQualifiedName) public abstract override int MetadataToken { get; } public abstract override Guid ModuleVersionId { get; } -#if NET5_0_OR_GREATER +#if NETCOREAPP [RequiresAssemblyFiles(UnknownStringMessageInRAF)] #endif public sealed override string Name diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/CachingSectionGroup.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/CachingSectionGroup.cs index 02f8559b06f9e..327dd53ba4073 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/CachingSectionGroup.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/CachingSectionGroup.cs @@ -7,7 +7,7 @@ namespace System.Runtime.Caching.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatform("browser")] #endif internal sealed class CachingSectionGroup : ConfigurationSectionGroup diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheElement.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheElement.cs index cf798f20416bf..9fcfd59126aa4 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheElement.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheElement.cs @@ -8,7 +8,7 @@ namespace System.Runtime.Caching.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatform("browser")] #endif internal sealed class MemoryCacheElement : ConfigurationElement diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSection.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSection.cs index df535cd6bc4a8..05e0387374ec8 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSection.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSection.cs @@ -21,7 +21,7 @@ namespace System.Runtime.Caching.Configuration */ -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatform("browser")] #endif internal sealed class MemoryCacheSection : ConfigurationSection diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSettingsCollection.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSettingsCollection.cs index 8c08a0bfcda7e..e3c1a5bd3eb1d 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSettingsCollection.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/MemoryCacheSettingsCollection.cs @@ -7,7 +7,7 @@ namespace System.Runtime.Caching.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatform("browser")] #endif [ConfigurationCollection(typeof(MemoryCacheElement), diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs index 3bfa7ec6bda68..a5ec31c515963 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs @@ -11,7 +11,7 @@ namespace System.Runtime.Caching { -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatform("browser")] [UnsupportedOSPlatform("ios")] [UnsupportedOSPlatform("tvos")] diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs index 997477657ae02..32ea27babe1fe 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs @@ -97,7 +97,7 @@ private static void InitFCN() } if (fcn == null) { -#if NET5_0_OR_GREATER +#if NETCOREAPP if (OperatingSystem.IsBrowser() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS()) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs index 8515bbe795437..225bbef0e6c69 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs @@ -40,7 +40,7 @@ public class MemoryCache : ObjectCache, IEnumerable, IDisposable private bool _throwOnDisposed; private EventHandler _onAppDomainUnload; private UnhandledExceptionEventHandler _onUnhandledException; -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatformGuard("browser")] private static bool _countersSupported => !OperatingSystem.IsBrowser(); #else diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs index e44f4792206ae..c6302aba8954d 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs @@ -37,7 +37,7 @@ internal sealed class MemoryCacheStatistics : IDisposable private CacheMemoryMonitor _cacheMemoryMonitor; private readonly MemoryCache _memoryCache; private readonly PhysicalMemoryMonitor _physicalMemoryMonitor; -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatformGuard("browser")] private static bool _configSupported => !OperatingSystem.IsBrowser(); #else diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs index 047bc8fd80e4f..27fde8ab2826f 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs @@ -26,7 +26,7 @@ internal sealed class MemoryCacheStore : IDisposable private volatile bool _useInsertBlock; private readonly MemoryCache _cache; private readonly Counters _perfCounters; -#if NET5_0_OR_GREATER +#if NETCOREAPP [UnsupportedOSPlatformGuard("browser")] private static bool _countersSupported => !OperatingSystem.IsBrowser(); #else diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs index 56e40befcb1d8..50fbb3bb523e6 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.Versioning; @@ -12,6 +13,7 @@ namespace System.Runtime.InteropServices { + [EditorBrowsable(EditorBrowsableState.Never)] public class ComAwareEventInfo : EventInfo { private readonly EventInfo _innerEventInfo; diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs index 12cf6f17549ce..f8a44d0a9e86b 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { /// @@ -8,6 +10,7 @@ namespace System.Runtime.InteropServices.ComTypes /// the Platform SDK documentation as of 07/21/2003. /// https://docs.microsoft.com/en-us/windows/desktop/api/objidl/ne-objidl-tagadvf. /// + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum ADVF { diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DATADIR.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DATADIR.cs index 3b1108ccf9fd0..0bccff73c1702 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DATADIR.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DATADIR.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public enum DATADIR { DATADIR_GET = 1, diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DVASPECT.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DVASPECT.cs index 3f0e502832d30..0fd0d6c2de4a2 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DVASPECT.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/DVASPECT.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum DVASPECT { diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/FORMATETC.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/FORMATETC.cs index a02b3b781baa8..10a8b4ab3ca77 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/FORMATETC.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/FORMATETC.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public struct FORMATETC { [MarshalAs(UnmanagedType.U2)] diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IAdviseSink.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IAdviseSink.cs index 779af3bc502e0..ebbf659cf7170 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IAdviseSink.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IAdviseSink.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { /// @@ -14,6 +16,7 @@ namespace System.Runtime.InteropServices.ComTypes /// [ComImport] [Guid("0000010F-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] public interface IAdviseSink { diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IEnumFormatETC.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IEnumFormatETC.cs index 507950af9831a..1193b7a1a8a63 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IEnumFormatETC.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IEnumFormatETC.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { /// @@ -10,6 +12,7 @@ namespace System.Runtime.InteropServices.ComTypes /// [ComImport] [Guid("00000103-0000-0000-C000-000000000046")] + [EditorBrowsable(EditorBrowsableState.Never)] [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] public interface IEnumFORMATETC { diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STATDATA.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STATDATA.cs index 5276dbb26bacf..56bd1523205e7 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STATDATA.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STATDATA.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public struct STATDATA { public FORMATETC formatetc; diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs index a625adc8236c0..d4c1ad5fc75ce 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] public struct STGMEDIUM { public TYMED tymed; diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/TYMED.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/TYMED.cs index 4c0252d6415ad..7b5d9686daab7 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/TYMED.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/TYMED.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Runtime.InteropServices.ComTypes { + [EditorBrowsable(EditorBrowsableState.Never)] [Flags] public enum TYMED { diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 65290c20d56f8..14b94ebd0629e 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -189,7 +189,7 @@ public void ClearShadowCopyPath() { } public int ExecuteAssemblyByName(string assemblyName) { throw null; } public int ExecuteAssemblyByName(string assemblyName, params string?[]? args) { throw null; } public System.Reflection.Assembly[] GetAssemblies() { throw null; } - [System.ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.")] + [System.ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread instead.")] public static int GetCurrentThreadId() { throw null; } public object? GetData(string name) { throw null; } public bool? IsCompatibilitySwitchSet(string value) { throw null; } @@ -7773,9 +7773,9 @@ protected virtual void CheckSecurity() { } [System.ObsoleteAttribute("Uri.Escape has been deprecated and is not supported.")] protected virtual void Escape() { } public static string EscapeDataString(string stringToEscape) { throw null; } - [System.ObsoleteAttribute("Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.")] + [System.ObsoleteAttribute("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")] protected static string EscapeString(string? str) { throw null; } - [System.ObsoleteAttribute("Uri.EscapeUriString can corrupt the Uri string in some cases. Consider using Uri.EscapeDataString for query string components.", DiagnosticId = "SYSLIB0013", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Uri.EscapeUriString can corrupt the Uri string in some cases. Consider using Uri.EscapeDataString for query string components instead.", DiagnosticId = "SYSLIB0013", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static string EscapeUriString(string stringToEscape) { throw null; } public static int FromHex(char digit) { throw null; } public string GetComponents(System.UriComponents components, System.UriFormat format) { throw null; } @@ -7795,7 +7795,7 @@ protected void GetObjectData(System.Runtime.Serialization.SerializationInfo seri protected virtual bool IsReservedCharacter(char character) { throw null; } public bool IsWellFormedOriginalString() { throw null; } public static bool IsWellFormedUriString([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? uriString, System.UriKind uriKind) { throw null; } - [System.ObsoleteAttribute("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri).")] + [System.ObsoleteAttribute("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.")] public string MakeRelative(System.Uri toUri) { throw null; } public System.Uri MakeRelativeUri(System.Uri uri) { throw null; } public static bool operator ==(System.Uri? uri1, System.Uri? uri2) { throw null; } @@ -8371,7 +8371,7 @@ public Hashtable(System.Collections.IDictionary d, float loadFactor, System.Coll [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(IDictionary, float, IEqualityComparer) instead.")] public Hashtable(System.Collections.IDictionary d, float loadFactor, System.Collections.IHashCodeProvider? hcp, System.Collections.IComparer? comparer) { } public Hashtable(System.Collections.IEqualityComparer? equalityComparer) { } - [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(IEqualityComparer).")] + [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(IEqualityComparer) instead.")] public Hashtable(System.Collections.IHashCodeProvider? hcp, System.Collections.IComparer? comparer) { } public Hashtable(int capacity) { } public Hashtable(int capacity, System.Collections.IEqualityComparer? equalityComparer) { } @@ -10828,7 +10828,7 @@ public virtual void CopyTo(System.IO.Stream destination, int bufferSize) { } public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize) { throw null; } public virtual System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) { throw null; } public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ObsoleteAttribute("Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")] + [System.ObsoleteAttribute("CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")] protected virtual System.Threading.WaitHandle CreateWaitHandle() { throw null; } public void Dispose() { } protected virtual void Dispose(bool disposing) { } @@ -12583,7 +12583,6 @@ public NeutralResourcesLanguageAttribute(string cultureName, System.Resources.Ul public string CultureName { get { throw null; } } public System.Resources.UltimateResourceFallbackLocation Location { get { throw null; } } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class ResourceManager { public static readonly int HeaderVersionNumber; @@ -14239,7 +14238,7 @@ public sealed partial class SecurityTransparentAttribute : System.Attribute public SecurityTransparentAttribute() { } } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)] - [System.ObsoleteAttribute("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use SecuritySafeCriticalAttribute instead.")] + [System.ObsoleteAttribute("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use the SecuritySafeCriticalAttribute instead.")] public sealed partial class SecurityTreatAsSafeAttribute : System.Attribute { public SecurityTreatAsSafeAttribute() { } @@ -14829,6 +14828,7 @@ public void CopyTo(int sourceIndex, System.Span destination, int count) { void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } public string ToString(int startIndex, int length) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute] public partial struct AppendInterpolatedStringHandler { @@ -14852,6 +14852,7 @@ public partial struct ChunkEnumerator private object _dummy; private int _dummyPrimitive; public System.ReadOnlyMemory Current { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Text.StringBuilder.ChunkEnumerator GetEnumerator() { throw null; } public bool MoveNext() { throw null; } } diff --git a/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs b/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs index bc0a0ab55af9d..6c17e4ac08404 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs @@ -83,7 +83,7 @@ public void Reset() { } public sealed partial class CmsSigner { public CmsSigner() { } -#if NET6_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.", DiagnosticId = "SYSLIB0034", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -270,7 +270,7 @@ internal SignerInfo() { } public void CheckHash() { } public void CheckSignature(bool verifySignatureOnly) { } public void CheckSignature(System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraStore, bool verifySignatureOnly) { } -#if NET6_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner.", DiagnosticId = "SYSLIB0035", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs index 8b9a401a81b36..f636bcd998232 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Formats.Asn1; using System.Security.Cryptography.Asn1; @@ -72,9 +73,10 @@ public CmsSigner(X509Certificate2? certificate) { } -#if NET6_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CmsSignerCspParamsCtorMessage, DiagnosticId = Obsoletions.CmsSignerCspParamsCtorDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif + [EditorBrowsable(EditorBrowsableState.Never)] public CmsSigner(CspParameters parameters) => throw new PlatformNotSupportedException(); public CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2? certificate) : this(signerIdentifierType, certificate, null) diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs index b5dc24bf3f20d..1aa378e114048 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs @@ -3,6 +3,7 @@ using System.Buffers; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Formats.Asn1; using System.Linq; @@ -90,7 +91,7 @@ public X509Certificate2Collection Certificates if (choice.Certificate.HasValue) { coll.Add(new X509Certificate2(choice.Certificate.Value -#if NET5_0_OR_GREATER +#if NETCOREAPP .Span #else .ToArray() @@ -289,6 +290,7 @@ internal static ReadOnlyMemory GetContent( return wrappedContent; } + [EditorBrowsable(EditorBrowsableState.Never)] public void ComputeSignature() => ComputeSignature(new CmsSigner(_signerIdentifierType), true); public void ComputeSignature(CmsSigner signer) => ComputeSignature(signer, true); diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs index d216044736fa7..144a6e8e554f2 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Formats.Asn1; using System.Linq; @@ -291,9 +292,10 @@ private SignerInfoCollection GetCounterSigners(AttributeAsn[] unsignedAttrs) return new SignerInfoCollection(signerInfos.ToArray()); } -#if NET6_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.SignerInfoCounterSigMessage, DiagnosticId = Obsoletions.SignerInfoCounterSigDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif + [EditorBrowsable(EditorBrowsableState.Never)] public void ComputeCounterSignature() { throw new PlatformNotSupportedException(SR.Cryptography_Cms_NoSignerCert); diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs index e07748b754ef9..ab98152e3398d 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs @@ -205,7 +205,7 @@ protected AsymmetricAlgorithm() { } public virtual System.Security.Cryptography.KeySizes[] LegalKeySizes { get { throw null; } } public virtual string? SignatureAlgorithm { get { throw null; } } public void Clear() { } - [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static System.Security.Cryptography.AsymmetricAlgorithm Create() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] public static System.Security.Cryptography.AsymmetricAlgorithm? Create(string algName) { throw null; } @@ -1262,7 +1262,7 @@ public void Clear() { } public byte[] ComputeHash(byte[] buffer, int offset, int count) { throw null; } public byte[] ComputeHash(System.IO.Stream inputStream) { throw null; } public System.Threading.Tasks.Task ComputeHashAsync(System.IO.Stream inputStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static System.Security.Cryptography.HashAlgorithm Create() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] public static System.Security.Cryptography.HashAlgorithm? Create(string hashName) { throw null; } @@ -1313,7 +1313,7 @@ protected HMAC() { } protected int BlockSizeValue { get { throw null; } set { } } public string HashName { get { throw null; } set { } } public override byte[] Key { get { throw null; } set { } } - [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static new System.Security.Cryptography.HMAC Create() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] public static new System.Security.Cryptography.HMAC? Create(string algorithmName) { throw null; } @@ -1497,7 +1497,7 @@ public abstract partial class KeyedHashAlgorithm : System.Security.Cryptography. protected byte[] KeyValue; protected KeyedHashAlgorithm() { } public virtual byte[] Key { get { throw null; } set { } } - [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static new System.Security.Cryptography.KeyedHashAlgorithm Create() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] public static new System.Security.Cryptography.KeyedHashAlgorithm? Create(string algName) { throw null; } @@ -1626,6 +1626,7 @@ public PasswordDeriveBytes(string strPassword, byte[]? rgbSalt, string strHashNa [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] public byte[] CryptDeriveKey(string? algname, string? alghashname, int keySize, byte[] rgbIV) { throw null; } protected override void Dispose(bool disposing) { } + [System.Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")] public override byte[] GetBytes(int cb) { throw null; } public override void Reset() { } } @@ -2292,7 +2293,7 @@ protected SymmetricAlgorithm() { } public virtual System.Security.Cryptography.CipherMode Mode { get { throw null; } set { } } public virtual System.Security.Cryptography.PaddingMode Padding { get { throw null; } set { } } public void Clear() { } - [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static System.Security.Cryptography.SymmetricAlgorithm Create() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] public static System.Security.Cryptography.SymmetricAlgorithm? Create(string algName) { throw null; } diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj index 27dbb3a844b32..3020364482b9e 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj @@ -3,6 +3,8 @@ $(NetCoreAppCurrent) enable $(NoWarn);SYSLIB0026 + + $(NoWarn);CS0809 diff --git a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj index 2178be6940e76..2f68524baffb3 100644 --- a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj +++ b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj @@ -4,6 +4,8 @@ $(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent) $(NoWarn);CA5350;CA5351;CA5379;CA5384;SYSLIB0026 + + $(NoWarn);CS0809 enable diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs index 4fc7781d189b5..1c5dcb868862e 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs @@ -1,11 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.Versioning; namespace System.Security.Cryptography { + [Obsolete(Obsoletions.DerivedCryptographicTypesMessage, DiagnosticId = Obsoletions.DerivedCryptographicTypesDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed partial class RC2CryptoServiceProvider : RC2 { [SuppressMessage("Microsoft.Security", "CA5351", Justification = "This is the implementation of RC2CryptoServiceProvider")] diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Unix.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Unix.cs index 72e06ca794655..4824979408459 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Unix.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Unix.cs @@ -1,10 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Versioning; namespace System.Security.Cryptography { + [Obsolete(Obsoletions.DerivedCryptographicTypesMessage, DiagnosticId = Obsoletions.DerivedCryptographicTypesDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed partial class RC2CryptoServiceProvider : RC2 { private readonly RC2 _impl; diff --git a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs index c8bd1151a0cb4..ffc73f82cccaa 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -17,7 +17,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } namespace System.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class ConfigurationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -31,7 +31,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)] @@ -43,7 +43,7 @@ public ConfigurationPermissionAttribute(System.Security.Permissions.SecurityActi } namespace System.Data.Common { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public abstract partial class DBDataPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -65,7 +65,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -84,7 +84,7 @@ protected DBDataPermissionAttribute(System.Security.Permissions.SecurityAction a } namespace System.Data.Odbc { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class OdbcPermission : System.Data.Common.DBDataPermission @@ -95,7 +95,7 @@ public OdbcPermission(System.Security.Permissions.PermissionState state, bool al public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) { } public override System.Security.IPermission Copy() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -107,7 +107,7 @@ public OdbcPermissionAttribute(System.Security.Permissions.SecurityAction action } namespace System.Data.OleDb { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class OleDbPermission : System.Data.Common.DBDataPermission @@ -120,7 +120,7 @@ public OleDbPermission(System.Security.Permissions.PermissionState state, bool a public string Provider { get { throw null; } set { } } public override System.Security.IPermission Copy() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -135,7 +135,7 @@ public OleDbPermissionAttribute(System.Security.Permissions.SecurityAction actio } namespace System.Data.OracleClient { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class OraclePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -151,7 +151,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -171,7 +171,7 @@ public OraclePermissionAttribute(System.Security.Permissions.SecurityAction acti } namespace System.Data.SqlClient { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SqlClientPermission : System.Data.Common.DBDataPermission @@ -182,7 +182,7 @@ public SqlClientPermission(System.Security.Permissions.PermissionState state, bo public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) { } public override System.Security.IPermission Copy() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -194,7 +194,7 @@ public SqlClientPermissionAttribute(System.Security.Permissions.SecurityAction a } namespace System.Diagnostics { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class EventLogPermission : System.Security.Permissions.ResourcePermissionBase @@ -215,7 +215,7 @@ public enum EventLogPermissionAccess Write = 16, Administer = 48, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -249,7 +249,7 @@ protected override void OnRemove(int index, object value) { } protected override void OnSet(int index, object oldValue, object newValue) { } public void Remove(System.Diagnostics.EventLogPermissionEntry value) { } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PerformanceCounterPermission : System.Security.Permissions.ResourcePermissionBase @@ -270,7 +270,7 @@ public enum PerformanceCounterPermissionAccess Instrument = 3, Administer = 7, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -309,7 +309,7 @@ public void Remove(System.Diagnostics.PerformanceCounterPermissionEntry value) { } namespace System.Drawing.Printing { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PrintingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -325,7 +325,7 @@ public override void FromXml(System.Security.SecurityElement element) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true)] @@ -345,7 +345,7 @@ public enum PrintingPermissionLevel } namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class DnsPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -359,7 +359,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -383,7 +383,7 @@ public enum NetworkAccess Connect = 64, Accept = 128, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -402,7 +402,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -423,7 +423,7 @@ public enum TransportType Tcp = 2, All = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -444,7 +444,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -466,7 +466,7 @@ public enum SmtpAccess Connect = 1, ConnectToUnrestrictedPort = 2, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SmtpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -484,7 +484,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -504,7 +504,7 @@ public enum NetworkInformationAccess Read = 1, Ping = 4, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class NetworkInformationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -521,7 +521,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -534,7 +534,7 @@ public NetworkInformationPermissionAttribute(System.Security.Permissions.Securit } namespace System.Net.PeerToPeer { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PnrpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -548,7 +548,7 @@ public override void FromXml(System.Security.SecurityElement e) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -567,7 +567,7 @@ public enum PnrpScope } namespace System.Net.PeerToPeer.Collaboration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PeerCollaborationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -581,7 +581,7 @@ public override void FromXml(System.Security.SecurityElement e) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -593,7 +593,7 @@ public PeerCollaborationPermissionAttribute(System.Security.Permissions.Security } namespace System.Security { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public abstract partial class CodeAccessPermission : System.Security.IPermission, System.Security.ISecurityEncodable, System.Security.IStackWalk @@ -619,7 +619,7 @@ public static void RevertPermitOnly() { } public abstract System.Security.SecurityElement ToXml(); public virtual System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public partial class HostProtectionException : System.SystemException @@ -677,7 +677,7 @@ public partial interface IStackWalk void PermitOnly(); } #endif -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class NamedPermissionSet : System.Security.PermissionSet @@ -745,7 +745,7 @@ public enum PolicyLevelType Enterprise = 2, AppDomain = 3, } -#if NET6_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SecurityContext : System.IDisposable @@ -766,7 +766,7 @@ public enum SecurityContextSource CurrentAppDomain = 0, CurrentAssembly = 1, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public static partial class SecurityManager @@ -827,7 +827,7 @@ public XmlSyntaxException(string message, System.Exception inner) { } } namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class DataProtectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -843,7 +843,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -857,7 +857,7 @@ public DataProtectionPermissionAttribute(System.Security.Permissions.SecurityAct public bool UnprotectMemory { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -870,7 +870,7 @@ public enum DataProtectionPermissionFlags UnprotectMemory = 8, AllFlags = 15, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class EnvironmentPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -888,7 +888,7 @@ public void SetPathList(System.Security.Permissions.EnvironmentPermissionAccess public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -899,7 +899,7 @@ public enum EnvironmentPermissionAccess Write = 2, AllAccess = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -911,7 +911,7 @@ public EnvironmentPermissionAttribute(System.Security.Permissions.SecurityAction public string Write { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class FileDialogPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -927,7 +927,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -938,7 +938,7 @@ public enum FileDialogPermissionAccess Save = 2, OpenSave = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -949,7 +949,7 @@ public FileDialogPermissionAttribute(System.Security.Permissions.SecurityAction public bool Save { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class FileIOPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -976,7 +976,7 @@ public void SetPathList(System.Security.Permissions.FileIOPermissionAccess acces public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -989,7 +989,7 @@ public enum FileIOPermissionAccess PathDiscovery = 8, AllAccess = 15, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1009,7 +1009,7 @@ public FileIOPermissionAttribute(System.Security.Permissions.SecurityAction acti public string Write { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class GacIdentityPermission : System.Security.CodeAccessPermission @@ -1023,7 +1023,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1032,7 +1032,7 @@ public sealed partial class GacIdentityPermissionAttribute : System.Security.Per public GacIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1052,7 +1052,7 @@ public HostProtectionAttribute(System.Security.Permissions.SecurityAction action public bool UI { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -1070,7 +1070,7 @@ public enum HostProtectionResource MayLeakOnAbort = 256, All = 511, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum IsolatedStorageContainment @@ -1088,7 +1088,7 @@ public enum IsolatedStorageContainment AdministerIsolatedStorageByUser = 112, UnrestrictedIsolatedStorage = 240, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission @@ -1100,7 +1100,7 @@ public IsolatedStorageFilePermission(System.Security.Permissions.PermissionState public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1109,7 +1109,7 @@ public sealed partial class IsolatedStorageFilePermissionAttribute : System.Secu public IsolatedStorageFilePermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public abstract partial class IsolatedStoragePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1121,7 +1121,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public bool IsUnrestricted() { throw null; } public override System.Security.SecurityElement ToXml() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public abstract partial class IsolatedStoragePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -1130,14 +1130,14 @@ protected IsolatedStoragePermissionAttribute(System.Security.Permissions.Securit public System.Security.Permissions.IsolatedStorageContainment UsageAllowed { get { throw null; } set { } } public long UserQuota { get { throw null; } set { } } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public partial interface IUnrestrictedPermission { bool IsUnrestricted(); } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class KeyContainerPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1155,7 +1155,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class KeyContainerPermissionAccessEntry @@ -1172,7 +1172,7 @@ public KeyContainerPermissionAccessEntry(string keyStore, string providerName, i public override bool Equals(object o) { throw null; } public override int GetHashCode() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class KeyContainerPermissionAccessEntryCollection : System.Collections.ICollection, System.Collections.IEnumerable @@ -1191,7 +1191,7 @@ public void CopyTo(System.Security.Permissions.KeyContainerPermissionAccessEntry public void Remove(System.Security.Permissions.KeyContainerPermissionAccessEntry accessEntry) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class KeyContainerPermissionAccessEntryEnumerator : System.Collections.IEnumerator @@ -1202,7 +1202,7 @@ public KeyContainerPermissionAccessEntryEnumerator() { } public bool MoveNext() { throw null; } public void Reset() { } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1217,7 +1217,7 @@ public KeyContainerPermissionAttribute(System.Security.Permissions.SecurityActio public int ProviderType { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum KeyContainerPermissionFlags @@ -1234,7 +1234,7 @@ public enum KeyContainerPermissionFlags ChangeAcl = 8192, AllFlags = 13111, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class MediaPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1256,7 +1256,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1268,7 +1268,7 @@ public MediaPermissionAttribute(System.Security.Permissions.SecurityAction actio public System.Security.Permissions.MediaPermissionVideo Video { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum MediaPermissionAudio @@ -1278,7 +1278,7 @@ public enum MediaPermissionAudio SafeAudio = 2, AllAudio = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum MediaPermissionImage @@ -1288,7 +1288,7 @@ public enum MediaPermissionImage SafeImage = 2, AllImage = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum MediaPermissionVideo @@ -1298,7 +1298,7 @@ public enum MediaPermissionVideo SafeVideo = 2, AllVideo = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1320,7 +1320,7 @@ public enum PermissionState Unrestricted = 1, } #endif -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PrincipalPermission : System.Security.IPermission, System.Security.ISecurityEncodable, System.Security.Permissions.IUnrestrictedPermission @@ -1340,13 +1340,13 @@ public void FromXml(System.Security.SecurityElement elem) { } public System.Security.SecurityElement ToXml() { throw null; } public System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)] public sealed partial class PrincipalPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("PrincipalPermissionAttribute is not honored by the runtime and must not be used.", true, DiagnosticId = "SYSLIB0002", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public PrincipalPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { } @@ -1355,7 +1355,7 @@ public PrincipalPermissionAttribute(System.Security.Permissions.SecurityAction a public string Role { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class PublisherIdentityPermission : System.Security.CodeAccessPermission @@ -1370,7 +1370,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1382,7 +1382,7 @@ public PublisherIdentityPermissionAttribute(System.Security.Permissions.Security public string X509Certificate { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class ReflectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1398,7 +1398,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1414,7 +1414,7 @@ public ReflectionPermissionAttribute(System.Security.Permissions.SecurityAction public bool TypeInformation { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -1430,7 +1430,7 @@ public enum ReflectionPermissionFlag AllFlags = 7, RestrictedMemberAccess = 8, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class RegistryPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1450,7 +1450,7 @@ public void SetPathList(System.Security.Permissions.RegistryPermissionAccess acc public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -1462,7 +1462,7 @@ public enum RegistryPermissionAccess Create = 4, AllAccess = 7, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1479,7 +1479,7 @@ public RegistryPermissionAttribute(System.Security.Permissions.SecurityAction ac public string Write { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public abstract partial class ResourcePermissionBase : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1502,7 +1502,7 @@ protected void RemovePermissionAccess(System.Security.Permissions.ResourcePermis public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public partial class ResourcePermissionBaseEntry @@ -1512,7 +1512,7 @@ public ResourcePermissionBaseEntry(int permissionAccess, string[] permissionAcce public int PermissionAccess { get { throw null; } } public string[] PermissionAccessPath { get { throw null; } } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SecurityPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1528,7 +1528,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class SiteIdentityPermission : System.Security.CodeAccessPermission @@ -1543,7 +1543,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1553,7 +1553,7 @@ public SiteIdentityPermissionAttribute(System.Security.Permissions.SecurityActio public string Site { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class StorePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1569,7 +1569,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1586,7 +1586,7 @@ public StorePermissionAttribute(System.Security.Permissions.SecurityAction actio public bool RemoveFromStore { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -1602,7 +1602,7 @@ public enum StorePermissionFlags EnumerateCertificates = 128, AllFlags = 247, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class StrongNameIdentityPermission : System.Security.CodeAccessPermission @@ -1619,7 +1619,7 @@ public override void FromXml(System.Security.SecurityElement e) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1631,7 +1631,7 @@ public StrongNameIdentityPermissionAttribute(System.Security.Permissions.Securit public string Version { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class StrongNamePublicKeyBlob @@ -1641,7 +1641,7 @@ public StrongNamePublicKeyBlob(byte[] publicKey) { } public override int GetHashCode() { throw null; } public override string ToString() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class TypeDescriptorPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1657,7 +1657,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1668,7 +1668,7 @@ public TypeDescriptorPermissionAttribute(System.Security.Permissions.SecurityAct public bool RestrictedRegistrationAccess { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.FlagsAttribute] @@ -1677,7 +1677,7 @@ public enum TypeDescriptorPermissionFlags NoFlags = 0, RestrictedRegistrationAccess = 1, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class UIPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1696,7 +1696,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1707,7 +1707,7 @@ public UIPermissionAttribute(System.Security.Permissions.SecurityAction action) public System.Security.Permissions.UIPermissionWindow Window { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum UIPermissionClipboard @@ -1716,7 +1716,7 @@ public enum UIPermissionClipboard OwnClipboard = 1, AllClipboard = 2, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum UIPermissionWindow @@ -1726,7 +1726,7 @@ public enum UIPermissionWindow SafeTopLevelWindows = 2, AllWindows = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class UrlIdentityPermission : System.Security.CodeAccessPermission @@ -1741,7 +1741,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1751,7 +1751,7 @@ public UrlIdentityPermissionAttribute(System.Security.Permissions.SecurityAction public string Url { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class WebBrowserPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -1768,7 +1768,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1778,7 +1778,7 @@ public WebBrowserPermissionAttribute(System.Security.Permissions.SecurityAction public System.Security.Permissions.WebBrowserPermissionLevel Level { get { throw null; } set { } } public override System.Security.IPermission CreatePermission() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public enum WebBrowserPermissionLevel @@ -1787,7 +1787,7 @@ public enum WebBrowserPermissionLevel Safe = 1, Unrestricted = 2, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class ZoneIdentityPermission : System.Security.CodeAccessPermission @@ -1802,7 +1802,7 @@ public override void FromXml(System.Security.SecurityElement esd) { } public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -1854,14 +1854,14 @@ public sealed partial class ApplicationTrust : System.Security.Policy.EvidenceBa { public ApplicationTrust() { } public ApplicationTrust(System.ApplicationIdentity identity) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public ApplicationTrust(System.Security.PermissionSet defaultGrantSet, System.Collections.Generic.IEnumerable fullTrustAssemblies) { } public System.ApplicationIdentity ApplicationIdentity { get { throw null; } set { } } public System.Security.Policy.PolicyStatement DefaultGrantSet { get { throw null; } set { } } public object ExtraInfo { get { throw null; } set { } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Collections.Generic.IList FullTrustAssemblies { get { throw null; } } @@ -1945,7 +1945,7 @@ public void RemoveChild(System.Security.Policy.CodeGroup group) { } public System.Security.SecurityElement ToXml() { throw null; } public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class FileCodeGroup : System.Security.Policy.CodeGroup @@ -1971,7 +1971,7 @@ public sealed partial class FirstMatchCodeGroup : System.Security.Policy.CodeGro public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) { throw null; } public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class GacInstalled : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2026,7 +2026,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public System.Security.SecurityElement ToXml() { throw null; } public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public partial interface IIdentityPermissionFactory @@ -2079,42 +2079,42 @@ public PolicyException(string message, System.Exception exception) { } public sealed partial class PolicyLevel { internal PolicyLevel() { } - [System.ObsoleteAttribute] + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public System.Collections.IList FullTrustAssemblies { get { throw null; } } public string Label { get { throw null; } } public System.Collections.IList NamedPermissionSets { get { throw null; } } public System.Security.Policy.CodeGroup RootCodeGroup { get { throw null; } set { } } public string StoreLocation { get { throw null; } } public System.Security.PolicyLevelType Type { get { throw null; } } - [System.ObsoleteAttribute] + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void AddFullTrustAssembly(System.Security.Policy.StrongName sn) { } - [System.ObsoleteAttribute] + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void AddFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public void AddNamedPermissionSet(System.Security.NamedPermissionSet permSet) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Security.NamedPermissionSet ChangeNamedPermissionSet(string name, System.Security.PermissionSet pSet) { throw null; } [System.ObsoleteAttribute("AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public static System.Security.Policy.PolicyLevel CreateAppDomainLevel() { throw null; } public void FromXml(System.Security.SecurityElement e) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Security.NamedPermissionSet GetNamedPermissionSet(string name) { throw null; } public void Recover() { } - [System.ObsoleteAttribute] + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void RemoveFullTrustAssembly(System.Security.Policy.StrongName sn) { } - [System.ObsoleteAttribute] + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void RemoveFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Security.NamedPermissionSet RemoveNamedPermissionSet(System.Security.NamedPermissionSet permSet) { throw null; } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Security.NamedPermissionSet RemoveNamedPermissionSet(string name) { throw null; } @@ -2125,17 +2125,17 @@ public void Reset() { } } public sealed partial class PolicyStatement : System.Security.ISecurityEncodable, System.Security.ISecurityPolicyEncodable { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public PolicyStatement(System.Security.PermissionSet permSet) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public PolicyStatement(System.Security.PermissionSet permSet, System.Security.Policy.PolicyStatementAttribute attributes) { } public System.Security.Policy.PolicyStatementAttribute Attributes { get { throw null; } set { } } public string AttributeString { get { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public System.Security.PermissionSet PermissionSet { get { throw null; } set { } } @@ -2155,7 +2155,7 @@ public enum PolicyStatementAttribute LevelFinal = 2, All = 3, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class Publisher : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2182,7 +2182,7 @@ public void FromXml(System.Security.SecurityElement e, System.Security.Policy.Po public System.Security.SecurityElement ToXml() { throw null; } public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2210,7 +2210,7 @@ public void FromXml(System.Security.SecurityElement e, System.Security.Policy.Po public System.Security.SecurityElement ToXml() { throw null; } public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2225,7 +2225,7 @@ public StrongName(System.Security.Permissions.StrongNamePublicKeyBlob blob, stri public override int GetHashCode() { throw null; } public override string ToString() { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class StrongNameMembershipCondition : System.Security.ISecurityEncodable, System.Security.ISecurityPolicyEncodable, System.Security.Policy.IMembershipCondition @@ -2270,7 +2270,7 @@ public sealed partial class UnionCodeGroup : System.Security.Policy.CodeGroup public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) { throw null; } public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class Url : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2297,7 +2297,7 @@ public void FromXml(System.Security.SecurityElement e, System.Security.Policy.Po public System.Security.SecurityElement ToXml() { throw null; } public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory @@ -2328,7 +2328,7 @@ public void FromXml(System.Security.SecurityElement e, System.Security.Policy.Po } namespace System.ServiceProcess { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class ServiceControllerPermission : System.Security.Permissions.ResourcePermissionBase @@ -2346,7 +2346,7 @@ public enum ServiceControllerPermissionAccess Browse = 2, Control = 6, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple = true, Inherited = false)] @@ -2386,7 +2386,7 @@ public void Remove(System.ServiceProcess.ServiceControllerPermissionEntry value) } namespace System.Transactions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class DistributedTransactionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -2400,7 +2400,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true)] @@ -2413,7 +2413,7 @@ public DistributedTransactionPermissionAttribute(System.Security.Permissions.Sec } namespace System.Web { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class AspNetHostingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission @@ -2429,7 +2429,7 @@ public override void FromXml(System.Security.SecurityElement securityElement) { public override System.Security.SecurityElement ToXml() { throw null; } public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif [System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)] diff --git a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netcoreapp.cs b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netcoreapp.cs index 6dc951ccb71bf..bd7e4dd59a6c7 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netcoreapp.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netcoreapp.cs @@ -6,7 +6,7 @@ namespace System.Xaml.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public sealed partial class XamlLoadPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermission.cs b/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermission.cs index c6fa534272891..ac7268e963173 100644 --- a/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermission.cs @@ -6,7 +6,7 @@ namespace System.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class ConfigurationPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermissionAttribute.cs index accc1e7bc73dc..8366e422d9172 100644 --- a/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Configuration/ConfigurationPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Configuration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermission.cs index 60926745aee8c..93b727f99073f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermission.cs @@ -6,7 +6,7 @@ namespace System.Data.Common { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public abstract class DBDataPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermissionAttribute.cs index a842d154718cb..48bd28174a6f0 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/Common/DBDataPermissionAttribute.cs @@ -5,7 +5,7 @@ namespace System.Data.Common { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor| AttributeTargets.Method, diff --git a/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermission.cs index cd08e1cc993c6..6504d49d88814 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermission.cs @@ -7,7 +7,7 @@ namespace System.Data.Odbc { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class OdbcPermission : DBDataPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermissionAttribute.cs index 08bb06d32dab4..c6286aa49ba75 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/Odbc/OdbcPermissionAttribute.cs @@ -7,6 +7,9 @@ namespace System.Data.Odbc { +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public sealed class OdbcPermissionAttribute : DBDataPermissionAttribute diff --git a/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermission.cs index 8d295c5a9faf3..d71f863adcf37 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermission.cs @@ -7,7 +7,7 @@ namespace System.Data.OleDb { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class OleDbPermission : DBDataPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermissionAttribute.cs index 2c75bd9f0ec45..c4e0aca2d7a28 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermissionAttribute.cs @@ -7,6 +7,9 @@ namespace System.Data.OleDb { +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public sealed class OleDbPermissionAttribute : DBDataPermissionAttribute diff --git a/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermission.cs index 28189b688b64c..a0389c9a0be15 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermission.cs @@ -6,7 +6,7 @@ namespace System.Data.OracleClient { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class OraclePermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermissionAttribute.cs index b8ccb5896cc33..639d38aa48e91 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermissionAttribute.cs @@ -5,7 +5,7 @@ namespace System.Data.OracleClient { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | diff --git a/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermission.cs index 1b289c0201060..e3cc4ced62e7a 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermission.cs @@ -6,7 +6,7 @@ namespace System.Data.SqlClient { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class SqlClientPermission : DBDataPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermissionAttribute.cs index 249d8d33556c3..0979d37e899ff 100644 --- a/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermissionAttribute.cs @@ -7,6 +7,9 @@ namespace System.Data.SqlClient { +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public sealed class SqlClientPermissionAttribute : DBDataPermissionAttribute diff --git a/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermission.cs b/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermission.cs index 49ab79029a40d..e1e64c3c12be6 100644 --- a/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermission.cs @@ -5,7 +5,7 @@ namespace System.Diagnostics { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class EventLogPermission : ResourcePermissionBase diff --git a/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermissionAttribute.cs index 59cde15bdeee2..e296e032d6ba7 100644 --- a/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Diagnostics { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct diff --git a/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermission.cs b/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermission.cs index 648d9c3badee4..49cee1607c338 100644 --- a/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermission.cs @@ -5,7 +5,7 @@ namespace System.Diagnostics { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class PerformanceCounterPermission : ResourcePermissionBase diff --git a/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermissionAttribute.cs index 334692aae391c..804e21d7d809b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Diagnostics/PerformanceCounterPermissionAttribute.cs @@ -5,7 +5,7 @@ using System.Security.Permissions; namespace System.Diagnostics { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Event, diff --git a/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermission.cs b/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermission.cs index 154d9d5ccee76..e429ac0b32599 100644 --- a/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermission.cs @@ -6,7 +6,7 @@ namespace System.Drawing.Printing { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class PrintingPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermissionAttribute.cs index 8efda5f9c36a1..654f04f6ede1f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Drawing/Printing/PrintingPermissionAttribute.cs @@ -5,7 +5,7 @@ namespace System.Drawing.Printing { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] diff --git a/src/libraries/System.Security.Permissions/src/System/Net/DnsPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/DnsPermission.cs index 606f69c352c28..86817bf064ea2 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/DnsPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/DnsPermission.cs @@ -6,7 +6,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class DnsPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/DnsPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/DnsPermissionAttribute.cs index fd5b6d134ae23..ab40a425fcaa8 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/DnsPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/DnsPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | diff --git a/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermission.cs index 4098e944b7d07..d9c5c6edba6a7 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermission.cs @@ -6,7 +6,7 @@ namespace System.Net.Mail { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class SmtpPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermissionAttribute.cs index 0db9b9dcc0fbe..8d8a3379277e4 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/Mail/SmtpPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net.Mail { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | diff --git a/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermission.cs index d437bfbf3c844..40a7e39426acb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermission.cs @@ -6,7 +6,7 @@ namespace System.Net.NetworkInformation { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class NetworkInformationPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermissionAttribute.cs index d95c62c70409f..d25b0cf35e4e8 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/NetworkInformation/NetworkInformationPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net.NetworkInformation { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermission.cs index beeb1e11bceef..25627f89a6bd0 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermission.cs @@ -6,7 +6,7 @@ namespace System.Net.PeerToPeer.Collaboration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class PeerCollaborationPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermissionAttribute.cs index 5f0e2ddf32b01..8e171c3cd5c7f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/Collaboration/PeerCollaborationPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net.PeerToPeer.Collaboration { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | diff --git a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermission.cs index b94e513d1667c..c7b3ccbdf7789 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermission.cs @@ -6,7 +6,7 @@ namespace System.Net.PeerToPeer { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class PnrpPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermissionAttribute.cs index 70a2714812ed1..b9df6e845e49e 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/PeerToPeer/PnrpPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net.PeerToPeer { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | diff --git a/src/libraries/System.Security.Permissions/src/System/Net/SocketPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/SocketPermission.cs index b7099955c6ef6..88e835058e787 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/SocketPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/SocketPermission.cs @@ -6,7 +6,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class SocketPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/SocketPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/SocketPermissionAttribute.cs index 42cd6d8a00391..88147043b9218 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/SocketPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/SocketPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | diff --git a/src/libraries/System.Security.Permissions/src/System/Net/WebPermission.cs b/src/libraries/System.Security.Permissions/src/System/Net/WebPermission.cs index 26a02828380ac..e61b27b590f2d 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/WebPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/WebPermission.cs @@ -8,7 +8,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class WebPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Net/WebPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Net/WebPermissionAttribute.cs index 33153417b3a5d..7113110a896b3 100644 --- a/src/libraries/System.Security.Permissions/src/System/Net/WebPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Net/WebPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Net { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | diff --git a/src/libraries/System.Security.Permissions/src/System/Security/CodeAccessPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/CodeAccessPermission.cs index a0a989d0c2fac..4ecc14aca2bff 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/CodeAccessPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/CodeAccessPermission.cs @@ -3,7 +3,7 @@ namespace System.Security { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public abstract partial class CodeAccessPermission : IPermission, ISecurityEncodable, IStackWalk diff --git a/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.cs b/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.cs index cd0e13a465c4f..19eb4b55ce944 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.cs @@ -7,7 +7,7 @@ namespace System.Security { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Serializable] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/NamedPermissionSet.cs b/src/libraries/System.Security.Permissions/src/System/Security/NamedPermissionSet.cs index a0e11e8e9326f..26bfa5dae85d9 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/NamedPermissionSet.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/NamedPermissionSet.cs @@ -5,7 +5,7 @@ namespace System.Security { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class NamedPermissionSet : PermissionSet diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermission.cs index 20095367349e7..2af3cafe200eb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class DataProtectionPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionAttribute.cs index 7448dc50b75c0..d074a90e8c65c 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionFlags.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionFlags.cs index 2f75fccc9ee9e..44a442408e8f8 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionFlags.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/DataProtectionPermissionFlags.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermission.cs index f9129c034875f..5c26c14947541 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class EnvironmentPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAccess.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAccess.cs index 6f99c6f611642..b5dee502e691a 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAccess.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAccess.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAttribute.cs index e2ef0777996ca..d68a1e4842fbb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/EnvironmentPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermission.cs index a591afc055720..6774ece3a0807 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class FileDialogPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAccess.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAccess.cs index 1b1292b688d02..80dfc8f43e160 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAccess.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAccess.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAttribute.cs index 727838d9fc9cc..a6dc55eb78b65 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileDialogPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermission.cs index c2bb7eadebd51..7df64c4145df1 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class FileIOPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAccess.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAccess.cs index 0cd5a958515fd..e3fb61c97b239 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAccess.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAccess.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAttribute.cs index 0e7040907fdc5..1780e55dde857 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/FileIOPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermission.cs index 77f309074cf8b..a0d0abc573fdb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class GacIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermissionAttribute.cs index d6c1a8d917070..bdeee8607fd10 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/GacIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionAttribute.cs index bb4d3e7c7d7b2..56f6d8a24bbe1 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(4205), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionResource.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionResource.cs index cfbab9cb47608..d1db88246d003 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionResource.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/HostProtectionResource.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IUnrestrictedPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IUnrestrictedPermission.cs index 9141a22ad33d9..a4c95a4a13fd2 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IUnrestrictedPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IUnrestrictedPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public partial interface IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageContainment.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageContainment.cs index 60557b370b588..1563eba6e790f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageContainment.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageContainment.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum IsolatedStorageContainment diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermission.cs index 82ceabf7ed5b3..fafbdca772d71 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class IsolatedStorageFilePermission : IsolatedStoragePermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermissionAttribute.cs index 933ddb32e8dde..e7d95b8640915 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStorageFilePermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermission.cs index bccc228e2f3ab..d0d08571e6a8e 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public abstract class IsolatedStoragePermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermissionAttribute.cs index 498fe71ffa830..30189ad078167 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/IsolatedStoragePermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public abstract class IsolatedStoragePermissionAttribute : CodeAccessSecurityAttribute diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermission.cs index df1f4ea670017..c72339da8c51d 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class KeyContainerPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntry.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntry.cs index 3189640b79db9..771c23abb4db7 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntry.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntry.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class KeyContainerPermissionAccessEntry diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryCollection.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryCollection.cs index 02d9b11482346..4dd5f15a0d099 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryCollection.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryCollection.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class KeyContainerPermissionAccessEntryCollection : ICollection diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryEnumerator.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryEnumerator.cs index 36c3ee14ab342..86ed27dd250ca 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryEnumerator.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAccessEntryEnumerator.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class KeyContainerPermissionAccessEntryEnumerator : IEnumerator diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAttribute.cs index cd5027d9f0510..7211ff86ccbaf 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionFlags.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionFlags.cs index 9620437af77ef..50004c265344b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionFlags.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/KeyContainerPermissionFlags.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum KeyContainerPermissionFlags diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs index 31514a38d9c52..26d3b914f868e 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum MediaPermissionAudio @@ -13,7 +13,7 @@ public enum MediaPermissionAudio AllAudio } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum MediaPermissionVideo @@ -24,7 +24,7 @@ public enum MediaPermissionVideo AllVideo, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum MediaPermissionImage @@ -35,7 +35,7 @@ public enum MediaPermissionImage AllImage, } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class MediaPermission : CodeAccessPermission, IUnrestrictedPermission @@ -61,7 +61,7 @@ public override void FromXml(SecurityElement securityElement) { } public MediaPermissionImage Image { get { return MediaPermissionImage.AllImage; } } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PermissionSetAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PermissionSetAttribute.cs index 714d318b5bd6f..c36c4cbc73bd9 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PermissionSetAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PermissionSetAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermission.cs index 64b4116e6f85c..f44935f2b7354 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermission.cs @@ -8,7 +8,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class PrincipalPermission : IPermission, ISecurityEncodable, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermissionAttribute.cs index 1608bb11dde2d..b8a3ff91e7b4e 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PrincipalPermissionAttribute.cs @@ -3,13 +3,13 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(68), AllowMultiple = true, Inherited = false)] public sealed partial class PrincipalPermissionAttribute : CodeAccessSecurityAttribute { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.PrincipalPermissionAttributeMessage, error: true, DiagnosticId = Obsoletions.PrincipalPermissionAttributeDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public PrincipalPermissionAttribute(SecurityAction action) : base(default(SecurityAction)) { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermission.cs index 9ada80ed41e44..b0faace69f7ec 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermission.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class PublisherIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermissionAttribute.cs index c42f6fe5e44d9..d8ce7f50636b8 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/PublisherIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermission.cs index f9450b671f4b6..d6577df824243 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class ReflectionPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionAttribute.cs index 5ce2ce7f12780..aeec90580dccd 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionFlag.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionFlag.cs index 9d67dcd0cd1a0..1c9e39eb6b3d7 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionFlag.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ReflectionPermissionFlag.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermission.cs index eb7caacf3618f..04fa83df80842 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermission.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class RegistryPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAccess.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAccess.cs index b7057b6d33044..b2f0384acdc1d 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAccess.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAccess.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAttribute.cs index fad4313de093e..da29af354dc30 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/RegistryPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBase.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBase.cs index 58934d8472ee3..597647caf26d8 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBase.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBase.cs @@ -5,7 +5,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public abstract class ResourcePermissionBase : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBaseEntry.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBaseEntry.cs index 7f78abed14780..77c012439029b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBaseEntry.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ResourcePermissionBaseEntry.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public class ResourcePermissionBaseEntry diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SecurityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SecurityPermission.cs index 48e3395252067..a1aa39a9764f7 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SecurityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SecurityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class SecurityPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermission.cs index 781250f449eab..160a9301aed39 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class SiteIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermissionAttribute.cs index 087dcd0b7ffc4..9110f6b74f740 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/SiteIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermission.cs index b1c4c9978c334..691439b51dd58 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class StorePermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionAttribute.cs index de2c1ce4b79e6..c3c50ebf60afe 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionFlags.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionFlags.cs index b47b2e05c41b4..283e66a697f7c 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionFlags.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StorePermissionFlags.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermission.cs index 939aa3ce82363..1d66fa2f7e48a 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class StrongNameIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermissionAttribute.cs index edd19683cf2b1..07b3014ec9a7f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNameIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNamePublicKeyBlob.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNamePublicKeyBlob.cs index c1ff4caf87fde..44b39f9c8ad98 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNamePublicKeyBlob.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/StrongNamePublicKeyBlob.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class StrongNamePublicKeyBlob diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermission.cs index 5bf8fcce00713..d1e18e0a81069 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class TypeDescriptorPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionAttribute.cs index 258ec10827c30..767a40af5103d 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionFlags.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionFlags.cs index 4951bba185088..b8c76becc953b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionFlags.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/TypeDescriptorPermissionFlags.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [Flags] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermission.cs index 6d56afffa1d96..a325753b61134 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class UIPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionAttribute.cs index 90b5784ca1ce6..f5569f8af056c 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionClipboard.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionClipboard.cs index 6716f82c184c3..cbe563a8ecffb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionClipboard.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionClipboard.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum UIPermissionClipboard diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionWindow.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionWindow.cs index 5187e7f87ab62..c87c0b8dfdf66 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionWindow.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UIPermissionWindow.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum UIPermissionWindow diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermission.cs index c3c663cb72b86..1ddc1172e2737 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class UrlIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermissionAttribute.cs index 197105989ccf2..49ce74de84e48 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/UrlIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/WebBrowserPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/WebBrowserPermission.cs index 82622b0f687e1..3f0670d9fa276 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/WebBrowserPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/WebBrowserPermission.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public enum WebBrowserPermissionLevel @@ -12,7 +12,7 @@ public enum WebBrowserPermissionLevel Unrestricted } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class WebBrowserPermission : CodeAccessPermission, IUnrestrictedPermission @@ -30,7 +30,7 @@ public override void FromXml(SecurityElement securityElement) { } public WebBrowserPermissionLevel Level { get { return WebBrowserPermissionLevel.Unrestricted; } set { } } } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermission.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermission.cs index 77ff1e8d482d6..61e1945c22ef9 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermission.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class ZoneIdentityPermission : CodeAccessPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermissionAttribute.cs index 00d4c368ba028..0f66c4bd43176 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Permissions/ZoneIdentityPermissionAttribute.cs @@ -3,7 +3,7 @@ namespace System.Security.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)] diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/ApplicationTrust.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/ApplicationTrust.cs index deef3ca36669e..b17afed7b99df 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/ApplicationTrust.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/ApplicationTrust.cs @@ -9,14 +9,14 @@ public sealed partial class ApplicationTrust : EvidenceBase, ISecurityEncodable { public ApplicationTrust() { } public ApplicationTrust(ApplicationIdentity identity) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public ApplicationTrust(PermissionSet defaultGrantSet, IEnumerable fullTrustAssemblies) { } public ApplicationIdentity ApplicationIdentity { get; set; } public PolicyStatement DefaultGrantSet { get; set; } public object ExtraInfo { get; set; } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public IList FullTrustAssemblies { get { return default(IList); } } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/FileCodeGroup.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/FileCodeGroup.cs index d473d212ce102..599d70f03c431 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/FileCodeGroup.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/FileCodeGroup.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class FileCodeGroup : CodeGroup diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/FirstMatchCodeGroup.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/FirstMatchCodeGroup.cs index 3fe029b46e4ca..e93de3604a79f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/FirstMatchCodeGroup.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/FirstMatchCodeGroup.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { - [Obsolete("Code Access Security is not supported or honored by the runtime.")] + [Obsolete("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public sealed partial class FirstMatchCodeGroup : CodeGroup { public FirstMatchCodeGroup(IMembershipCondition membershipCondition, PolicyStatement policy) : base(default(IMembershipCondition), default(PolicyStatement)) { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/GacInstalled.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/GacInstalled.cs index ed88254191111..f6565fbf79161 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/GacInstalled.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/GacInstalled.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class GacInstalled : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/IIdentityPermissionFactory.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/IIdentityPermissionFactory.cs index 9d23820f78962..f519bf2c06c2d 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/IIdentityPermissionFactory.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/IIdentityPermissionFactory.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public partial interface IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PermissionRequestEvidence.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PermissionRequestEvidence.cs index 3c4f4278979eb..1ff723876a95a 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PermissionRequestEvidence.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PermissionRequestEvidence.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { - [Obsolete("Code Access Security is not supported or honored by the runtime.")] + [Obsolete("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public sealed partial class PermissionRequestEvidence : EvidenceBase { public PermissionRequestEvidence(PermissionSet request, PermissionSet optional, PermissionSet denied) { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyLevel.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyLevel.cs index 44f98aea4b33a..74afa9599191c 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyLevel.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyLevel.cs @@ -8,8 +8,7 @@ namespace System.Security.Policy public sealed partial class PolicyLevel { internal PolicyLevel() { } - [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] - public IList FullTrustAssemblies { get { return default(IList); } } + [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public IList FullTrustAssemblies { get { return default(IList); } } public string Label { get { return null; } } public IList NamedPermissionSets { get { return default(IList); } } public CodeGroup RootCodeGroup { get; set; } @@ -19,19 +18,19 @@ internal PolicyLevel() { } public void AddFullTrustAssembly(StrongName sn) { } [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void AddFullTrustAssembly(StrongNameMembershipCondition snMC) { } -#if NET5_0_OR_GREATER - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public void AddNamedPermissionSet(NamedPermissionSet permSet) { } -#if NET5_0_OR_GREATER - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet ChangeNamedPermissionSet(string name, PermissionSet pSet) { return default(NamedPermissionSet); } - [Obsolete("Code Access Security is not supported or honored by the runtime.")] + [Obsolete("AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public static PolicyLevel CreateAppDomainLevel() { return default(PolicyLevel); } public void FromXml(SecurityElement e) { } -#if NET5_0_OR_GREATER - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet GetNamedPermissionSet(string name) { return default(NamedPermissionSet); } public void Recover() { } @@ -39,12 +38,12 @@ public void Recover() { } public void RemoveFullTrustAssembly(StrongName sn) { } [Obsolete("Because all GAC assemblies always get full trust, the full trust list is no longer meaningful. You should install any assemblies that are used in security policy in the GAC to ensure they are trusted.")] public void RemoveFullTrustAssembly(StrongNameMembershipCondition snMC) { } -#if NET5_0_OR_GREATER - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet RemoveNamedPermissionSet(NamedPermissionSet permSet) { return default(NamedPermissionSet); } -#if NET5_0_OR_GREATER - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet RemoveNamedPermissionSet(string name) { return default(NamedPermissionSet); } public void Reset() { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyStatement.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyStatement.cs index e6cacb311c671..d94b4ebaec305 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyStatement.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyStatement.cs @@ -5,16 +5,19 @@ namespace System.Security.Policy { public sealed partial class PolicyStatement : ISecurityEncodable, ISecurityPolicyEncodable { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public PolicyStatement(PermissionSet permSet) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public PolicyStatement(PermissionSet permSet, PolicyStatementAttribute attributes) { } public PolicyStatementAttribute Attributes { get; set; } public string AttributeString { get { return null; } } +#if NETCOREAPP + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif public PermissionSet PermissionSet { get; set; } public PolicyStatement Copy() { return this; } public override bool Equals(object o) => base.Equals(o); diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Publisher.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Publisher.cs index ea183fc3edda5..82d4a4c014ac6 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Publisher.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Publisher.cs @@ -5,7 +5,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class Publisher : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Site.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Site.cs index 79fe42517c654..e257cb4d44f12 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Site.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Site.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class Site : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongName.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongName.cs index 783766b541c94..7f9521026ed3f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongName.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongName.cs @@ -5,7 +5,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class StrongName : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongNameMembershipCondition.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongNameMembershipCondition.cs index c8f7ec64abc2f..e7fa159370023 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongNameMembershipCondition.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/StrongNameMembershipCondition.cs @@ -5,7 +5,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class StrongNameMembershipCondition : ISecurityEncodable, ISecurityPolicyEncodable, IMembershipCondition diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/UnionCodeGroup.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/UnionCodeGroup.cs index e3def2b7db291..f5fa6cc401182 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/UnionCodeGroup.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/UnionCodeGroup.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { - [Obsolete("Code Access Security is not supported or honored by the runtime.")] + [Obsolete("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public sealed partial class UnionCodeGroup : CodeGroup { public UnionCodeGroup(IMembershipCondition membershipCondition, PolicyStatement policy) : base(default(IMembershipCondition), default(PolicyStatement)) { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Url.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Url.cs index 43f676bb49bf0..a108d3691fb56 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Url.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Url.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class Url : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Zone.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Zone.cs index 29b9f453344bc..2e08fd3e3a0f0 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Zone.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Zone.cs @@ -3,7 +3,7 @@ namespace System.Security.Policy { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class Zone : EvidenceBase, IIdentityPermissionFactory diff --git a/src/libraries/System.Security.Permissions/src/System/Security/SecurityContext.cs b/src/libraries/System.Security.Permissions/src/System/Security/SecurityContext.cs index be8e30d3f397b..1ee1b1d5e60a9 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/SecurityContext.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/SecurityContext.cs @@ -5,7 +5,7 @@ namespace System.Security { -#if NET6_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed partial class SecurityContext : System.IDisposable diff --git a/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs b/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs index bcbb46632abfe..039bcc49a05f3 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs @@ -6,7 +6,7 @@ namespace System.Security { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public static partial class SecurityManager diff --git a/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermission.cs b/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermission.cs index 25be73f3509cf..c049d1e670469 100644 --- a/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermission.cs @@ -5,7 +5,7 @@ namespace System.ServiceProcess { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class ServiceControllerPermission : ResourcePermissionBase diff --git a/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermissionAttribute.cs index 6d3f87b0769fb..2acc123ca6ee3 100644 --- a/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/ServiceProcess/ServiceControllerPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.ServiceProcess { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Event, AllowMultiple = true, Inherited = false )] diff --git a/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermission.cs b/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermission.cs index a9eca272264d6..0905e0f5b7bd2 100644 --- a/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermission.cs @@ -6,7 +6,7 @@ namespace System.Transactions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class DistributedTransactionPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermissionAttribute.cs index 24ba7be14863c..cf17caabf319b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Transactions/DistributedTransactionPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Transactions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] diff --git a/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermission.cs b/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermission.cs index 4e0ffd38beb7b..ac51b6530d0b5 100644 --- a/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermission.cs @@ -6,7 +6,7 @@ namespace System.Web { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class AspNetHostingPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermissionAttribute.cs index c6cf9d50f3c4b..7b58322568d19 100644 --- a/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermissionAttribute.cs +++ b/src/libraries/System.Security.Permissions/src/System/Web/AspNetHostingPermissionAttribute.cs @@ -6,7 +6,7 @@ namespace System.Web { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false )] diff --git a/src/libraries/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs b/src/libraries/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs index 898716aefd7cd..84e13bd45dc9b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs +++ b/src/libraries/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs @@ -10,7 +10,7 @@ namespace System.Xaml.Permissions { -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public sealed class XamlLoadPermission : CodeAccessPermission, IUnrestrictedPermission diff --git a/src/libraries/System.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs b/src/libraries/System.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs index d107b9bf340e7..d977df8d4b5a1 100644 --- a/src/libraries/System.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs +++ b/src/libraries/System.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs @@ -58,7 +58,7 @@ private SpeechAudioFormatInfo(EncodingFormat encodingFormat, int samplesPerSecon break; } } - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public SpeechAudioFormatInfo(EncodingFormat encodingFormat, int samplesPerSecond, int bitsPerSample, int channelCount, int averageBytesPerSecond, int blockAlign, byte[] formatSpecificData) : this(encodingFormat, samplesPerSecond, (short)bitsPerSample, (short)channelCount, formatSpecificData) { diff --git a/src/libraries/System.Speech/src/Recognition/Grammar.cs b/src/libraries/System.Speech/src/Recognition/Grammar.cs index 1aa35512db8ce..9166d026c5aa9 100644 --- a/src/libraries/System.Speech/src/Recognition/Grammar.cs +++ b/src/libraries/System.Speech/src/Recognition/Grammar.cs @@ -66,12 +66,12 @@ public Grammar(SrgsDocument srgsDocument, string ruleName, object[] parameters) : this(srgsDocument, ruleName, null, parameters) { } - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public Grammar(SrgsDocument srgsDocument, string ruleName, Uri baseUri) : this(srgsDocument, ruleName, baseUri, null) { } - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public Grammar(SrgsDocument srgsDocument, string ruleName, Uri baseUri, object[] parameters) { Helpers.ThrowIfNull(srgsDocument, nameof(srgsDocument)); @@ -93,12 +93,12 @@ public Grammar(Stream stream, string ruleName, object[] parameters) : this(stream, ruleName, null, parameters) { } - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public Grammar(Stream stream, string ruleName, Uri baseUri) : this(stream, ruleName, baseUri, null) { } - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public Grammar(Stream stream, string ruleName, Uri baseUri, object[] parameters) { Helpers.ThrowIfNull(stream, nameof(stream)); diff --git a/src/libraries/System.Speech/src/Synthesis/PromptBuilder.cs b/src/libraries/System.Speech/src/Synthesis/PromptBuilder.cs index 8f5913b281603..9f4b56d5121bc 100644 --- a/src/libraries/System.Speech/src/Synthesis/PromptBuilder.cs +++ b/src/libraries/System.Speech/src/Synthesis/PromptBuilder.cs @@ -760,13 +760,14 @@ public void AppendSsml(XmlReader ssmlFile) } // Advanced: Extensibility model to write through to the underlying stream writer. - [EditorBrowsable(EditorBrowsableState.Advanced)] + [EditorBrowsable(EditorBrowsableState.Never)] public void AppendSsmlMarkup(string ssmlMarkup) { Helpers.ThrowIfEmptyOrNull(ssmlMarkup, nameof(ssmlMarkup)); _elements.Add(new Element(ElementType.SsmlMarkup, ssmlMarkup)); } + public string ToXml() { using (StringWriter sw = new(CultureInfo.InvariantCulture)) diff --git a/src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.cs b/src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.cs index afaf22888d081..56fc2b77a9387 100644 --- a/src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.cs +++ b/src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.cs @@ -9,7 +9,7 @@ using System.Runtime.Intrinsics.X86; #endif -#if NET5_0_OR_GREATER +#if NETCOREAPP using System.Runtime.Intrinsics.Arm; #endif @@ -348,11 +348,7 @@ public int GetIndexOfFirstByteToEncode(ReadOnlySpan data) int dataOriginalLength = data.Length; #if NETCOREAPP - if (Ssse3.IsSupported -#if NET5_0_OR_GREATER - || (AdvSimd.Arm64.IsSupported && BitConverter.IsLittleEndian) -#endif - ) + if (Ssse3.IsSupported || (AdvSimd.Arm64.IsSupported && BitConverter.IsLittleEndian)) { int asciiBytesSkipped; unsafe @@ -360,13 +356,11 @@ public int GetIndexOfFirstByteToEncode(ReadOnlySpan data) fixed (byte* pData = data) { nuint asciiBytesSkippedNInt; -#if NET5_0_OR_GREATER if (AdvSimd.Arm64.IsSupported && BitConverter.IsLittleEndian) { asciiBytesSkippedNInt = GetIndexOfFirstByteToEncodeAdvSimd64(pData, (uint)dataOriginalLength); } else -#endif { Debug.Assert(Ssse3.IsSupported, "#ifdef was ill-formed."); asciiBytesSkippedNInt = GetIndexOfFirstByteToEncodeSsse3(pData, (uint)dataOriginalLength); diff --git a/src/libraries/System.Text.Json/Common/JsonCamelCaseNamingPolicy.cs b/src/libraries/System.Text.Json/Common/JsonCamelCaseNamingPolicy.cs index decf0cce12d03..2bc00e06d08e5 100644 --- a/src/libraries/System.Text.Json/Common/JsonCamelCaseNamingPolicy.cs +++ b/src/libraries/System.Text.Json/Common/JsonCamelCaseNamingPolicy.cs @@ -16,7 +16,7 @@ public override string ConvertName(string name) return string.Create(name.Length, name, (chars, name) => { name -#if !NET6_0_OR_GREATER +#if !NETCOREAPP .AsSpan() #endif .CopyTo(chars); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/UnsupportedTypeConverterFactory.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/UnsupportedTypeConverterFactory.cs index f211939119505..d76eff14de69c 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/UnsupportedTypeConverterFactory.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/UnsupportedTypeConverterFactory.cs @@ -32,7 +32,7 @@ public override bool CanConvert(Type type) // For simplicity we elide equivalent checks for targets // that are older than net6.0, since they do not include // DateOnly or TimeOnly. -#if NET6_0_OR_GREATER +#if NETCOREAPP type == typeof(DateOnly) || type == typeof(TimeOnly); #else diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs index 5a99d5cd8aecb..a29b187224e22 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs @@ -299,7 +299,7 @@ internal bool TryWrite(Utf8JsonWriter writer, in T value, JsonSerializerOptions bool success; if ( -#if NET5_0_OR_GREATER +#if NETCOREAPP // Short-circuit the check against "is not null"; treated as a constant by recent versions of the JIT. !typeof(T).IsValueType && #else diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerContext.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerContext.cs index 7254cd6f2cf09..ca4c2bf07f712 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerContext.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerContext.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Text.Json.Serialization.Metadata; namespace System.Text.Json.Serialization @@ -9,7 +8,6 @@ namespace System.Text.Json.Serialization /// /// Provides metadata about a set of types that is relevant to JSON serialization. /// - [EditorBrowsable(EditorBrowsableState.Never)] public abstract partial class JsonSerializerContext { private bool? _canUseSerializationLogic; diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoOfT.cs index e28bdee6d691e..8fff88414697c 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoOfT.cs @@ -243,7 +243,7 @@ internal override bool GetMemberAndWriteJson(object obj, ref WriteStack state, U T value = Get!(obj); if ( -#if NET5_0_OR_GREATER +#if NETCOREAPP !typeof(T).IsValueType && // treated as a constant by recent versions of the JIT. #else !Converter.IsValueType && diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoValuesOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoValuesOfT.cs index ed7fffe7124c7..624879e469051 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoValuesOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoValuesOfT.cs @@ -1,12 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; + namespace System.Text.Json.Serialization.Metadata { /// /// Provides serialization metadata about a property or field. /// /// The type to convert of the for the property. + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class JsonPropertyInfoValues { /// diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs index d30e62a6b7a45..3feeb33dd8be0 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs @@ -801,7 +801,7 @@ public static void AssertThrows( } } -#if NET6_0_OR_GREATER +#if NETCOREAPP // This is needed due to the fact that git might normalize line endings when checking-out files public static string NormalizeLineEndings(this string value) => value.ReplaceLineEndings(); #else diff --git a/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.cs b/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.cs index a70d45b1c39e6..20861705d61fb 100644 --- a/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.cs +++ b/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.cs @@ -56,8 +56,10 @@ public static void HtmlEncode(string? s, System.IO.TextWriter output) { } public static byte[]? UrlEncodeToBytes(string? str) { throw null; } [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("str")] public static byte[]? UrlEncodeToBytes(string? str, System.Text.Encoding e) { throw null; } + [System.ObsoleteAttribute("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncode(String).")] [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("str")] public static string? UrlEncodeUnicode(string? str) { throw null; } + [System.ObsoleteAttribute("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")] [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("str")] public static byte[]? UrlEncodeUnicodeToBytes(string? str) { throw null; } [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("str")] diff --git a/src/libraries/System.Web.HttpUtility/src/System/Web/HttpUtility.cs b/src/libraries/System.Web.HttpUtility/src/System/Web/HttpUtility.cs index 2f03ff684a174..6f3f8be18def5 100644 --- a/src/libraries/System.Web.HttpUtility/src/System/Web/HttpUtility.cs +++ b/src/libraries/System.Web.HttpUtility/src/System/Web/HttpUtility.cs @@ -171,9 +171,7 @@ public static NameValueCollection ParseQueryString(string query!!, Encoding enco [return: NotNullIfNotNull("bytes")] public static byte[]? UrlEncodeToBytes(byte[]? bytes) => bytes == null ? null : UrlEncodeToBytes(bytes, 0, bytes.Length); - [Obsolete( - "This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String)." - )] + [Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")] [return: NotNullIfNotNull("str")] public static byte[]? UrlEncodeUnicodeToBytes(string? str) => str == null ? null : Encoding.ASCII.GetBytes(UrlEncodeUnicode(str)); @@ -207,10 +205,7 @@ public static NameValueCollection ParseQueryString(string query!!, Encoding enco [return: NotNullIfNotNull("bytes")] public static byte[]? UrlEncodeToBytes(byte[]? bytes, int offset, int count) => HttpEncoder.UrlEncode(bytes, offset, count, alwaysCreateNewReturnValue: true); - [Obsolete( - "This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncode(String)." - )] - + [Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncode(String).")] [return: NotNullIfNotNull("str")] public static string? UrlEncodeUnicode(string? str) => HttpEncoder.UrlEncodeUnicode(str); diff --git a/src/libraries/System.Xml.ReaderWriter/ApiCompatExcludedAttributes.txt b/src/libraries/System.Xml.ReaderWriter/ApiCompatExcludedAttributes.txt new file mode 100644 index 0000000000000..8af0e4658712f --- /dev/null +++ b/src/libraries/System.Xml.ReaderWriter/ApiCompatExcludedAttributes.txt @@ -0,0 +1,3 @@ +// ObsoleteAttribute applied on IApplicationResourceStreamResolver doesn't match + +T:System.ObsoleteAttribute diff --git a/src/libraries/System.Xml.ReaderWriter/Directory.Build.props b/src/libraries/System.Xml.ReaderWriter/Directory.Build.props index 63f02a0f817ef..7caec2b318208 100644 --- a/src/libraries/System.Xml.ReaderWriter/Directory.Build.props +++ b/src/libraries/System.Xml.ReaderWriter/Directory.Build.props @@ -2,5 +2,6 @@ Microsoft + $(ApiCompatExcludeAttributeList),$(MSBuildThisFileDirectory)ApiCompatExcludedAttributes.txt \ No newline at end of file diff --git a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs index d894d797c2f46..ab939d140139a 100644 --- a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -1609,7 +1609,7 @@ public XmlSchemaChoice() { } [System.Xml.Serialization.XmlElementAttribute("sequence", typeof(System.Xml.Schema.XmlSchemaSequence))] public override System.Xml.Schema.XmlSchemaObjectCollection Items { get { throw null; } } } - [System.ObsoleteAttribute("XmlSchemaCollection has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation.")] + [System.ObsoleteAttribute("XmlSchemaCollection has been deprecated. Use System.Xml.Schema.XmlSchemaSet for schema compilation and validation instead.")] public sealed partial class XmlSchemaCollection : System.Collections.ICollection, System.Collections.IEnumerable { public XmlSchemaCollection() { } diff --git a/src/libraries/apicompat/ApiCompat.proj b/src/libraries/apicompat/ApiCompat.proj index fbbd7eb46e6f7..8a41d9e0758ab 100644 --- a/src/libraries/apicompat/ApiCompat.proj +++ b/src/libraries/apicompat/ApiCompat.proj @@ -13,6 +13,11 @@ $(MSBuildThisFileDirectory)ApiCompatBaseline.PreviousNetCoreApp.txt + + + + + $(IntermediateOutputPath)apicompat.rsp 0 --impl-dirs "$(LibrariesAllRefArtifactsPath.TrimEnd('\/'))" - $(ApiCompatArgs) --exclude-attributes "$(ApiCompatExcludeAttributeList)" + $(ApiCompatArgs) --exclude-attributes "@(ApiCompatExcludeAttributeFile->Metadata('FullPath'), ',')" - - - diff --git a/src/libraries/shims/System.Xml.props b/src/libraries/shims/System.Xml.props deleted file mode 100644 index aa8f28fe4562b..0000000000000 --- a/src/libraries/shims/System.Xml.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/libraries/shims/ref/System.Xml.csproj b/src/libraries/shims/ref/System.Xml.csproj index 6d4156e41f437..a47da677832d5 100644 --- a/src/libraries/shims/ref/System.Xml.csproj +++ b/src/libraries/shims/ref/System.Xml.csproj @@ -3,4 +3,8 @@ 4.0.0.0 ECMA - + + + + + \ No newline at end of file diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs index e59446b10a0d4..ca8e66fc9c2ef 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs @@ -12,6 +12,7 @@ namespace System.Reflection { public partial class Assembly { + [Obsolete("Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.")] [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public static Assembly? LoadWithPartialName(string partialName) { diff --git a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Mono.cs index 07d9019963843..76cd06739c62a 100644 --- a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Mono.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; -using System.Collections.Generic; namespace System.Runtime.InteropServices { @@ -31,13 +32,16 @@ public partial class Marshal [RequiresDynamicCode("Marshalling code for the object might not be available. Use the DestroyStructure overload instead.")] [MethodImplAttribute(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void DestroyStructure(IntPtr ptr, Type structuretype); [MethodImplAttribute(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern IntPtr OffsetOf(Type t, string fieldName); [RequiresDynamicCode("Marshalling code for the object might not be available. Use the StructureToPtr overload instead.")] [MethodImplAttribute(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld); [MethodImplAttribute(MethodImplOptions.InternalCall)] @@ -189,65 +193,74 @@ public int GetHashCode((Type, string) key) #region PlatformNotSupported + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("GetExceptionCode() may be unavailable in future releases.")] public static int GetExceptionCode() { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadByte(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static byte ReadByte(object ptr, int ofs) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt16(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static short ReadInt16(object ptr, int ofs) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt32(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static int ReadInt32(object ptr, int ofs) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("ReadInt64(Object, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static long ReadInt64(object ptr, int ofs) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteByte(Object, Int32, Byte) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteByte(object ptr, int ofs, byte val) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt16(Object, Int32, Int16) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt16(object ptr, int ofs, short val) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt32(Object, Int32, Int32) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt32(object ptr, int ofs, int val) { - // Obsolete throw new PlatformNotSupportedException(); } + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("WriteInt64(Object, Int32, Int64) may be unavailable in future releases.")] [RequiresDynamicCode("Marshalling code for the object might not be available")] public static void WriteInt64(object ptr, int ofs, long val) { - // Obsolete throw new PlatformNotSupportedException(); } diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Mono.cs index 067b197071868..260dfee24f3e6 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Mono.cs @@ -30,7 +30,7 @@ public static unsafe bool UnsafeQueueNativeOverlapped(NativeOverlapped* overlapp return UnsafeQueueUserWorkItem(NativeOverlappedCallback, (IntPtr)overlapped); } - [Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.", false)] + [Obsolete("ThreadPool.BindHandle(IntPtr) has been deprecated. Use ThreadPool.BindHandle(SafeHandle) instead.")] [SupportedOSPlatform("windows")] public static bool BindHandle(IntPtr osHandle) {