From 9588ece9a691e61d56728ea069e27bbc57080294 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 24 Feb 2022 08:29:59 +0100 Subject: [PATCH 1/7] 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. --- .../Cryptography/Asn1/Pkcs12/PfxAsn.manual.cs | 2 +- .../System/Security/Cryptography/Helpers.cs | 10 +- .../src/System/Text/ValueStringBuilder.cs | 4 +- .../src/HostingHostBuilderExtensions.cs | 4 +- .../ref/System.Collections.Immutable.cs | 4 +- .../Immutable/ImmutableHashSet_1.cs | 2 +- .../Immutable/ImmutableSortedSet_1.cs | 2 +- .../src/System/Drawing/Graphics.Unix.cs | 2 +- .../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.Internal.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 +- .../ref/System.Security.Cryptography.Pkcs.cs | 4 +- .../Security/Cryptography/Pkcs/CmsSigner.cs | 2 +- .../Security/Cryptography/Pkcs/SignedCms.cs | 2 +- .../Security/Cryptography/Pkcs/SignerInfo.cs | 2 +- .../ref/System.Security.Permissions.cs | 264 +++++++++--------- .../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 +- .../src/System/Data/OleDb/OleDbPermission.cs | 2 +- .../Data/OracleClient/OraclePermission.cs | 2 +- .../OracleClient/OraclePermissionAttribute.cs | 2 +- .../Data/SqlClient/SqlClientPermission.cs | 2 +- .../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 +- .../System/Security/Policy/GacInstalled.cs | 2 +- .../Policy/IIdentityPermissionFactory.cs | 2 +- .../src/System/Security/Policy/PolicyLevel.cs | 10 +- .../System/Security/Policy/PolicyStatement.cs | 4 +- .../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 +- .../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 +- .../Web/OptimizedInboxTextEncoder.cs | 10 +- .../Common/JsonCamelCaseNamingPolicy.cs | 2 +- .../Value/UnsupportedTypeConverterFactory.cs | 2 +- .../Json/Serialization/JsonConverterOfT.cs | 4 +- .../Metadata/JsonPropertyInfoOfT.cs | 2 +- .../System.Text.Json.Tests/JsonTestHelper.cs | 2 +- 155 files changed, 316 insertions(+), 322 deletions(-) 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 f79cebca8f7c7f..85c0697114db3c 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 105ccac93759f5..3d1b8de29d435f 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 f2cf107c5418a5..9cd033f3986eeb 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 29fe14110db329..c46f089c488a28 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/System.Collections.Immutable/ref/System.Collections.Immutable.cs b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs index c04f557cf54378..830db433798c11 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 c29ccc50cb47d9..92077a5970e3b0 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 8e635472f43d40..a1871e4738a35c 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.Drawing.Common/src/System/Drawing/Graphics.Unix.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs index f38a92fb91178e..ca39a068153ff7 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 @@ -546,7 +546,7 @@ 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 1aa55c9ab649c8..afba2a3306ee33 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 1322bd6e81d08b..f034b5e67d89d5 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 bc9111a112ba55..f03c4129e2486e 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 59c58059a946f0..e1e00a803283a2 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 3cec2c09836219..0d4d9be1db4559 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.Internal.cs b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs index ee58935c3f11a2..019733fca92603 100644 --- a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs +++ b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.Internal.cs @@ -13,7 +13,7 @@ public sealed class PipeAuditRule { } public static class PipesAclExtensions { } public class PipeSecurity { } -#if NET5_0_OR_GREATER +#if NETCOREAPP public static class AnonymousPipeServerStreamAcl { } public static class NamedPipeServerStreamAcl { } #endif 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 0c34b67b4cf4ee..d69e26494a779c 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 6034180e54a1ed..eac7148ec78435 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 57fd648bbe12d2..28d2ebc00feb6e 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 4ddd4427edbb13..c932b87e373dd3 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 02f8559b06f9ee..327dd53ba40735 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 cf798f20416bf7..9fcfd59126aa40 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 df535cd6bc4a88..05e0387374ec8d 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 8c08a0bfcda7e1..e3c1a5bd3eb1da 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 3bfa7ec6bda683..a5ec31c515963d 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 997477657ae022..32ea27babe1fe5 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 8515bbe795437f..225bbef0e6c691 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 e44f4792206ae9..c6302aba8954d4 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 047bc8fd80e4f7..27fde8ab2826f1 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.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs b/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs index bc0a0ab55af9d7..6c17e4ac084049 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 8b9a401a81b36a..458eb02de80945 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 @@ -72,7 +72,7 @@ public CmsSigner(X509Certificate2? certificate) { } -#if NET6_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CmsSignerCspParamsCtorMessage, DiagnosticId = Obsoletions.CmsSignerCspParamsCtorDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public CmsSigner(CspParameters parameters) => throw new PlatformNotSupportedException(); 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 b5dc24bf3f20db..f986f3d607b4b6 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 @@ -90,7 +90,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() 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 d216044736fa73..046a8178b08fed 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 @@ -291,7 +291,7 @@ 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 public void ComputeCounterSignature() 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 c8bd1151a0cb41..be4c35c5bcdaf0 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 @@ -2090,18 +2090,18 @@ internal PolicyLevel() { } public void AddFullTrustAssembly(System.Security.Policy.StrongName sn) { } [System.ObsoleteAttribute] 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; } @@ -2110,11 +2110,11 @@ public void Recover() { } public void RemoveFullTrustAssembly(System.Security.Policy.StrongName sn) { } [System.ObsoleteAttribute] 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 6dc951ccb71bfd..bd7e4dd59a6c7b 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 c6fa5342728911..ac7268e9631733 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 accc1e7bc73dce..8366e422d9172f 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 60926745aee8c2..93b727f99073f2 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 a842d154718cbf..48bd28174a6f0c 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 cd08e1cc993c62..6504d49d88814b 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/OleDb/OleDbPermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermission.cs index 8d295c5a9faf3e..d71f863adcf374 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/OracleClient/OraclePermission.cs b/src/libraries/System.Security.Permissions/src/System/Data/OracleClient/OraclePermission.cs index 28189b688b64c7..a0389c9a0be15f 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 b8ccb5896cc33f..639d38aa48e91e 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 1b289c02010608..e3cc4ced62e7a2 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/Diagnostics/EventLogPermission.cs b/src/libraries/System.Security.Permissions/src/System/Diagnostics/EventLogPermission.cs index 49ab79029a40d9..e1e64c3c12be69 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 59cde15bdeee2b..e296e032d6ba79 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 648d9c3badee47..49cee1607c3381 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 334692aae391cb..804e21d7d809b2 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 154d9d5ccee768..e429ac0b32599a 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 8efda5f9c36a1c..654f04f6ede1f0 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 606f69c352c28b..86817bf064ea29 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 fd5b6d134ae23e..ab40a425fcaa8e 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 4098e944b7d073..d9c5c6edba6a74 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 0db9b9dcc0fbe7..8d8a3379277e46 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 d437bfbf3c8442..40a7e39426acbe 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 d95c62c70409ff..d25b0cf35e4e84 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 beeb1e11bceefb..25627f89a6bd05 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 5f0e2ddf32b01d..8e171c3cd5c7f8 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 b94e513d1667ca..c7b3ccbdf7789a 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 70a2714812ed18..b9df6e845e49ed 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 b7099955c6ef68..88e835058e7872 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 42cd6d8a00391b..88147043b9218a 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 26a02828380ac3..e61b27b590f2d8 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 33153417b3a5d7..7113110a896b36 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 a0a989d0c2facd..4ecc14aca2bff1 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 cd0e13a465c4ff..19eb4b55ce944a 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 a0e11e8e9326f7..26bfa5dae85d9b 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 20095367349e7d..2af3cafe200eb0 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 7448dc50b75c07..d074a90e8c65c5 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 2f75fccc9ee9e9..44a442408e8f8a 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 f9129c034875f7..5c26c149475416 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 6f99c6f611642d..b5dee502e691a8 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 e2ef0777996cab..d68a1e4842fbb4 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 a591afc0557203..6774ece3a08074 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 1b1292b688d028..80dfc8f43e1606 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 727838d9fc9cc2..a6dc55eb78b656 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 c2bb7eadebd51d..7df64c4145df16 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 0cd5a958515fd5..e3fb61c97b2391 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 0e7040907fdc55..1780e55dde857c 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 77f309074cf8bf..a0d0abc573fdb9 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 d6c1a8d9170705..bdeee8607fd10d 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 bb4d3e7c7d7b24..56f6d8a24bbe1c 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 cfbab9cb476085..d1db88246d0037 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 9141a22ad33d9f..a4c95a4a13fd23 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 60557b370b5883..1563eba6e790ff 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 82ceabf7ed5b3e..fafbdca772d713 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 933ddb32e8dde7..e7d95b86409154 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 bccc228e2f3abe..d0d08571e6a8e5 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 498fe71ffa830e..30189ad078167e 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 df1f4ea670017a..c72339da8c51d4 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 3189640b79db9b..771c23abb4db7c 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 02d9b11482346d..4dd5f15a0d0995 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 36c3ee14ab3426..86ed27dd250cab 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 cd5027d9f05107..7211ff86ccbaf0 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 9620437af77ef0..50004c265344b5 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 31514a38d9c52b..26d3b914f868ec 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 714d318b5bd6fa..c36c4cbc73bd98 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 64b4116e6f85c3..f44935f2b7354e 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 1608bb11dde2d7..b8a3ff91e7b4e3 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 9ada80ed41e444..b0faace69f7ecd 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 c42f6fe5e44d92..d8ce7f50636b88 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 f9450b671f4b6c..d6577df8242439 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 5ce2ce7f127804..aeec90580dccd7 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 9d67dcd0cd1a06..1c9e39eb6b3d7f 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 eb7caacf3618f6..04fa83df808422 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 b7057b6d33044a..b2f0384acdc1d3 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 fad4313de093eb..da29af354dc307 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 58934d8472ee3a..597647caf26d87 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 7f78abed14780e..77c012439029b6 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 48e33952520676..a1aa39a9764f73 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 781250f449eabc..160a9301aed394 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 087dcd0b7ffc45..9110f6b74f7402 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 b1c4c9978c3349..691439b51dd580 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 de2c1ce4b79e62..c3c50ebf60afe5 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 b47b2e05c41b4d..283e66a697f7c5 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 939aa3ce823633..1d66fa2f7e48ac 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 edd19683cf2b16..07b3014ec9a7fb 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 c1ff4caf87fde8..44b39f9c8ad986 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 5bf8fcce007135..d1e18e0a81069e 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 258ec10827c300..767a40af5103d2 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 4951bba185088b..b8c76becc953b8 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 6d56afffa1d962..a325753b611342 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 90b5784ca1ce65..f5569f8af056c0 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 6716f82c184c31..cbe563a8ecffb8 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 5187e7f87ab629..c87c0b8dfdf661 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 c3c663cb72b864..1ddc1172e27372 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 197105989ccf21..49ce74de84e48d 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 82622b0f687e16..3f0670d9fa276a 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 77ff1e8d482d65..61e1945c22ef96 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 00d4c368ba0286..0f66c4bd431761 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 deef3ca36669e5..b17afed7b99df7 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 d473d212ce1024..599d70f03c4317 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/GacInstalled.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/GacInstalled.cs index ed882541911115..f6565fbf791617 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 9d23820f78962b..f519bf2c06c2da 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/PolicyLevel.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyLevel.cs index 44f98aea4b33a3..539a8cd89fa1ec 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 @@ -19,18 +19,18 @@ 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 +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public void AddNamedPermissionSet(NamedPermissionSet permSet) { } -#if NET5_0_OR_GREATER +#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.")] public static PolicyLevel CreateAppDomainLevel() { return default(PolicyLevel); } public void FromXml(SecurityElement e) { } -#if NET5_0_OR_GREATER +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet GetNamedPermissionSet(string name) { return default(NamedPermissionSet); } @@ -39,11 +39,11 @@ 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 +#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 +#if NETCOREAPP [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet RemoveNamedPermissionSet(string name) { return default(NamedPermissionSet); } 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 e6cacb311c6717..70c245d1a5231a 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,11 +5,11 @@ 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) { } 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 ea183fc3edda5c..82d4a4c014ac61 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 79fe42517c6542..e257cb4d44f126 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 783766b541c949..7f9521026ed3fc 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 c8f7ec64abc2f1..e7fa159370023c 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/Url.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Url.cs index 43f676bb49bf07..a108d3691fb56b 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 29b9f453344bc6..2e08fd3e3a0f01 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 be8e30d3f397b0..1ee1b1d5e60a92 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 bcbb46632abfe2..039bcc49a05f36 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 25be73f3509cfb..c049d1e6704697 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 6d3f87b0769fb9..2acc123ca6ee39 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 a9eca272264d6a..0905e0f5b7bd23 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 24ba7be14863c4..cf17caabf319bf 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 4e0ffd38beb7b5..ac51b6530d0b5e 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 c6cf9d50f3c4bd..7b58322568d19a 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 898716aefd7cd8..84e13bd45dc9b2 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.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 afaf22888d0810..56fc2b77a93872 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 decf0cce12d033..2bc00e06d08e57 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 f211939119505b..d76eff14de69ca 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 7b47f436b16714..d7eb61b2b84694 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 @@ -336,7 +336,7 @@ internal bool TryWrite(Utf8JsonWriter writer, in T value, JsonSerializerOptions bool ignoreCyclesPopReference = false; 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 @@ -440,7 +440,7 @@ internal bool TryWrite(Utf8JsonWriter writer, in T value, JsonSerializerOptions VerifyWrite(originalPropertyDepth, writer); if ( -#if NET5_0_OR_GREATER +#if NETCOREAPP // Short-circuit the check against ignoreCyclesPopReference; treated as a constant by recent versions of the JIT. !typeof(T).IsValueType && #endif 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 1b28d169285737..8d7f3da15d5c39 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/tests/System.Text.Json.Tests/JsonTestHelper.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs index d30e62a6b7a45c..3feeb33dd8be0f 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 From ae67de838e59a104494bab7d3c8451d20dc612fe Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 24 Feb 2022 12:45:51 +0100 Subject: [PATCH 2/7] 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. --- eng/DefaultGenApiDocIds.txt | 1 - .../InteropServices/Marshal.CoreCLR.cs | 19 ++++++++++++ .../src/System/RuntimeType.CoreCLR.cs | 4 +++ .../src/System/Variant.cs | 4 +++ .../src/System/Reflection/Assembly.CoreRT.cs | 2 +- .../Runtime/InteropServices/Marshal.Com.cs | 2 ++ .../Runtime/InteropServices/Marshal.CoreRT.cs | 19 ++++++++++++ .../src/System/Threading/Overlapped.cs | 6 ++-- .../src/System/Threading/ThreadPool.CoreRT.cs | 2 +- .../Common/src/System/Obsoletions.cs | 3 +- .../CompilerServices/Conversions.vb | 2 +- .../CompilerServices/NewLateBinding.vb | 16 +++++----- .../CompilerServices/Operators.Resolution.vb | 2 +- .../System.ComponentModel.TypeConverter.cs | 3 ++ .../RootDesignerSerializerAttribute.cs | 2 +- .../Configuration/ConfigurationException.cs | 2 +- .../ref/System.Data.OleDb.cs | 2 ++ .../Diagnostics/SymbolStore/ISymbolBinder.cs | 2 +- .../src/System/Drawing/Graphics.Unix.cs | 1 + .../ref/System.IO.Pipes.Forwards.cs | 0 .../ref/System.IO.Pipes.Internal.cs | 20 ------------- .../System.Net.Http/ref/System.Net.Http.cs | 2 +- .../NetworkAddressChange.UnknownUnix.cs | 9 +++++- .../NetworkAddressChange.cs | 7 +++++ .../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 +- .../InteropServices/CurrencyWrapper.cs | 4 +++ .../System/Runtime/InteropServices/Marshal.cs | 7 +++++ .../src/System/String.cs | 1 + .../src/System/Threading/Thread.cs | 2 +- .../System.Private.Uri/src/System/Uri.cs | 2 +- .../src/System/Xml/Schema/XmlSchema.cs | 4 +-- .../System.Runtime/ref/System.Runtime.cs | 14 ++++----- .../ref/System.Security.Cryptography.cs | 11 +++---- .../ref/System.Security.Cryptography.csproj | 2 ++ .../RC2CryptoServiceProvider.NotSupported.cs | 1 + .../RC2CryptoServiceProvider.Unix.cs | 1 + .../ref/System.Security.Permissions.cs | 10 +++---- .../Data/Odbc/OdbcPermissionAttribute.cs | 3 ++ .../Data/OleDb/OleDbPermissionAttribute.cs | 3 ++ .../SqlClient/SqlClientPermissionAttribute.cs | 3 ++ .../Security/Policy/FirstMatchCodeGroup.cs | 2 +- .../Policy/PermissionRequestEvidence.cs | 2 +- .../src/System/Security/Policy/PolicyLevel.cs | 15 +++++----- .../System/Security/Policy/PolicyStatement.cs | 3 ++ .../System/Security/Policy/UnionCodeGroup.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 | 30 ++++++++++++------- .../src/System/Threading/ThreadPool.Mono.cs | 2 +- 65 files changed, 222 insertions(+), 109 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 43401c67277d14..501e09560e1556 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -55,4 +55,3 @@ 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/Marshal.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs index 203ad5ae3931c0..0b7a3294fb1003 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; @@ -48,21 +49,29 @@ 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.")] 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.")] 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.")] 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.")] public static long ReadInt64([MarshalAs(UnmanagedType.AsAny), In] object ptr, int ofs) { return ReadValueSlow(ptr, ofs, (IntPtr nativeHome, int offset) => ReadInt64(nativeHome, offset)); @@ -102,21 +111,29 @@ 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.")] 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.")] 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.")] public static void WriteInt64(object ptr, int ofs, long val) { WriteValueSlow(ptr, ofs, val, (IntPtr nativeHome, int offset, long value) => Marshal.WriteInt64(nativeHome, offset, value)); @@ -193,6 +210,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(); 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 3ea1496468ffd6..82acbcdb354b68 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 8d2c55444072d4..d43f0983937493 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 d42d16e742ffdc..fd1e3e899fd7a0 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/Marshal.Com.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs index a7588ee047d5c4..96e9874bf86fa3 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 @@ -188,9 +188,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; 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 b15d63444af4fb..c7023eaa9ebc4f 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; @@ -206,6 +207,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 +221,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 +306,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 df86052ba3d23a..2c34e68fb5a789 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 06666525d3e34e..4d4e661160eb4e 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 d8800db97a5106..6330a9f45a8d6b 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/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb index 4510144ebca2b2..03de5ecac8ed3f 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 e1ba2ce3dd9535..de0bde5e73a2f0 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 8ad6f33e055077..9c4d4bcf96fa61 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/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index 8fe3c9a37f8217..fc40220742e1ed 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; 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 c22454c9d84b66..5063f826b00898 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 ccac0ebb39f58d..775c1fdb291dcb 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 a29a00d7a6af57..62d49985cc1389 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -386,6 +386,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 86ce49c7dcc1be..162df87f6d6a76 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.Drawing.Common/src/System/Drawing/Graphics.Unix.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs index ca39a068153ff7..b00cb16f937ac4 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,6 +540,7 @@ public RectangleF VisibleClipBounds } [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete(Obsoletions.GetContextInfoMessage, DiagnosticId = Obsoletions.GetContextInfoDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [SupportedOSPlatform("windows")] public object GetContextInfo() { 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 e69de29bb2d1d6..00000000000000 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 019733fca92603..00000000000000 --- 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 NETCOREAPP - public static class AnonymousPipeServerStreamAcl { } - public static class NamedPipeServerStreamAcl { } -#endif -} \ No newline at end of file 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 0f63c2badb27ba..a7710b0e5d35f4 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.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs index 84482c14f7b567..9b799ee36e023c 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 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 0683434b9dffd1..c878eb555bc718 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,6 +23,12 @@ 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 [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 dfb74303572813..825698e157c179 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 c96739075619f1..40c65dfe8c3c5e 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 d02ef40fd17e68..1a2009c75f5449 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 733646d4de2062..9c140d97569305 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 a8d1651502b7c7..824cd2ba09d282 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 bd9df29bfaa250..46f1dad764929e 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 b0cbbc498a7f7a..8f43fabf1e5667 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 a7feb7b1366aef..1db05bfbae6010 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/Runtime/InteropServices/CurrencyWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CurrencyWrapper.cs index 33f81eb9c6ad29..978af3d649e9ee 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/Marshal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs index c6dea8edb62676..52cce587b1ece5 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; @@ -340,6 +341,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 +430,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 +470,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 diff --git a/src/libraries/System.Private.CoreLib/src/System/String.cs b/src/libraries/System.Private.CoreLib/src/System/String.cs index 624600bf398012..26cbba500877dc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/String.cs +++ b/src/libraries/System.Private.CoreLib/src/System/String.cs @@ -364,6 +364,7 @@ public object Clone() return this; } + [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 ad062d66024d5a..df1e7a541fbecd 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 abbd4e5ace6959..84d74e9a43dc1e 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 b305f688fbd3f0..f4f1595c758ee0 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.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 6be551c0df9cb0..92c9d66cf34d1e 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; } @@ -7764,9 +7764,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; } @@ -7786,7 +7786,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; } @@ -8361,7 +8361,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) { } @@ -10818,7 +10818,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) { } @@ -14228,7 +14228,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() { } 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 e07748b754ef9e..ab98152e3398d4 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 27dbb3a844b324..3020364482b9e8 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/RC2CryptoServiceProvider.NotSupported.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs index 4fc7781d189b58..11b9b6b5ee71a5 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 @@ -6,6 +6,7 @@ namespace System.Security.Cryptography { + [Obsolete(Obsoletions.DerivedCryptographicTypesMessage, DiagnosticId = Obsoletions.DerivedCryptographicTypesDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] 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 72e06ca794655a..d8a75b4b23fed7 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 @@ -5,6 +5,7 @@ namespace System.Security.Cryptography { + [Obsolete(Obsoletions.DerivedCryptographicTypesMessage, DiagnosticId = Obsoletions.DerivedCryptographicTypesDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] 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 be4c35c5bcdaf0..ffc73f82cccaa6 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -2079,16 +2079,16 @@ 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 NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] @@ -2106,9 +2106,9 @@ public void FromXml(System.Security.SecurityElement e) { } #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 NETCOREAPP [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] 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 08bb06d32dab4f..c6286aa49ba751 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/OleDbPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/OleDb/OleDbPermissionAttribute.cs index 2c75bd9f0ec45c..c4e0aca2d7a287 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/SqlClient/SqlClientPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/Data/SqlClient/SqlClientPermissionAttribute.cs index 249d8d33556c39..0979d37e899ff9 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/Security/Policy/FirstMatchCodeGroup.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/FirstMatchCodeGroup.cs index 3fe029b46e4cab..e93de3604a79f6 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/PermissionRequestEvidence.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PermissionRequestEvidence.cs index 3c4f4278979ebe..1ff723876a95a2 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 539a8cd89fa1ec..74afa9599191c4 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; } @@ -20,18 +19,18 @@ 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 NETCOREAPP - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public void AddNamedPermissionSet(NamedPermissionSet permSet) { } #if NETCOREAPP - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [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 NETCOREAPP - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet GetNamedPermissionSet(string name) { return default(NamedPermissionSet); } public void Recover() { } @@ -40,11 +39,11 @@ 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 NETCOREAPP - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] #endif public NamedPermissionSet RemoveNamedPermissionSet(NamedPermissionSet permSet) { return default(NamedPermissionSet); } #if NETCOREAPP - [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [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 70c245d1a5231a..d94b4ebaec305d 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 @@ -15,6 +15,9 @@ public PolicyStatement(PermissionSet permSet) { } 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/UnionCodeGroup.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/UnionCodeGroup.cs index e3def2b7db291d..f5fa6cc4011820 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.Web.HttpUtility/ref/System.Web.HttpUtility.cs b/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.cs index a70d45b1c39e68..20861705d61fb8 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 2f03ff684a174e..6f3f8be18def5f 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 00000000000000..8af0e4658712f5 --- /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 63f02a0f817ef2..7caec2b318208c 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 d894d797c2f46d..ab939d140139a7 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 fbbd7eb46e6f7a..8a41d9e0758ab9 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 aa8f28fe4562b5..00000000000000 --- 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 6d4156e41f437b..a47da677832d55 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 e59446b10a0d4e..ca8e66fc9c2eff 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 14989a5fedb72c..e27a9c77dc9ccf 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 { @@ -187,57 +188,66 @@ 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.")] 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.")] 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.")] 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.")] 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.")] 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.")] 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.")] 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.")] 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 067b1970718686..260dfee24f3e67 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) { From f16a2a1ac9ba9821c08c0a4b6116f6deb6ea52f9 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 24 Feb 2022 15:11:33 +0100 Subject: [PATCH 3/7] 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. --- eng/DefaultGenApiDocIds.txt | 3 -- .../InteropServices/ComEventsHelper.cs | 2 ++ .../InteropServices/Marshal.CoreCLR.cs | 13 +++++++++ .../InteropServices/ComEventsHelper.CoreRT.cs | 2 ++ .../Runtime/InteropServices/Marshal.Com.cs | 11 +++++++ .../Runtime/InteropServices/Marshal.CoreRT.cs | 3 ++ .../VisualBasic/FileIO/TextFieldParser.vb | 1 + .../System.ComponentModel.TypeConverter.cs | 29 +++++++++++++++++++ .../ref/System.Data.OleDb.cs | 5 ++++ ...tem.DirectoryServices.AccountManagement.cs | 4 +++ .../ref/System.Drawing.Common.netcoreapp.cs | 2 ++ .../ref/System.Linq.Expressions.cs | 1 + .../ref/System.Net.HttpListener.cs | 1 + .../NetworkAddressChange.UnknownUnix.cs | 1 + .../NetworkAddressChange.cs | 1 + .../MissingManifestResourceException.cs | 2 ++ .../NeutralResourcesLanguageAttribute.cs | 3 ++ .../src/System/Resources/ResourceManager.cs | 2 ++ .../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 ++ .../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 | 7 +++++ .../Runtime/InteropServices/UnknownWrapper.cs | 3 ++ .../System/Runtime/InteropServices/VarEnum.cs | 3 ++ .../Runtime/InteropServices/VariantWrapper.cs | 3 ++ .../src/System/String.cs | 2 ++ .../Xml/Serialization/IXmlSerializable.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 | 2 ++ .../Security/Cryptography/Pkcs/CmsSigner.cs | 2 ++ .../Security/Cryptography/Pkcs/SignedCms.cs | 2 ++ .../Security/Cryptography/Pkcs/SignerInfo.cs | 2 ++ .../RC2CryptoServiceProvider.NotSupported.cs | 2 ++ .../RC2CryptoServiceProvider.Unix.cs | 2 ++ .../src/AudioFormat/SpeechAudioFormatInfo.cs | 2 +- .../System.Speech/src/Recognition/Grammar.cs | 8 ++--- .../src/Synthesis/PromptBuilder.cs | 3 +- .../System.Text.Json/ref/System.Text.Json.cs | 1 + .../Metadata/JsonPropertyInfoValuesOfT.cs | 3 ++ .../Runtime/InteropServices/Marshal.Mono.cs | 3 ++ 75 files changed, 279 insertions(+), 10 deletions(-) diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index 501e09560e1556..f1690b0672b23f 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -52,6 +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 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 93fd276b9d2696..ef0e80bde52a7b 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 0b7a3294fb1003..7fc48fdc706e99 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 @@ -29,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); @@ -221,6 +222,7 @@ private static void PrelinkCore(MethodInfo m) /// true, this routine will call DestroyStructure() first. /// [MethodImpl(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld); /// @@ -234,6 +236,7 @@ private static void PrelinkCore(MethodInfo m) /// "structuretype" is used to provide layout information. /// [MethodImpl(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void DestroyStructure(IntPtr ptr, Type structuretype); [MethodImpl(MethodImplOptions.InternalCall)] @@ -336,6 +339,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); @@ -350,6 +354,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); @@ -399,6 +404,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) @@ -539,6 +545,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) { @@ -612,6 +619,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) @@ -626,6 +634,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) @@ -637,6 +646,7 @@ public static void GetNativeVariantForObject(T? obj, IntPtr pDstNativeVariant } [SupportedOSPlatform("windows")] + [EditorBrowsable(EditorBrowsableState.Never)] public static object? GetObjectForNativeVariant(/* VARIANT * */ IntPtr pSrcNativeVariant) { if (!IsBuiltInComSupported) @@ -651,6 +661,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) @@ -662,6 +673,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) @@ -676,6 +688,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/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 2ae1a795dc1f20..61d618f08d2bda 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 96e9874bf86fa3..12666933852d5d 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) @@ -287,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); @@ -305,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) @@ -353,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 c7023eaa9ebc4f..53c8f5dc06fca5 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 @@ -20,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) @@ -87,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) @@ -124,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) 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 d97358dcd5a5b3..ac5417f3c4ec66 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.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index fc40220742e1ed..8d60f631894fb4 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -1387,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; } @@ -1405,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; } @@ -1449,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.")] @@ -1464,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.Data.OleDb/ref/System.Data.OleDb.cs b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs index 62d49985cc1389..fb65b3f7120752 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) { } 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 d64ef98f18e385..3b9228be10af88 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 1514ee19e8c331..ca758378627971 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.Linq.Expressions/ref/System.Linq.Expressions.cs b/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.cs index 3407083dfed377..98bfd460ddb960 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.HttpListener/ref/System.Net.HttpListener.cs b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs index a42aa2a95c0362..4f5c4629c08634 100644 --- a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs +++ b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs @@ -47,6 +47,7 @@ internal HttpListenerContext() { } public System.Security.Principal.IPrincipal? User { get { throw null; } } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol) { throw null; } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval, System.ArraySegment internalBuffer) { throw null; } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, System.TimeSpan keepAliveInterval) { throw null; } } 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 9b799ee36e023c..bc0df09d18ac7c 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 @@ -32,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 c878eb555bc718..62be5501b88dda 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 @@ -30,6 +30,7 @@ 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.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs index 3aebc367086bcb..b99dd7b3e26421 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 134dc0a721e3be..bec4cdc06db093 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/ResourceManager.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs index 2c7ca1dddebdbc..8575e360d8e99a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.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.Diagnostics.CodeAnalysis; using System.Globalization; @@ -90,6 +91,7 @@ namespace System.Resources // is one such example. // + [EditorBrowsable(EditorBrowsableState.Never)] public partial class ResourceManager { internal sealed class CultureNameResourceSetPair 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 d1b073405abaf7..f68c2c317cd869 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 aa4e0454320c59..1e3ec2032f2b84 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 a23c62dac035ac..fbf7b5e9683c5d 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 394aa67d4df586..7483b6209632f9 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 3ad4f74379c5e1..286ee2422ea475 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 a9d5af110d964e..e63f494c487228 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 891a264b9929aa..d1fff27d40e5b7 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 8bb6c52ed9ddab..bb4a334762a479 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 203b61c1552621..319a9db6b56763 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 9148f974de1721..f83e9e9a754025 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 3fc47a2197911d..5a2964e510da7f 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 7fc43143143782..20c47e1e96ce1d 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 adc08c40f8a514..b095d1d730cd90 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 22ed65f01f031e..c60c49570b8663 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 7c56b45a095145..73eee8da79ef36 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 e43d9011ad56c0..935d930354a55d 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 e799b94b0c0e48..365a4ca5795f4e 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 2f5769c0e851a7..d4568567dd8160 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 ca7ae80322285e..51b541064d6ea9 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 c809b580403abc..a3611e9085fb5d 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 472f096e028f65..539a9195e09424 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 bc83e1020a51c6..da3dd8411a50a4 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/CustomQueryInterfaceMode.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs index f29d16231af375..388e82db45be0b 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 d1edd75c4f947e..753f441e42b13c 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 599830febf7012..feb8ba7d653197 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 862f3c9d7fed27..8040b7eb222d79 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 27e99a8f6adedc..6aaf71985e7c39 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 974571ebf56f9d..f6460fdc02d97c 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 492a3620606a55..a4111396b053d5 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 52cce587b1ece5..870a1d426e0b3f 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 @@ -95,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); @@ -106,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) @@ -161,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)); @@ -536,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!!) @@ -563,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); @@ -1106,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); @@ -1151,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 cd808314546659..26bd5473804ba3 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 bc4bcd38e2c84b..334b0f26991721 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 5758946eacc768..96210a7dd4f302 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 26cbba500877dc..2183d5e59befeb 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,7 @@ 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!!) { 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 afa8dfe5eaf92d..bf007efb2d384e 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.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs index 56e40befcb1d82..50fbb3bb523e6f 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 12cf6f17549cea..f8a44d0a9e86bf 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 3b1108ccf9fd02..0bccff73c17025 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 3f0e502832d300..0fd0d6c2de4a29 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 a02b3b781baa82..10a8b4ab3ca77d 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 779af3bc502e04..ebbf659cf7170c 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 507950af9831aa..1193b7a1a8a63f 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 5276dbb26bacf2..56bd1523205e70 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 a625adc8236c0e..d4c1ad5fc75ced 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 4c0252d6415ad4..7b5d9686daab77 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 92c9d66cf34d1e..bd25e3313ce6fc 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -14818,6 +14818,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 { @@ -14841,6 +14842,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/src/System/Security/Cryptography/Pkcs/CmsSigner.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs index 458eb02de80945..f636bcd9982329 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; @@ -75,6 +76,7 @@ public CmsSigner(X509Certificate2? certificate) #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 f986f3d607b4b6..1aa378e114048a 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; @@ -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 046a8178b08fed..144a6e8e554f2f 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; @@ -294,6 +295,7 @@ private SignerInfoCollection GetCounterSigners(AttributeAsn[] unsignedAttrs) #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/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.NotSupported.cs index 11b9b6b5ee71a5..1c5dcb868862e7 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,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.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 d8a75b4b23fed7..48249794084591 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,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.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.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs b/src/libraries/System.Speech/src/AudioFormat/SpeechAudioFormatInfo.cs index d107b9bf340e71..d977df8d4b5a16 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 1aa35512db8ce4..9166d026c5aa92 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 8f5913b281603a..9f4b56d5121bc5 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.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index 2bae8025f0ca02..a2beffc884da08 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -890,6 +890,7 @@ public JsonSerializableAttribute(System.Type type) { } public string? TypeInfoPropertyName { get { throw null; } set { } } public System.Text.Json.Serialization.JsonSourceGenerationMode GenerationMode { get { throw null; } set { } } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public abstract partial class JsonSerializerContext { protected JsonSerializerContext(System.Text.Json.JsonSerializerOptions? options) { } 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 ed7fffe7124c7b..624879e4690518 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/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 e27a9c77dc9ccf..aa39806d29db7d 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 @@ -31,12 +31,15 @@ public partial class Marshal public static extern void SetLastPInvokeError(int error); [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); [MethodImplAttribute(MethodImplOptions.InternalCall)] + [EditorBrowsable(EditorBrowsableState.Never)] public static extern void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld); [MethodImplAttribute(MethodImplOptions.InternalCall)] From 4f06505528382d93bcd1935f6a4baf91eba9d48f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 28 Feb 2022 21:46:35 +0100 Subject: [PATCH 4/7] HttpListenerContext pr feedback --- .../System.Net.HttpListener/ref/System.Net.HttpListener.cs | 1 - .../src/System/Net/Managed/HttpListenerContext.Managed.cs | 1 - .../src/System/Net/Windows/HttpListenerContext.Windows.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs index 4f5c4629c08634..a42aa2a95c0362 100644 --- a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs +++ b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs @@ -47,7 +47,6 @@ internal HttpListenerContext() { } public System.Security.Principal.IPrincipal? User { get { throw null; } } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol) { throw null; } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval, System.ArraySegment internalBuffer) { throw null; } public System.Threading.Tasks.Task AcceptWebSocketAsync(string? subProtocol, System.TimeSpan keepAliveInterval) { throw null; } } 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 c5cc376f02b0ff..1edd250362c0bd 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 a253c75f0cd6e4..f35ff98fc2e920 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, From 9b8ce3fda6b2a4edc615937b28cfe2dd73d03b61 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 1 Mar 2022 08:47:07 +0100 Subject: [PATCH 5/7] ResourceManager pr feedback --- .../src/System/Resources/ResourceManager.cs | 2 -- src/libraries/System.Runtime/ref/System.Runtime.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs index 8575e360d8e99a..2c7ca1dddebdbc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -91,7 +90,6 @@ namespace System.Resources // is one such example. // - [EditorBrowsable(EditorBrowsableState.Never)] public partial class ResourceManager { internal sealed class CultureNameResourceSetPair diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index bd25e3313ce6fc..7ccf1fbafd3e54 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -12572,7 +12572,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; From 39e07a7259b2b2da48130f45ba6aed1786af7862 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 1 Mar 2022 08:47:13 +0100 Subject: [PATCH 6/7] Json PR feedback --- src/libraries/System.Text.Json/ref/System.Text.Json.cs | 1 - .../src/System/Text/Json/Serialization/JsonSerializerContext.cs | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index a2beffc884da08..2bae8025f0ca02 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -890,7 +890,6 @@ public JsonSerializableAttribute(System.Type type) { } public string? TypeInfoPropertyName { get { throw null; } set { } } public System.Text.Json.Serialization.JsonSourceGenerationMode GenerationMode { get { throw null; } set { } } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public abstract partial class JsonSerializerContext { protected JsonSerializerContext(System.Text.Json.JsonSerializerOptions? options) { } 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 7254cd6f2cf09e..ca4c2bf07f712f 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; From 15873bbc526ac7e74aa3c89e000508792fc1738e Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 1 Mar 2022 09:52:07 +0100 Subject: [PATCH 7/7] Fix cryptography PNSE build --- .../src/System.Security.Cryptography.csproj | 2 ++ 1 file changed, 2 insertions(+) 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 2178be6940e761..2f68524baffb3d 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