From e7e75e4f44bf731616380d40757204e0af80fd7a Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Tue, 14 Mar 2023 15:28:18 -0700 Subject: [PATCH 1/7] More BinaryFormatter obsoletions - Move some SYSLIB0011 obsoletions to type level - Next wave of formatter obsoletions (SYSLIB0049) - Remove dead code --- Directory.Build.props | 4 +- docs/project/list-of-diagnostics.md | 1 + .../EmptyReadOnlyDictionaryInternal.cs | 12 -- .../src/System/Exception.CoreCLR.cs | 2 + .../Reflection/RuntimeCustomAttributeData.cs | 8 + .../Runtime/FieldInfos/RuntimeFieldInfo.cs | 2 + .../Runtime/TypeInfos/RuntimeArrayTypeInfo.cs | 6 +- .../Runtime/TypeInfos/RuntimeNamedTypeInfo.cs | 2 + .../Common/src/System/Obsoletions.cs | 3 + src/libraries/Common/tests/System/MockType.cs | 3 + .../DesigntimeLicenseContextSerializer.cs | 2 +- .../src/System/Data/DataSet.cs | 8 +- ....Private.CoreLib.ManualShimTypeForwards.cs | 1 + .../src/Resources/Strings.resx | 3 - .../src/System/DBNull.cs | 2 + .../src/System/Reflection/FieldAttributes.cs | 1 + .../src/System/Reflection/FieldInfo.cs | 1 + .../src/System/Reflection/ParameterInfo.cs | 8 +- .../src/System/Reflection/SignatureType.cs | 1 + .../src/System/Reflection/TypeAttributes.cs | 1 + .../Serialization/IFormatterConverter.cs | 1 + .../Runtime/Serialization/IObjectReference.cs | 1 + .../Serialization/ISafeSerializationData.cs | 198 +----------------- .../Runtime/Serialization/ISerializable.cs | 1 + .../SafeSerializationEventArgs.cs | 1 + .../Serialization/SerializationInfo.cs | 4 + .../Runtime/Serialization/StreamingContext.cs | 7 + .../src/System/Text/Encoding.cs | 10 +- .../src/System/Type.Helpers.cs | 3 + .../src/System/UnitySerializationHolder.cs | 1 + ...m.Private.DataContractSerialization.csproj | 1 - .../Serialization/ClassDataContract.cs | 8 + .../Serialization/CollectionDataContract.cs | 8 + .../Runtime/Serialization/DataContract.cs | 7 +- .../Runtime/Serialization/DataContractSet.cs | 5 +- .../Runtime/Serialization/EnumDataContract.cs | 2 + .../System/Runtime/Serialization/Globals.cs | 2 + ...lObjectSerializerReadContextComplexJson.cs | 2 + ...ObjectSerializerWriteContextComplexJson.cs | 4 + .../Runtime/Serialization/ReflectionReader.cs | 2 + .../Serialization/SurrogateDataContract.cs | 106 ---------- .../Serialization/XmlObjectSerializer.cs | 2 + .../XmlObjectSerializerContext.cs | 2 + .../XmlObjectSerializerReadContext.cs | 6 +- .../XmlObjectSerializerWriteContext.cs | 4 + .../Context/Delegation/DelegatingType.cs | 3 + .../TypeLoading/Types/RoArrayType.cs | 2 + .../Extensions/DeserializingResourceReader.cs | 4 + .../Directory.Build.props | 2 + ...System.Runtime.Serialization.Formatters.cs | 21 +- .../System/Runtime/Serialization/Formatter.cs | 3 +- .../Serialization/FormatterConverter.cs | 1 + .../Serialization/FormatterServices.cs | 1 + .../Formatters/Binary/BinaryFormatter.Core.cs | 2 - .../BinaryFormatter.PlatformNotSupported.cs | 2 - .../Formatters/Binary/BinaryFormatter.cs | 1 + .../Serialization/Formatters/CommonEnums.cs | 3 + .../Serialization/Formatters/IFieldInfo.cs | 1 + .../Runtime/Serialization/IFormatter.cs | 3 +- .../Serialization/ISerializationSurrogate.cs | 1 + .../Serialization/ISurrogateSelector.cs | 1 + .../Serialization/ObjectIDGenerator.cs | 1 + .../Runtime/Serialization/ObjectManager.cs | 1 + .../SerializationObjectManager.cs | 1 + .../Serialization/SurrogateSelector.cs | 1 + .../System.Runtime/ref/System.Runtime.cs | 20 +- .../src/Result/RecognitionResult.cs | 5 + .../Transactions/NonWindowsUnsupported.cs | 5 +- .../Transactions/Oletx/OletxTransaction.cs | 9 +- .../src/System/Reflection/CustomAttribute.cs | 8 + .../Emit/RuntimeFieldBuilder.Mono.cs | 2 + .../Emit/RuntimeTypeBuilder.Mono.cs | 2 + .../src/System/Reflection/FieldInfo.Mono.cs | 8 + 73 files changed, 218 insertions(+), 355 deletions(-) delete mode 100644 src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SurrogateDataContract.cs diff --git a/Directory.Build.props b/Directory.Build.props index 7eb57c38fc8a22..55f6cfef5e749a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -441,8 +441,8 @@ - - $(NoWarn);SYSLIB0011 + + $(NoWarn);SYSLIB0011;SYSLIB0049 $(NoWarn);IL2121 diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 69337b6ffccd24..5c196c912766eb 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -104,6 +104,7 @@ The PR that reveals the implementation of the ` CustomAttributes } FieldAttributes attributes = Attributes; +#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete if (0 != (attributes & FieldAttributes.NotSerialized)) { yield return new RuntimePseudoCustomAttributeData(typeof(NonSerializedAttribute), null); } +#pragma warning restore SYSLIB0049 } } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs index f46dd9aa16f4c2..e873c11c59196f 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs @@ -40,7 +40,11 @@ public sealed override int GetArrayRank() protected sealed override TypeAttributes GetAttributeFlagsImpl() { - return TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; + TypeAttributes attrs = TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed; +#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete + attrs |= TypeAttributes.Serializable; +#pragma warning restore SYSLIB0049 + return attrs; } internal sealed override IEnumerable SyntheticConstructors diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs index 4e96a263cc0c50..c3b6fbeabed0e8 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs @@ -42,8 +42,10 @@ public sealed override IEnumerable CustomAttributes if (0 != (attributes & TypeAttributes.Import)) yield return new RuntimePseudoCustomAttributeData(typeof(ComImportAttribute), null); +#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete if (0 != (attributes & TypeAttributes.Serializable)) yield return new RuntimePseudoCustomAttributeData(typeof(SerializableAttribute), null); +#pragma warning restore SYSLIB0049 } } diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index a787b2ffaeb4c5..ae001006a807da 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -159,5 +159,8 @@ internal static class Obsoletions internal const string JsonSerializerOptionsAddContextMessage = "JsonSerializerOptions.AddContext is obsolete. To register a JsonSerializerContext, use either the TypeInfoResolver or TypeInfoResolverChain properties."; internal const string JsonSerializerOptionsAddContextDiagId = "SYSLIB0049"; + + internal const string LegacyFormatterMessage = "Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."; + internal const string LegacyFormatterDiagId = "SYSLIB0049"; } } diff --git a/src/libraries/Common/tests/System/MockType.cs b/src/libraries/Common/tests/System/MockType.cs index 9ccc29bf948e98..4a5f04b0777361 100644 --- a/src/libraries/Common/tests/System/MockType.cs +++ b/src/libraries/Common/tests/System/MockType.cs @@ -86,6 +86,9 @@ internal class MockType : Type public override bool IsSecurityCritical => throw Unexpected; public override bool IsSecuritySafeCritical => throw Unexpected; public override bool IsSecurityTransparent => throw Unexpected; +#if NET8_0_OR_GREATER + [Obsolete("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] +#endif public override bool IsSerializable => throw Unexpected; public override bool IsSubclassOf(Type c) => throw Unexpected; protected override bool IsValueTypeImpl() => throw Unexpected; diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs index 179b41324198d1..8fad86404e5352 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs @@ -52,9 +52,9 @@ public static void Serialize(Stream o, string cryptoKey, DesigntimeLicenseContex private static void SerializeWithBinaryFormatter(Stream o, string cryptoKey, DesigntimeLicenseContext context) { - var formatter = new BinaryFormatter(); #pragma warning disable SYSLIB0011 #pragma warning disable IL2026 // suppressed in ILLink.Suppressions.LibraryBuild.xml + var formatter = new BinaryFormatter(); formatter.Serialize(o, new object[] { cryptoKey, context._savedLicenseKeys }); #pragma warning restore IL2026 #pragma warning restore SYSLIB0011 diff --git a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs index 66ba6a7950da75..5da8f73b5edcef 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -338,10 +338,12 @@ private void SerializeDataSet(SerializationInfo info, StreamingContext context, //Tables, Columns, Rows for (int i = 0; i < Tables.Count; i++) { - BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); MemoryStream memStream = new MemoryStream(); #pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter +#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete + BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); bf.Serialize(memStream, Tables[i]); +#pragma warning restore SYSLIB0049 #pragma warning restore SYSLIB0011 memStream.Position = 0; info.AddValue(string.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", i), memStream.GetBuffer()); @@ -421,9 +423,11 @@ private void DeserializeDataSetSchema(SerializationInfo info, StreamingContext c byte[] buffer = (byte[])info.GetValue(string.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", i), typeof(byte[]))!; MemoryStream memStream = new MemoryStream(buffer); memStream.Position = 0; - BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); #pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter +#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete + BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); DataTable dt = (DataTable)bf.Deserialize(memStream); +#pragma warning restore SYSLIB0049 #pragma warning restore SYSLIB0011 Tables.Add(dt); } diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs index 504e6898bb2f91..6c35380a4f729a 100644 --- a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs +++ b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs @@ -25,6 +25,7 @@ internal OrdinalComparer() { } public override int GetHashCode() { throw null; } public override int GetHashCode(string obj) { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class UnitySerializationHolder : System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable { public UnitySerializationHolder(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx index ee3a1e1bff862a..9c9ec951daad69 100644 --- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx +++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx @@ -1447,9 +1447,6 @@ The specified opcode cannot be passed to EmitCall. - - Argument passed in is not serializable. - Uninitialized Strings cannot be created. diff --git a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs b/src/libraries/System.Private.CoreLib/src/System/DBNull.cs index 41d56a6ce12282..9f2f17c5043629 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DBNull.cs @@ -21,7 +21,9 @@ private DBNull(SerializationInfo info, StreamingContext context) public void GetObjectData(SerializationInfo info, StreamingContext context) { +#pragma warning disable SYSLIB0049 // UnitySerializationHolder is obsolete UnitySerializationHolder.GetUnitySerializationInfo(info, UnitySerializationHolder.NullUnity); +#pragma warning restore SYSLIB0049 } public override string ToString() diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldAttributes.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldAttributes.cs index f4296883de19c9..1af46410e02e26 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldAttributes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldAttributes.cs @@ -22,6 +22,7 @@ public enum FieldAttributes Static = 0x0010, // Defined on type, else per instance. InitOnly = 0x0020, // Field may only be initialized, not written to after init. Literal = 0x0040, // Value is compile time constant. + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] NotSerialized = 0x0080, // Field does not have to be serialized when type is remoted. SpecialName = 0x0200, // field is special. Name describes how. diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldInfo.cs index a544be89c423ed..374c0ba5aeeb13 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/FieldInfo.cs @@ -18,6 +18,7 @@ protected FieldInfo() { } public bool IsInitOnly => (Attributes & FieldAttributes.InitOnly) != 0; public bool IsLiteral => (Attributes & FieldAttributes.Literal) != 0; + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public bool IsNotSerialized => (Attributes & FieldAttributes.NotSerialized) != 0; public bool IsPinvokeImpl => (Attributes & FieldAttributes.PinvokeImpl) != 0; public bool IsSpecialName => (Attributes & FieldAttributes.SpecialName) != 0; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs index 5a92ca202fc878..7f8cf8108c085e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs @@ -2,11 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Reflection { - public class ParameterInfo : ICustomAttributeProvider, IObjectReference + public class ParameterInfo : ICustomAttributeProvider +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SA1001 // CommasMustBeSpacedCorrectly + , IObjectReference +#pragma warning restore SA1001 +#pragma warning restore SYSLIB0049 { protected ParameterInfo() { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureType.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureType.cs index e1dedc841bd5bd..2d85c4ea0a5ef1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureType.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureType.cs @@ -195,6 +195,7 @@ public sealed override Type MakeArrayType(int rank) public sealed override bool IsSecurityCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSecuritySafeCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSecurityTransparent => throw new NotSupportedException(SR.NotSupported_SignatureType); + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public sealed override bool IsSerializable => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsValueTypeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/TypeAttributes.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/TypeAttributes.cs index 894c4553155ca0..245cba7b13bf8e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/TypeAttributes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/TypeAttributes.cs @@ -37,6 +37,7 @@ public enum TypeAttributes // Implementation attributes. Import = 0x00001000, // Class / interface is imported + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] Serializable = 0x00002000, // The class is Serializable. WindowsRuntime = 0x00004000, // Type is a Windows Runtime type. diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IFormatterConverter.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IFormatterConverter.cs index f590627592f6dc..57230621e6bdc6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IFormatterConverter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IFormatterConverter.cs @@ -4,6 +4,7 @@ namespace System.Runtime.Serialization { [CLSCompliant(false)] + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface IFormatterConverter { object Convert(object value, Type type); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IObjectReference.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IObjectReference.cs index b6b6b6a8a80316..5674aece183cb6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IObjectReference.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/IObjectReference.cs @@ -3,6 +3,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface IObjectReference { object GetRealObject(StreamingContext context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISafeSerializationData.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISafeSerializationData.cs index 581a74fa38842b..96d952859b0f21 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISafeSerializationData.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISafeSerializationData.cs @@ -3,204 +3,12 @@ namespace System.Runtime.Serialization { - // - // #SafeSerialization - // - // Types which are serializable via the ISerializable interface have a problem when it comes to allowing - // transparent subtypes which can allow themselves to serialize since the GetObjectData method is - // SecurityCritical. - // - // For instance, System.Exception implements ISerializable, however it is also desirable to have - // transparent exceptions with their own fields that need to be serialized. (For instance, in transparent - // assemblies such as the DLR and F#, or even in partial trust application code). Since overriding - // GetObjectData requires that the overriding method be security critical, this won't work directly. - // - // SafeSerializationManager solves this problem by allowing any partial trust code to contribute - // individual chunks of serializable data to be included in the serialized version of the derived class. - // These chunks are then deserialized back out of the serialized type and notified that they should - // populate the fields of the deserialized object when serialization is complete. This allows partial - // trust or transparent code to participate in serialization of an ISerializable type without having to - // override GetObjectData or implement the ISerializable constructor. - // - // On the serialization side, SafeSerializationManager has an event SerializeObjectState which it will - // fire in response to serialization in order to gather the units of serializable data that should be - // stored with the rest of the object during serialization. Methods which respond to these events - // create serializable objects which implement the ISafeSerializationData interface and add them to the - // collection of other serialized data by calling AddSerializedState on the SafeSerializationEventArgs - // passed into the event. - // - // By using an event rather than a virtual method on the base ISerializable object, we allow multiple - // potentially untrusted subclasses to participate in serialization, without each one having to ensure - // that it calls up to the base type in order for the whole system to work. (For instance Exception : - // TrustedException : UntrustedException, in this scenario UntrustedException would be able to override - // the virtual method an prevent TrustedException from ever seeing the method call, either accidentally - // or maliciously). - // - // Further, by only allowing additions of new chunks of serialization state rather than exposing the - // whole underlying list, we avoid exposing potentially sensitive serialized state to any of the - // potentially untrusted subclasses. - // - // At deserialization time, SafeSerializationManager performs the reverse operation. It deserializes the - // chunks of serialized state, and then notifies them that the object they belong to is deserialized by - // calling their CompleteSerialization method. In repsonse to this call, the state objects populate the - // fields of the object being deserialized with the state that they held. - // - // From a security perspective, the chunks of serialized state can only contain data that the specific - // subclass itself had access to read (otherwise it wouldn't be able to populate the type with that - // data), as opposed to having access to far more data in the SerializationInfo that GetObjectData uses. - // Similarly, at deserialization time, the serialized state can only modify fields that the type itself - // has access to (again, as opposed to the full SerializationInfo which could be modified). - // - // Individual types which wish to participate in safe serialization do so by containing an instance of a - // SafeSerializationManager and exposing its serialization event. During GetObjectData, the - // SafeSerializationManager is serialized just like any other field of the containing type. However, at - // the end of serialization it is called back one last time to CompleteSerialization. - // - // In CompleteSerialization, if the SafeSerializationManager detects that it has extra chunks of - // data to handle, it substitutes the root type being serialized (formerly the real type hosting the - // SafeSerializationManager) with itself. This allows it to gain more control over the deserialization - // process. It also saves away an extra bit of state in the serialization info indicating the real type - // of object that should be recreated during deserialization. - // - // At this point the serialized state looks like this: - // Data: - // realSerializedData1 - // ... - // realSerializedDataN - // safeSerializationData -> this is the serialization data member of the parent type - // _serializedState -> list of saved serialized states from subclasses responding to the safe - // serialization event - // RealTypeSerializationName -> type which is using safe serialization - // Type: - // SafeSerializationManager - // - // That is, the serialized data claims to be of type SafeSerializationManager, however contains only the - // data from the real object being serialized along with one bit of safe serialization metadata. - // - // At deserialization time, since the serialized data claims to be of type SafeSerializationManager, the - // root object being created is an instance of the SafeSerializationManager class. However, it detects - // that this isn't a real SafeSerializationManager (by looking for the real type field in the metadata), - // and simply saves away the SerializationInfo and the real type being deserialized. - // - // Since SafeSerializationManager implements IObjectReference, the next step of deserialization is the - // GetRealObject callback. This callback is the one responsible for getting the - // SafeSerializationManager out of the way and instead creating an instance of the actual type which was - // serialized. - // - // It does this by first creating an instance of the real type being deserialzed (saved away in the - // deserialzation constructor), but not running any of its constructors. Instead, it walks the - // inheritance hierarchy (moving toward the most derived type) looking for the last full trust type to - // implement the standard ISerializable constructor before any type does not implement the constructor. - // It is this last type's deserialization constructor which is then invoked, passing in the saved - // SerializationInfo. Once the constructors are run, we return this object as the real deserialized - // object. - // - // The reason that we do this walk is so that ISerializable types can protect themselves from malicious - // input during deserialization by making their deserialization constructors unavailable to partial - // trust code. By not requiring every type have a copy of this constructor, partial trust code can - // participate in safe serialization and not be required to have access to the parent's constructor. - // - // It should be noted however, that this heuristic means that if a full trust type does derive from - // a transparent or partial trust type using this safe serialization mechanism, that full trust type - // will not have its constructor called. Further, the protection of not invoking partial trust - // deserialization constructors only comes into play if SafeSerializationManager is in control of - // deserialization, which means there must be at least one (even empty) safe serialization event - // handler registered. - // - // Another interesting note is that at this point there are now two SafeSerializationManagers alive for - // this deserialization. The first object is the one which is controlling the deserialization and was - // created as the root object of the deserialization. The second one is the object which contains the - // serialized data chunks and is a data member of the real object being deserialized. For this reason, - // the data objects cannot be notified that the deserialization is complete during GetRealObject since - // the ISafeSerializationData objects are not members of the active SafeSerializationManager instance. - // - // The next step is the OnDeserialized callback, which comes to SafeSerializableObject since it was - // pretending to be the root object of the deserialization. It responds to this callback by calling - // any existing OnDeserialized callback on the real type that was deserialized. - // - // The real type needs to call its data member SafeSerializationData object's CompleteDeserialization - // method in response to the OnDeserialized call. This CompleteDeserialization call will then iterate - // through the ISafeSerializationData objects calling each of their CompleteDeserialization methods so - // that they can plug the nearly-complete object with their saved data. - // - // The reason for having a new ISafeSerializationData interface which is basically identical to - // IDeserializationCallback is that IDeserializationCallback will be called on the stored data chunks - // by the serialization code when they are deserialized, and that's not a desirable behavior. - // Essentially, we need to change the meaning of the object parameter to mean "parent object which - // participated in safe serialization", rather than "this object". - // - // Implementing safe serialization on an ISerialiable type is relatively straight forward. (For an - // example, see System.Exception): - // - // 1. Include a data member of type SafeSerializationManager: - // - // private SafeSerializationManager _safeSerializationManager; - // - // 2. Add a protected SerializeObjectState event, which passes through to the SafeSerializationManager: - // - // protected event EventHandler? SerializeObjectState - // { - // add { _safeSerializationManager.SerializeObjectState += value; } - // remove { _safeSerializationManager.SerializeObjectState -= value; } - // } - // - // 3. Serialize the safe serialization object in GetObjectData, and call its CompleteSerialization method: - // - // { - // info.AddValue("_safeSerializationManager", _safeSerializationManager, typeof(SafeSerializationManager)); - // _safeSerializationManager.CompleteSerialization(this, info, context); - // } - // - // 4. Add an OnDeserialized handler if one doesn't already exist, and call CompleteDeserialization in it: - // - // [OnDeserialized] - // private void OnDeserialized(StreamingContext context) - // { - // _safeSerializationManager.CompleteDeserialization(this); - // } - // - // On the client side, using safe serialization is also pretty easy. For example: - // - // [Serializable] - // public class TransparentException : Exception - // { - // [Serializable] - // private struct TransparentExceptionState : ISafeSerializationData - // { - // public string _extraData; - // - // void ISafeSerializationData.CompleteDeserialization(object obj) - // { - // TransparentException exception = obj as TransparentException; - // exception._state = this; - // } - // } - // - // [NonSerialized] - // private TransparentExceptionState _state = new TransparentExceptionState(); - // - // public TransparentException() - // { - // SerializeObjectState += delegate(object exception, SafeSerializationEventArgs eventArgs) - // { - // eventArgs.AddSerializedState(_state); - // }; - // } - // - // public string ExtraData - // { - // get { return _state._extraData; } - // set { _state._extraData = value; } - // } - // } - // + // This type was intended to support Code Access Security (CAS) scenarios in .NET Framework. + // Since CAS is no longer supported in .NET 5+, this interface has no further use. - // Interface to be supported by objects which are stored in safe serialization stores + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface ISafeSerializationData { - // CompleteDeserialization is called when the object to which the extra serialized data was attached - // has completed its deserialization, and now needs to be populated with the extra data stored in - // this object. void CompleteDeserialization(object deserialized); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISerializable.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISerializable.cs index 02f75df88162b9..ab60306e080443 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISerializable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/ISerializable.cs @@ -5,6 +5,7 @@ namespace System.Runtime.Serialization { public interface ISerializable { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void GetObjectData(SerializationInfo info, StreamingContext context); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs index 431709a013ce54..8928bb50499c51 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs @@ -4,6 +4,7 @@ namespace System.Runtime.Serialization { // This type exists for public surface compatibility only. + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public sealed class SafeSerializationEventArgs : EventArgs { private SafeSerializationEventArgs() { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs index a0699e47cbb282..c6cc0bbf433472 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Diagnostics; +#pragma warning disable SYSLIB0049 // The SerializationInfo type is part of the obsolete legacy serialization framework + namespace System.Runtime.Serialization { /// The structure for holding all of the data needed for object serialization and deserialization. @@ -24,6 +26,7 @@ public sealed partial class SerializationInfo private Type _rootType; [CLSCompliant(false)] + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public SerializationInfo(Type type, IFormatterConverter converter) { ArgumentNullException.ThrowIfNull(type); @@ -43,6 +46,7 @@ public SerializationInfo(Type type, IFormatterConverter converter) } [CLSCompliant(false)] + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public SerializationInfo(Type type, IFormatterConverter converter, bool requireSameTokenInPartialTrust) : this(type, converter) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs index 1b3b86c0b9a646..b8783c2c5a02b6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs @@ -4,18 +4,23 @@ using System.Diagnostics.CodeAnalysis; #pragma warning disable CA1066 // Implement IEquatable when overriding Object.Equals +#pragma warning disable SYSLIB0049 // The StreamingContext type is part of the obsolete legacy serialization framework namespace System.Runtime.Serialization { public readonly struct StreamingContext { private readonly object? _additionalContext; + + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private readonly StreamingContextStates _state; + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public StreamingContext(StreamingContextStates state) : this(state, null) { } + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public StreamingContext(StreamingContextStates state, object? additional) { _state = state; @@ -34,12 +39,14 @@ public override bool Equals([NotNullWhen(true)] object? obj) public override int GetHashCode() => (int)_state; + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public StreamingContextStates State => _state; public object? Context => _additionalContext; } [Flags] + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public enum StreamingContextStates { CrossProcess = 0x01, diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs index 7145be9695c5e3..940feebc2fee09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs @@ -1106,7 +1106,7 @@ internal void ThrowCharsOverflow(DecoderNLS? decoder, bool nothingDecoded) decoder!.ClearMustFlush(); } - internal sealed class DefaultEncoder : Encoder, IObjectReference + internal sealed class DefaultEncoder : Encoder { private readonly Encoding _encoding; @@ -1115,9 +1115,6 @@ public DefaultEncoder(Encoding encoding) _encoding = encoding; } - public object GetRealObject(StreamingContext context) => - throw new PlatformNotSupportedException(); - // Returns the number of bytes the next call to GetBytes will // produce if presented with the given range of characters and the given // value of the flush parameter. The returned value takes into @@ -1161,7 +1158,7 @@ public override unsafe int GetBytes(char* chars, int charCount, _encoding.GetBytes(chars, charCount, bytes, byteCount); } - internal sealed class DefaultDecoder : Decoder, IObjectReference + internal sealed class DefaultDecoder : Decoder { private readonly Encoding _encoding; @@ -1170,9 +1167,6 @@ public DefaultDecoder(Encoding encoding) _encoding = encoding; } - public object GetRealObject(StreamingContext context) => - throw new PlatformNotSupportedException(); - // Returns the number of characters the next call to GetChars will // produce if presented with the given range of bytes. The returned value // takes into account the state in which the decoder was left following the diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs b/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs index f97d79c4f5f4f1..69ebba18c9c8a8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs @@ -10,6 +10,7 @@ namespace System // This file collects the longer methods of Type to make the main Type class more readable. public abstract partial class Type : MemberInfo, IReflect { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public virtual bool IsSerializable { get @@ -472,8 +473,10 @@ private static bool FilterAttributeImpl(MemberInfo m, object filterCriteria) return false; if (((criteria & FieldAttributes.Literal) != 0) && (attr & FieldAttributes.Literal) == 0) return false; +#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete if (((criteria & FieldAttributes.NotSerialized) != 0) && (attr & FieldAttributes.NotSerialized) == 0) return false; +#pragma warning restore SYSLIB0049 if (((criteria & FieldAttributes.PinvokeImpl) != 0) && (attr & FieldAttributes.PinvokeImpl) == 0) return false; return true; diff --git a/src/libraries/System.Private.CoreLib/src/System/UnitySerializationHolder.cs b/src/libraries/System.Private.CoreLib/src/System/UnitySerializationHolder.cs index eedcebf37a7086..746834a648434c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UnitySerializationHolder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UnitySerializationHolder.cs @@ -10,6 +10,7 @@ namespace System /// This only exists for compatibility with .NET Framework. /// [Serializable] + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] // Needs to be public to support binary serialization compatibility public sealed class UnitySerializationHolder : ISerializable, IObjectReference { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj b/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj index e5751e43206791..c0ca93e494c5cb 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj +++ b/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj @@ -57,7 +57,6 @@ - diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs index c85fd6c23a6b84..922fb69663d416 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs @@ -328,8 +328,10 @@ internal static bool IsNonAttributedTypeValidForSerialization( } } +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (type.IsSerializable) return false; +#pragma warning restore SYSLIB0049 if (Globals.TypeOfISerializable.IsAssignableFrom(type)) return false; @@ -635,8 +637,10 @@ internal ClassDataContractCriticalHelper([DynamicallyAccessedMembers(DataContrac { if (HasDataContract) throw new InvalidDataContractException(SR.Format(SR.ISerializableCannotHaveDataContract, DataContract.GetClrTypeFullName(type))); +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (baseType != null && !(baseType.IsSerializable && Globals.TypeOfISerializable.IsAssignableFrom(baseType))) baseType = null; +#pragma warning restore SYSLIB0049 } IsValueType = type.IsValueType; if (baseType != null && baseType != Globals.TypeOfObject && baseType != Globals.TypeOfValueType && baseType != Globals.TypeOfUri) @@ -919,7 +923,9 @@ private void ImportDataMembers() { FieldInfo? field = member as FieldInfo; +#pragma warning disable SYSLIB0049 // Field.IsNotSerialized is obsolete if (field != null && !field.IsNotSerialized) +#pragma warning restore SYSLIB0049 { DataMember memberContract = new DataMember(member); @@ -1044,7 +1050,9 @@ private void SetIsNonAttributedType( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.Interfaces)] Type type) { +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete _isNonAttributedType = !type.IsSerializable && !_hasDataContract && IsNonAttributedTypeValidForSerialization(type); +#pragma warning restore SYSLIB0049 } private static bool IsMethodOverriding(MethodInfo method) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs index cd600ee2a0a5d3..049c3cabab9fe5 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs @@ -913,10 +913,12 @@ private static CreateGenericDictionaryEnumeratorDelegate BuildCreateGenericDicti { return this; } +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (type.IsSerializable || type.IsDefined(Globals.TypeOfDataContractAttribute, false)) { return new ClassDataContract(type); } +#pragma warning restore SYSLIB0049 return null; } @@ -1023,7 +1025,9 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC && baseType != Globals.TypeOfValueType && baseType != Globals.TypeOfUri) ? IsCollection(baseType) : false; // Avoid creating an invalid collection contract for Serializable types since we can create a ClassDataContract instead +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete bool createContractWithException = isBaseTypeCollection && !type.IsSerializable; +#pragma warning restore SYSLIB0049 if (type.IsDefined(Globals.TypeOfDataContractAttribute, false)) { @@ -1105,11 +1109,13 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC // All collection types could be considered read-only collections except collection types that are marked [Serializable]. // Collection types marked [Serializable] cannot be read-only collections for backward compatibility reasons. // DataContract types and POCO types cannot be collection types, so they don't need to be factored in +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (type.IsSerializable) { return HandleIfInvalidCollection(type, tryCreate, hasCollectionDataContract, createContractWithException, SR.CollectionTypeDoesNotHaveDefaultCtor, null, ref dataContract); } +#pragma warning restore SYSLIB0049 else { isReadOnlyContract = true; @@ -1167,11 +1173,13 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC // All collection types could be considered read-only collections except collection types that are marked [Serializable]. // Collection types marked [Serializable] cannot be read-only collections for backward compatibility reasons. // DataContract types and POCO types cannot be collection types, so they don't need to be factored in. +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (type.IsSerializable || skipIfReadOnlyContract) { return HandleIfInvalidCollection(type, tryCreate, hasCollectionDataContract, createContractWithException && !skipIfReadOnlyContract, SR.CollectionTypeDoesNotHaveAddMethod, DataContract.GetClrTypeFullName(itemType), ref dataContract); } +#pragma warning restore SYSLIB0049 else { isReadOnlyContract = true; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs index 3cf45d25769912..f8e7fb4f02ceea 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @@ -480,10 +480,12 @@ private static DataContract CreateDataContract(Type type) if (!CollectionDataContract.TryCreate(type, out dataContract)) { +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete if (!type.IsSerializable && !type.IsDefined(Globals.TypeOfDataContractAttribute, false) && !ClassDataContract.IsNonAttributedTypeValidForSerialization(type)) { ThrowInvalidDataContractException(SR.Format(SR.TypeNotSerializable, type), type); } +#pragma warning restore SYSLIB0049 dataContract = new ClassDataContract(type); if (type != originalType) { @@ -1141,7 +1143,10 @@ internal static bool IsTypeSerializable(Type type) [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] private static bool IsTypeSerializable(Type type, HashSet? previousCollectionTypes) { - if (type.IsSerializable || + if ( +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete + type.IsSerializable || +#pragma warning restore SYSLIB0049 type.IsEnum || type.IsDefined(Globals.TypeOfDataContractAttribute, false) || type.IsInterface || diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs index 55f7c22c566328..1c4f778c468198 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs @@ -409,7 +409,10 @@ private static bool IsTypeReferenceable(Type type) { try { - return (type.IsSerializable || + return ( +#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete + type.IsSerializable || +#pragma warning restore SYSLIB0049 type.IsDefined(Globals.TypeOfDataContractAttribute, false) || (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) && !type.IsGenericTypeDefinition) || CollectionDataContract.IsCollection(type, out _) || diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs index 3923fd0ecd9351..067ac54615583a 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs @@ -253,6 +253,7 @@ private void ImportDataMembers() } else { +#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete if (!field.IsNotSerialized) { DataMember memberContract = new DataMember(field) { Name = field.Name }; @@ -260,6 +261,7 @@ private void ImportDataMembers() ClassDataContract.CheckAndAddMember(tempMembers, memberContract, memberValuesTable); enumMemberValid = true; } +#pragma warning restore SYSLIB0049 } if (enumMemberValid) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs index 7d7c9786f77e0e..5ef1c19a2e6ef1 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs @@ -107,9 +107,11 @@ internal static partial class Globals internal static Type TypeOfIDeserializationCallback => s_typeOfIDeserializationCallback ??= typeof(IDeserializationCallback); +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete private static Type? s_typeOfIObjectReference; internal static Type TypeOfIObjectReference => s_typeOfIObjectReference ??= typeof(IObjectReference); +#pragma warning restore SYSLIB0049 private static Type? s_typeOfXmlFormatClassWriterDelegate; internal static Type TypeOfXmlFormatClassWriterDelegate => diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs index f49faae9c17d01..6ddc0ba28c9bed 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs @@ -19,7 +19,9 @@ internal sealed class XmlObjectSerializerReadContextComplexJson : XmlObjectSeria private readonly bool _useSimpleDictionaryFormat; internal XmlObjectSerializerReadContextComplexJson(DataContractJsonSerializer serializer, DataContract rootTypeDataContract) +#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete : base(serializer, serializer.MaxItemsInObjectGraph, new StreamingContext(StreamingContextStates.All), serializer.IgnoreExtensionDataObject) +#pragma warning restore SYSLIB0049 { this.rootTypeDataContract = rootTypeDataContract; this.serializerKnownTypeList = serializer.knownTypeList; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs index f877c36e33d0b4..96a84fa410a07f 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs @@ -25,7 +25,9 @@ internal static XmlObjectSerializerWriteContextComplexJson CreateContext(DataCon } internal XmlObjectSerializerWriteContextComplexJson(DataContractJsonSerializer serializer, DataContract rootTypeDataContract) +#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete : base(serializer, serializer.MaxItemsInObjectGraph, new StreamingContext(StreamingContextStates.All), serializer.IgnoreExtensionDataObject) +#pragma warning restore SYSLIB0049 { _emitXsiType = serializer.EmitTypeInformation; this.rootTypeDataContract = rootTypeDataContract; @@ -329,6 +331,7 @@ internal static void VerifyObjectCompatibilityWithInterface(DataContract contrac } } +#pragma warning disable SYSLIB0049 // The legacy serialization infrastructure (including ISerializable & friends) is obsolete [RequiresDynamicCode(DataContract.SerializerAOTWarning)] [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] internal void WriteJsonISerializable(XmlWriterDelegator xmlWriter, ISerializable obj) @@ -345,6 +348,7 @@ internal void WriteJsonISerializable(XmlWriterDelegator xmlWriter, ISerializable base.WriteSerializationInfo(xmlWriter, objType, serInfo); } } +#pragma warning restore SYSLIB0049 [return: NotNullIfNotNull(nameof(oldItemContract))] [RequiresDynamicCode(DataContract.SerializerAOTWarning)] diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs index 62e5f8bb3dbb52..dd9b5149a60ae4 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs @@ -50,10 +50,12 @@ public object ReflectionReadClass(XmlReaderDelegator xmlReader, XmlObjectSeriali ReflectionReadMembers(xmlReader, context, memberNames, memberNamespaces, classContract, ref obj); } +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete if (obj is IObjectReference objectReference) { obj = context.GetRealObject(objectReference, context.GetObjectId()); } +#pragma warning restore SYSLIB0049 obj = ResolveAdapterObject(obj); InvokeDeserializationCallback(obj); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SurrogateDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SurrogateDataContract.cs deleted file mode 100644 index 98080f371d0a8b..00000000000000 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SurrogateDataContract.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Security; - -namespace System.Runtime.Serialization.DataContracts -{ - internal sealed class SurrogateDataContract : DataContract - { - private readonly SurrogateDataContractCriticalHelper _helper; - - [RequiresDynamicCode(DataContract.SerializerAOTWarning)] - [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] - internal SurrogateDataContract(Type type, ISerializationSurrogate serializationSurrogate) - : base(new SurrogateDataContractCriticalHelper(type, serializationSurrogate)) - { - _helper = (base.Helper as SurrogateDataContractCriticalHelper)!; - } - - internal ISerializationSurrogate SerializationSurrogate => _helper.SerializationSurrogate; - - [RequiresDynamicCode(DataContract.SerializerAOTWarning)] - [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] - internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext? context) - { - Debug.Assert(context != null); - - SerializationInfo serInfo = new SerializationInfo(UnderlyingType, XmlObjectSerializer.FormatterConverter, !context.UnsafeTypeForwardingEnabled); - SerializationSurrogateGetObjectData(obj, serInfo, context.GetStreamingContext()); - context.WriteSerializationInfo(xmlWriter, UnderlyingType, serInfo); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private object? SerializationSurrogateSetObjectData(object obj, SerializationInfo serInfo, StreamingContext context) - { - return SerializationSurrogate.SetObjectData(obj, serInfo, context, null); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - internal static object? GetRealObject(IObjectReference obj, StreamingContext context) - { - return obj.GetRealObject(context); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private static object GetUninitializedObject( - [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] - Type objType) - { - return RuntimeHelpers.GetUninitializedObject(objType); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - private void SerializationSurrogateGetObjectData(object obj, SerializationInfo serInfo, StreamingContext context) - { - SerializationSurrogate.GetObjectData(obj, serInfo, context); - } - - [RequiresDynamicCode(DataContract.SerializerAOTWarning)] - [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] - internal override object? ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext? context) - { - Debug.Assert(context != null); - - xmlReader.Read(); - Type objType = UnderlyingType; - object obj = objType.IsArray ? Array.CreateInstance(objType.GetElementType()!, 0) : GetUninitializedObject(objType); - context.AddNewObject(obj); - string objectId = context.GetObjectId(); - SerializationInfo serInfo = context.ReadSerializationInfo(xmlReader, objType); - object? newObj = SerializationSurrogateSetObjectData(obj, serInfo, context.GetStreamingContext()) ?? obj; - if (newObj is IDeserializationCallback) - ((IDeserializationCallback)newObj).OnDeserialization(null); - if (newObj is IObjectReference) - newObj = GetRealObject((IObjectReference)newObj, context.GetStreamingContext()); - context.ReplaceDeserializedObject(objectId, obj, newObj); - xmlReader.ReadEndElement(); - return newObj; - } - - private sealed class SurrogateDataContractCriticalHelper : DataContract.DataContractCriticalHelper - { - private readonly ISerializationSurrogate serializationSurrogate; - - [RequiresDynamicCode(DataContract.SerializerAOTWarning)] - [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] - internal SurrogateDataContractCriticalHelper( - [DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] - Type type, - ISerializationSurrogate serializationSurrogate) - : base(type) - { - this.serializationSurrogate = serializationSurrogate; - string name, ns; - DataContract.GetDefaultXmlName(DataContract.GetClrTypeFullName(type), out name, out ns); - SetDataContractName(CreateQualifiedName(name, ns)); - } - - internal ISerializationSurrogate SerializationSurrogate => serializationSurrogate; - } - } -} diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs index db26bf0bd5fd88..4980d266cf6f63 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs @@ -470,7 +470,9 @@ internal static string GetTypeInfoError(string errorMessage, Type? type, Excepti return null; } +#pragma warning disable SYSLIB0049 // IFormatterConverter is obsolete private static IFormatterConverter? s_formatterConverter; internal static IFormatterConverter FormatterConverter => s_formatterConverter ??= new FormatterConverter(); +#pragma warning restore SYSLIB0049 } } diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs index ee2df1d054f298..b7cd94e4033072 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs @@ -48,7 +48,9 @@ internal XmlObjectSerializerContext(XmlObjectSerializer serializer, int maxItems internal XmlObjectSerializerContext(DataContractSerializer serializer, DataContract rootTypeDataContract, DataContractResolver? dataContractResolver) : this(serializer, serializer.MaxItemsInObjectGraph, +#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete new StreamingContext(StreamingContextStates.All), +#pragma warning restore SYSLIB0049 serializer.IgnoreExtensionDataObject, dataContractResolver ) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs index 130c45d2b55aea..1093433fe4f119 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs @@ -402,9 +402,10 @@ private object GetExistingObjectOrExtensionData(string id) return retObj; } +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete public object GetRealObject(IObjectReference obj, string id) { - object? realObj = SurrogateDataContract.GetRealObject(obj, this.GetStreamingContext()); + object? realObj = obj.GetRealObject(this.GetStreamingContext()); // If GetRealObject returns null, it indicates that the object could not resolve itself because // it is missing information. This may occur in a case where multiple IObjectReference instances // depend on each other. BinaryFormatter supports this by fixing up the references later. These @@ -416,6 +417,7 @@ public object GetRealObject(IObjectReference obj, string id) ReplaceDeserializedObject(id, obj, realObj); return realObj; } +#pragma warning restore SYSLIB0049 [RequiresDynamicCode(DataContract.SerializerAOTWarning)] [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] @@ -540,7 +542,9 @@ internal void CheckEndOfArray(XmlReaderDelegator xmlReader, int arraySize, XmlDi [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] public SerializationInfo ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type) { +#pragma warning disable SYSLIB0049 // SerializationInfo ctor is obsolete var serInfo = new SerializationInfo(type, XmlObjectSerializer.FormatterConverter); +#pragma warning restore SYSLIB0049 XmlNodeType nodeType; while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs index c0909735e7f04a..d7d404737a7411 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs @@ -505,7 +505,9 @@ private static void WriteIXmlSerializable(XmlWriterDelegator xmlWriter, object o [MethodImpl(MethodImplOptions.NoInlining)] internal static void GetObjectData(ISerializable obj, SerializationInfo serInfo, StreamingContext context) { +#pragma warning disable SYSLIB0049 // ISerializable.GetObjectData is obsolete obj.GetObjectData(serInfo, context); +#pragma warning restore SYSLIB0049 } [RequiresDynamicCode(DataContract.SerializerAOTWarning)] @@ -513,7 +515,9 @@ internal static void GetObjectData(ISerializable obj, SerializationInfo serInfo, public void WriteISerializable(XmlWriterDelegator xmlWriter, ISerializable obj) { Type objType = obj.GetType(); +#pragma warning disable SYSLIB0049 // SerializationInfo ctor is obsolete var serInfo = new SerializationInfo(objType, XmlObjectSerializer.FormatterConverter /*!UnsafeTypeForwardingEnabled is always false*/); +#pragma warning restore SYSLIB0049 GetObjectData(obj, serInfo, GetStreamingContext()); // (!UnsafeTypeForwardingEnabled) is always false diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs index d77592743ef5c7..36cb18605b17c2 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs @@ -109,6 +109,9 @@ public override bool IsSecurityTransparent get { return _typeInfo.IsSecurityTransparent; } } +#if NET8_0_OR_GREATER + [Obsolete("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] +#endif public override bool IsSerializable { get { return _typeInfo.IsSerializable; } diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs index 78beb8e60f8110..76ee4027ecb90f 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs @@ -66,7 +66,9 @@ internal sealed override IEnumerable ComputeDirectlyImplementedInterface CoreType.IReadOnlyListT, }; +#pragma warning disable SYSLIB0049 // TypeAttributes.Serialized flag is obsolete protected sealed override TypeAttributes ComputeAttributeFlags() => TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; +#pragma warning restore SYSLIB0049 internal sealed override IEnumerable GetConstructorsCore(NameFilter? filter) { diff --git a/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs b/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs index 716001ef46c416..9cd5c532093efe 100644 --- a/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs +++ b/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs @@ -11,7 +11,11 @@ namespace System.Resources.Extensions public partial class DeserializingResourceReader { private bool _assumeBinaryFormatter; + +// Issue https://github.com/dotnet/runtime/issues/39292 tracks finding an alternative to BinaryFormatter +#pragma warning disable SYSLIB0011 private BinaryFormatter? _formatter; +#pragma warning restore SYSLIB0011 private bool ValidateReaderType(string readerType) { diff --git a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props index 63f02a0f817ef2..b7d39deed818e1 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props +++ b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props @@ -2,5 +2,7 @@ Microsoft + + $(NoWarn);SYSLIB0011;SYSLIB0049 \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs index d1ebf7e6bd2257..58a8938c47b335 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs @@ -6,6 +6,7 @@ namespace System.Runtime.Serialization { + [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.CLSCompliantAttribute(false)] public abstract partial class Formatter : System.Runtime.Serialization.IFormatter { @@ -15,13 +16,11 @@ protected Formatter() { } public abstract System.Runtime.Serialization.SerializationBinder? Binder { get; set; } public abstract System.Runtime.Serialization.StreamingContext Context { get; set; } public abstract System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get; set; } - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] public abstract object Deserialize(System.IO.Stream serializationStream); protected virtual object? GetNext(out long objID) { throw null; } protected virtual long Schedule(object? obj) { throw null; } - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] public abstract void Serialize(System.IO.Stream serializationStream, object graph); protected abstract void WriteArray(object obj, string name, System.Type memberType); @@ -48,6 +47,7 @@ protected virtual void WriteMember(string memberName, object? data) { } protected abstract void WriteUInt64(ulong val, string name); protected abstract void WriteValueType(object obj, string name, System.Type memberType); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class FormatterConverter : System.Runtime.Serialization.IFormatterConverter { public FormatterConverter() { } @@ -73,6 +73,7 @@ public FormatterConverter() { } [System.CLSCompliantAttribute(false)] public ulong ToUInt64(object value) { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static partial class FormatterServices { public static void CheckTypeSecurity(System.Type t, System.Runtime.Serialization.Formatters.TypeFilterLevel securityLevel) { } @@ -86,36 +87,39 @@ public static void CheckTypeSecurity(System.Type t, System.Runtime.Serialization public static object GetUninitializedObject([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)] System.Type type) { throw null; } public static object PopulateObjectMembers(object obj, System.Reflection.MemberInfo[] members, object?[] data) { throw null; } } + [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFormatter { System.Runtime.Serialization.SerializationBinder? Binder { get; set; } System.Runtime.Serialization.StreamingContext Context { get; set; } System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get; set; } - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] object Deserialize(System.IO.Stream serializationStream); - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] void Serialize(System.IO.Stream serializationStream, object graph); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISerializationSurrogate { void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector? selector); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISurrogateSelector { void ChainSelector(System.Runtime.Serialization.ISurrogateSelector selector); System.Runtime.Serialization.ISurrogateSelector? GetNextSelector(); System.Runtime.Serialization.ISerializationSurrogate? GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectIDGenerator { public ObjectIDGenerator() { } public virtual long GetId(object obj, out bool firstTime) { throw null; } public virtual long HasId(object obj, out bool firstTime) { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectManager { public ObjectManager(System.Runtime.Serialization.ISurrogateSelector? selector, System.Runtime.Serialization.StreamingContext context) { } @@ -144,6 +148,7 @@ protected SerializationBinder() { } public virtual void BindToName(System.Type serializedType, out string? assemblyName, out string? typeName) { throw null; } public abstract System.Type? BindToType(string assemblyName, string typeName); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SerializationObjectManager { public SerializationObjectManager(System.Runtime.Serialization.StreamingContext context) { } @@ -151,6 +156,7 @@ public void RaiseOnSerializedEvent() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("SerializationObjectManager is not trim compatible because the type of objects being managed cannot be statically discovered.")] public void RegisterObject(object obj) { } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector { public SurrogateSelector() { } @@ -163,22 +169,26 @@ public virtual void RemoveSurrogate(System.Type type, System.Runtime.Serializati } namespace System.Runtime.Serialization.Formatters { + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterAssemblyStyle { Simple = 0, Full = 1, } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterTypeStyle { TypesWhenNeeded = 0, TypesAlways = 1, XsdString = 2, } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFieldInfo { string[]? FieldNames { get; set; } System.Type[]? FieldTypes { get; set; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum TypeFilterLevel { Low = 2, @@ -187,6 +197,7 @@ public enum TypeFilterLevel } namespace System.Runtime.Serialization.Formatters.Binary { + [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class BinaryFormatter : System.Runtime.Serialization.IFormatter { public BinaryFormatter() { } @@ -197,11 +208,9 @@ public BinaryFormatter(System.Runtime.Serialization.ISurrogateSelector? selector public System.Runtime.Serialization.Formatters.TypeFilterLevel FilterLevel { get { throw null; } set { } } public System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get { throw null; } set { } } public System.Runtime.Serialization.Formatters.FormatterTypeStyle TypeFormat { get { throw null; } set { } } - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] public object Deserialize(System.IO.Stream serializationStream) { throw null; } - [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] public void Serialize(System.IO.Stream serializationStream, object graph) { } } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatter.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatter.cs index 7d14ebcb67647a..4cce178d2a4231 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatter.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatter.cs @@ -9,6 +9,7 @@ namespace System.Runtime.Serialization { [CLSCompliant(false)] + [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public abstract class Formatter : IFormatter { protected ObjectIDGenerator m_idGenerator; @@ -20,7 +21,6 @@ protected Formatter() m_idGenerator = new ObjectIDGenerator(); } - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresDynamicCode(IFormatter.RequiresDynamicCodeMessage)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public abstract object Deserialize(Stream serializationStream); @@ -62,7 +62,6 @@ protected virtual long Schedule(object? obj) return id; } - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public abstract void Serialize(Stream serializationStream, object graph); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterConverter.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterConverter.cs index 34f84d14034bcf..8da5135e616d77 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterConverter.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterConverter.cs @@ -5,6 +5,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public class FormatterConverter : IFormatterConverter { public object Convert(object value, Type type) diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs index b1692273bf11cf..e3b3a6df8ff53e 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs @@ -12,6 +12,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public static class FormatterServices { private static readonly ConcurrentDictionary s_memberInfoTable = new ConcurrentDictionary(); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.Core.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.Core.cs index 51c3aa9aaee1d8..d3d9aefe515d7e 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.Core.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.Core.cs @@ -8,7 +8,6 @@ namespace System.Runtime.Serialization.Formatters.Binary { public sealed partial class BinaryFormatter : IFormatter { - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresDynamicCode(IFormatter.RequiresDynamicCodeMessage)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public object Deserialize(Stream serializationStream) @@ -58,7 +57,6 @@ public object Deserialize(Stream serializationStream) } } - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public void Serialize(Stream serializationStream, object graph) { diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs index b212e94ea577a2..cf124a5c6de1ca 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs @@ -8,13 +8,11 @@ namespace System.Runtime.Serialization.Formatters.Binary { public sealed partial class BinaryFormatter : IFormatter { - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresDynamicCode(IFormatter.RequiresDynamicCodeMessage)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public object Deserialize(Stream serializationStream) => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationNotSupportedOnThisPlatform); - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public void Serialize(Stream serializationStream, object graph) => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationNotSupportedOnThisPlatform); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.cs index 59d2d519f42f5c..11b9fb735dfdde 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.cs @@ -5,6 +5,7 @@ namespace System.Runtime.Serialization.Formatters.Binary { + [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public sealed partial class BinaryFormatter : IFormatter { private static readonly ConcurrentDictionary s_typeNameCache = new ConcurrentDictionary(); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/CommonEnums.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/CommonEnums.cs index a45f69096d9cc8..51fdeff6d3f1fc 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/CommonEnums.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/CommonEnums.cs @@ -3,6 +3,7 @@ namespace System.Runtime.Serialization.Formatters { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public enum FormatterTypeStyle { TypesWhenNeeded = 0, // Types are outputted only for Arrays of Objects, Object Members of type Object, and ISerializable non-primitive value types @@ -10,12 +11,14 @@ public enum FormatterTypeStyle XsdString = 0x2 // Strings are outputed as xsd rather then SOAP-ENC strings. No string ID's are transmitted } + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public enum FormatterAssemblyStyle { Simple = 0, Full = 1, } + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public enum TypeFilterLevel { Low = 0x2, diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/IFieldInfo.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/IFieldInfo.cs index 890b5e3bc47bf3..3d4d1ed22d0258 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/IFieldInfo.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/IFieldInfo.cs @@ -3,6 +3,7 @@ namespace System.Runtime.Serialization.Formatters { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface IFieldInfo { string[]? FieldNames { get; set; } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/IFormatter.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/IFormatter.cs index 0928b3982c26b8..ef64d8b22ae1cc 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/IFormatter.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/IFormatter.cs @@ -6,16 +6,15 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface IFormatter { internal const string RequiresDynamicCodeMessage = "BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered."; internal const string RequiresUnreferencedCodeMessage = "BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered."; - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresDynamicCode(RequiresDynamicCodeMessage)] [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] object Deserialize(Stream serializationStream); - [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] void Serialize(Stream serializationStream, object graph); ISurrogateSelector? SurrogateSelector { get; set; } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISerializationSurrogate.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISerializationSurrogate.cs index ff9f16c28b2456..76aa414dbf1259 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISerializationSurrogate.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISerializationSurrogate.cs @@ -3,6 +3,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface ISerializationSurrogate { void GetObjectData(object obj, SerializationInfo info, StreamingContext context); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISurrogateSelector.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISurrogateSelector.cs index 16e77fd567cb28..8aa06ff3f48ac0 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISurrogateSelector.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ISurrogateSelector.cs @@ -3,6 +3,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public interface ISurrogateSelector { void ChainSelector(ISurrogateSelector selector); diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectIDGenerator.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectIDGenerator.cs index 78d20856994b00..0d019f72cc80be 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectIDGenerator.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectIDGenerator.cs @@ -6,6 +6,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public class ObjectIDGenerator { private const int NumBins = 4; diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectManager.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectManager.cs index 53d1ab836b567c..89b91be09a3cbc 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectManager.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectManager.cs @@ -7,6 +7,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public class ObjectManager { private const int DefaultInitialSize = 16; diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationObjectManager.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationObjectManager.cs index 9c0b1299f093fd..204e0f2573b99e 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationObjectManager.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationObjectManager.cs @@ -6,6 +6,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public sealed class SerializationObjectManager { private const string SerializationObjectManagerUnreferencedCodeMessage = "SerializationObjectManager is not trim compatible because the type of objects being managed cannot be statically discovered."; diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SurrogateSelector.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SurrogateSelector.cs index e8f87df23e6c96..8ba256b8406933 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SurrogateSelector.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SurrogateSelector.cs @@ -6,6 +6,7 @@ namespace System.Runtime.Serialization { + [Obsolete(Obsoletions.LegacyFormatterMessage, DiagnosticId = Obsoletions.LegacyFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public class SurrogateSelector : ISurrogateSelector { internal readonly SurrogateHashtable _surrogates = new SurrogateHashtable(32); diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index bf955c2f418a77..25fc2aa34819a8 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -5839,6 +5839,7 @@ protected Type() { } public virtual bool IsSecurityCritical { get { throw null; } } public virtual bool IsSecuritySafeCritical { get { throw null; } } public virtual bool IsSecurityTransparent { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public virtual bool IsSerializable { get { throw null; } } public virtual bool IsSignatureType { get { throw null; } } public bool IsSpecialName { get { throw null; } } @@ -11157,6 +11158,7 @@ public enum FieldAttributes Static = 16, InitOnly = 32, Literal = 64, + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] NotSerialized = 128, HasFieldRVA = 256, SpecialName = 512, @@ -11178,6 +11180,7 @@ protected FieldInfo() { } public bool IsFamilyOrAssembly { get { throw null; } } public bool IsInitOnly { get { throw null; } } public bool IsLiteral { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public bool IsNotSerialized { get { throw null; } } public bool IsPinvokeImpl { get { throw null; } } public bool IsPrivate { get { throw null; } } @@ -11592,7 +11595,10 @@ public enum ParameterAttributes Reserved4 = 32768, ReservedMask = 61440, } - public partial class ParameterInfo : System.Reflection.ICustomAttributeProvider, System.Runtime.Serialization.IObjectReference + public partial class ParameterInfo : System.Reflection.ICustomAttributeProvider +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete + , System.Runtime.Serialization.IObjectReference +#pragma warning restore SYSLIB0049 { protected System.Reflection.ParameterAttributes AttrsImpl; protected System.Type? ClassImpl; @@ -11806,6 +11812,7 @@ public enum TypeAttributes SpecialName = 1024, RTSpecialName = 2048, Import = 4096, + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] Serializable = 8192, WindowsRuntime = 16384, UnicodeClass = 65536, @@ -13307,6 +13314,7 @@ public partial interface IDeserializationCallback void OnDeserialization(object? sender); } [System.CLSCompliantAttribute(false)] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFormatterConverter { object Convert(object value, System.Type type); @@ -13327,16 +13335,19 @@ public partial interface IFormatterConverter uint ToUInt32(object value); ulong ToUInt64(object value); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IObjectReference { object GetRealObject(System.Runtime.Serialization.StreamingContext context); } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISafeSerializationData { void CompleteDeserialization(object deserialized); } public partial interface ISerializable { + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); } [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)] @@ -13365,6 +13376,7 @@ public sealed partial class OptionalFieldAttribute : System.Attribute public OptionalFieldAttribute() { } public int VersionAdded { get { throw null; } set { } } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SafeSerializationEventArgs : System.EventArgs { internal SafeSerializationEventArgs() { } @@ -13389,8 +13401,10 @@ public SerializationException(string? message, System.Exception? innerException) public sealed partial class SerializationInfo { [System.CLSCompliantAttribute(false)] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter) { } [System.CLSCompliantAttribute(false)] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust) { } public string AssemblyName { get { throw null; } set { } } public string FullTypeName { get { throw null; } set { } } @@ -13456,14 +13470,18 @@ public readonly partial struct StreamingContext { private readonly object _dummy; private readonly int _dummyPrimitive; + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state, object? additional) { throw null; } public object? Context { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public System.Runtime.Serialization.StreamingContextStates State { get { throw null; } } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } } [System.FlagsAttribute] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum StreamingContextStates { CrossProcess = 1, diff --git a/src/libraries/System.Speech/src/Result/RecognitionResult.cs b/src/libraries/System.Speech/src/Result/RecognitionResult.cs index b3fca40bce68ea..dacd7de22d949c 100644 --- a/src/libraries/System.Speech/src/Result/RecognitionResult.cs +++ b/src/libraries/System.Speech/src/Result/RecognitionResult.cs @@ -30,6 +30,7 @@ internal RecognitionResult() { } +#pragma warning disable SYSLIB0049 // Legacy formatter infrastructure is obsolete private RecognitionResult(SerializationInfo info, StreamingContext context) { // Get the set of serializable members for our class and base classes @@ -53,6 +54,7 @@ private RecognitionResult(SerializationInfo info, StreamingContext context) } } } +#pragma warning restore SYSLIB0049 #endregion @@ -65,6 +67,7 @@ public RecognizedAudio GetAudioForWordRange(RecognizedWordUnit firstWord, Recogn return Audio.GetRange(firstWord._audioPosition, lastWord._audioPosition + lastWord._audioDuration - firstWord._audioPosition); } +#pragma warning disable SYSLIB0049 // Legacy formatter infrastructure is obsolete void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { Helpers.ThrowIfNull(info, nameof(info)); @@ -107,6 +110,8 @@ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext contex } } } +#pragma warning restore SYSLIB0049 + internal bool SetTextFeedback(string text, bool isSuccessfulAction) { if (_sapiRecoResult == null) diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/NonWindowsUnsupported.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/NonWindowsUnsupported.cs index 4a540c6d0cb6d2..272fa78221d31b 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/NonWindowsUnsupported.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/NonWindowsUnsupported.cs @@ -58,7 +58,7 @@ internal static Exception NotSupported() /// clones have the same capabilities as the original transaction, except for the ability to commit /// the transaction. /// - internal class OletxTransaction : ISerializable, IObjectReference + internal class OletxTransaction : ISerializable { internal OletxTransaction() { @@ -108,9 +108,6 @@ internal IPromotedEnlistment EnlistVolatile( internal static byte[] GetExportCookie(byte[] whereaboutsCopy) => throw NotSupported(); - public object GetRealObject(StreamingContext context) - => throw NotSupported(); - internal static byte[] GetTransmitterPropagationToken() => throw NotSupported(); diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransaction.cs index c85ebe16bea71a..6416c1ca4becd1 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransaction.cs @@ -22,7 +22,12 @@ namespace System.Transactions.Oletx /// the transaction. /// [Serializable] - internal class OletxTransaction : ISerializable, IObjectReference + internal class OletxTransaction : ISerializable +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SA1001 // CommasMustBeSpacedCorrectly + , IObjectReference +#pragma warning restore SA1001 +#pragma warning restore SYSLIB0049 { // We have a strong reference on realOletxTransaction which does the real work internal RealOletxTransaction RealOletxTransaction; @@ -135,6 +140,7 @@ protected OletxTransaction(SerializationInfo? serializationInfo, StreamingContex RealOletxTransaction = null!; } +#pragma warning disable SYSLIB0049 // IObjectReference is obsolete public object GetRealObject(StreamingContext context) { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; @@ -181,6 +187,7 @@ public object GetRealObject(StreamingContext context) return returnValue; } +#pragma warning restore SYSLIB0049 /// /// Implementation of IDisposable.Dispose. Releases managed, and unmanaged resources diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs index 9067621f5f69fd..66fa2c3ce7829f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -88,9 +88,11 @@ private static bool IsUserCattrProvider(object obj) int count = 0; TypeAttributes Attributes = type.Attributes; +#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete /* IsSerializable returns true for delegates/enums as well */ if ((Attributes & TypeAttributes.Serializable) != 0) count++; +#pragma warning restore SYSLIB0049 if ((Attributes & TypeAttributes.Import) != 0) count++; @@ -99,8 +101,10 @@ private static bool IsUserCattrProvider(object obj) object[] attrs = new object[count]; count = 0; +#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete if ((Attributes & TypeAttributes.Serializable) != 0) attrs[count++] = new SerializableAttribute(); +#pragma warning restore SYSLIB0049 if ((Attributes & TypeAttributes.Import) != 0) attrs[count++] = new ComImportAttribute(); @@ -528,9 +532,11 @@ internal static IList GetCustomAttributesDataBase(ICustomAt int count = 0; TypeAttributes Attributes = type.Attributes; +#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete /* IsSerializable returns true for delegates/enums as well */ if ((Attributes & TypeAttributes.Serializable) != 0) count++; +#pragma warning restore SYSLIB0049 if ((Attributes & TypeAttributes.Import) != 0) count++; @@ -539,8 +545,10 @@ internal static IList GetCustomAttributesDataBase(ICustomAt CustomAttributeData[] attrsData = new CustomAttributeData[count]; count = 0; +#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete if ((Attributes & TypeAttributes.Serializable) != 0) attrsData[count++] = new RuntimeCustomAttributeData((typeof(SerializableAttribute)).GetConstructor(Type.EmptyTypes)!); +#pragma warning restore SYSLIB0049 if ((Attributes & TypeAttributes.Import) != 0) attrsData[count++] = new RuntimeCustomAttributeData((typeof(ComImportAttribute)).GetConstructor(Type.EmptyTypes)!); diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs index fcd8d18f8e96b5..bcc35c6c08f110 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs @@ -188,11 +188,13 @@ protected override void SetCustomAttributeCore(CustomAttributeBuilder customBuil offset |= ((int)data[5]) << 24; return; } +#pragma warning disable SYSLIB0049 // FieldAttributes.NotSerialized is obsolete else if (attrname == "System.NonSerializedAttribute") { attrs |= FieldAttributes.NotSerialized; return; } +#pragma warning restore SYSLIB0049 else if (attrname == "System.Runtime.CompilerServices.SpecialNameAttribute") { attrs |= FieldAttributes.SpecialName; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs index 18bc362c0e6e7e..d7473ca61857ee 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs @@ -1499,11 +1499,13 @@ protected override void SetCustomAttributeCore(CustomAttributeBuilder customBuil attrs |= TypeAttributes.SpecialName; return; } +#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete else if (attrname == "System.SerializableAttribute") { attrs |= TypeAttributes.Serializable; return; } +#pragma warning restore SYSLIB0049 else if (attrname == "System.Runtime.InteropServices.ComImportAttribute") { attrs |= TypeAttributes.Import; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs index 7da1a2e9465702..e1c87e18da2f96 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs @@ -40,8 +40,10 @@ internal virtual int GetFieldOffset() { int count = 0; +#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) count++; +#pragma warning restore SYSLIB0049 if (DeclaringType!.IsExplicitLayout) count++; @@ -55,8 +57,10 @@ internal virtual int GetFieldOffset() object[] attrs = new object[count]; count = 0; +#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) attrs[count++] = new NonSerializedAttribute(); +#pragma warning restore SYSLIB0049 if (DeclaringType.IsExplicitLayout) attrs[count++] = new FieldOffsetAttribute(GetFieldOffset()); if (marshalAs != null) @@ -69,8 +73,10 @@ internal virtual int GetFieldOffset() { int count = 0; +#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) count++; +#pragma warning restore SYSLIB0049 if (DeclaringType!.IsExplicitLayout) count++; @@ -84,8 +90,10 @@ internal virtual int GetFieldOffset() CustomAttributeData[] attrsData = new CustomAttributeData[count]; count = 0; +#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) attrsData[count++] = new RuntimeCustomAttributeData((typeof(NonSerializedAttribute)).GetConstructor(Type.EmptyTypes)!); +#pragma warning restore SYSLIB0049 if (DeclaringType.IsExplicitLayout) { var ctorArgs = new CustomAttributeTypedArgument[] { new CustomAttributeTypedArgument(typeof(int), GetFieldOffset()) }; From 63e0dd6ce602472ed2bff66ebdcfba9e9d2d513e Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Fri, 24 Mar 2023 16:29:46 -0700 Subject: [PATCH 2/7] More legacy serialization obsoletions - Introduce SYSLIB0050 warning --- Directory.Build.props | 2 +- docs/project/list-of-diagnostics.md | 1 + .../src/System/MulticastDelegate.cs | 3 + .../src/System/Reflection/RuntimeAssembly.cs | 3 + .../src/System/Reflection/RuntimeModule.cs | 3 + .../src/System/RuntimeHandles.cs | 7 + .../src/System/MulticastDelegate.cs | 3 + .../Runtime/Assemblies/RuntimeAssemblyInfo.cs | 3 + .../Runtime/Modules/RuntimeModule.cs | 3 + .../src/System/RuntimeFieldHandle.cs | 3 + .../src/System/RuntimeMethodHandle.cs | 3 + .../src/System/RuntimeTypeHandle.cs | 3 + .../Http2/Hpack/HPackDecodingException.cs | 5 + .../Http2/Hpack/HuffmanDecodingException.cs | 11 + .../Http3/QPack/QPackDecodingException.cs | 4 + .../Http3/QPack/QPackEncodingException.cs | 4 + .../NetworkInformationException.cs | 4 + .../Common/src/System/Obsoletions.cs | 3 + .../Cryptography/CryptoThrowHelper.Windows.cs | 11 +- .../Common/tests/Common.Tests.csproj | 1 + .../Microsoft.CSharp/ref/Microsoft.CSharp.cs | 4 + .../src/Microsoft.CSharp.csproj | 2 + .../RuntimeBinder/DynamicDebuggerProxy.cs | 2 + .../RuntimeBinder/RuntimeBinderException.cs | 3 + .../RuntimeBinderInternalCompilerException.cs | 3 + .../src/HostAbortedException.cs | 3 + ...oft.Extensions.Hosting.Abstractions.csproj | 1 + .../ref/Microsoft.VisualBasic.Core.cs | 6 +- .../FileIO/MalformedLineException.vb | 8 +- .../ref/Microsoft.Win32.Primitives.cs | 6 +- .../CodeDom/Compiler/CodeDomProvider.cs | 4 - .../ref/System.Collections.Specialized.cs | 10 + .../src/System.Collections.Specialized.csproj | 2 + .../Specialized/NameObjectCollectionBase.cs | 5 + .../Specialized/NameValueCollection.cs | 3 + .../Specialized/OrderedDictionary.cs | 5 + .../ref/System.Collections.cs | 14 ++ .../src/System.Collections.csproj | 2 + .../System/Collections/Generic/LinkedList.cs | 5 + .../Collections/Generic/SortedDictionary.cs | 1 + .../System/Collections/Generic/SortedSet.cs | 3 + .../ref/System.ComponentModel.Annotations.cs | 2 + .../System.ComponentModel.Annotations.csproj | 1 + .../DataAnnotations/ValidationException.cs | 3 + .../ref/System.ComponentModel.Composition.cs | 16 ++ .../System.ComponentModel.Composition.csproj | 2 + .../CompositionContractMismatchException.cs | 5 + .../ImportCardinalityMismatchException.cs | 5 + .../Primitives/ComposablePartException.cs | 9 + .../ref/System.ComponentModel.Primitives.cs | 4 + .../System.ComponentModel.Primitives.csproj | 1 + .../InvalidAsynchronousStateException.cs | 3 + .../InvalidEnumArgumentException.cs | 3 + .../System.ComponentModel.TypeConverter.cs | 10 + ...System.ComponentModel.TypeConverter.csproj | 2 + .../Design/CheckoutException.cs | 3 + .../System/ComponentModel/LicenseException.cs | 5 + .../System/ComponentModel/WarningException.cs | 5 + ...stem.Configuration.ConfigurationManager.cs | 44 ++++ .../ConfigurationErrorsException.cs | 9 + .../Configuration/ConfigurationException.cs | 9 + .../ConfigurationSectionCollection.cs | 7 - .../Provider/ProviderException.cs | 5 + .../SettingsAttributeDictionary.cs | 1 - .../System/Configuration/SettingsContext.cs | 1 - .../SettingsPropertyIsReadOnlyException.cs | 5 + .../SettingsPropertyNotFoundException.cs | 5 + .../SettingsPropertyWrongTypeException.cs | 5 + .../ref/System.Data.Common.cs | 50 ++++ .../src/System/Data/Common/DbException.cs | 4 + .../src/System/Data/DBConcurrencyException.cs | 4 + .../src/System/Data/DataException.cs | 22 ++ .../src/System/Data/DataSet.cs | 6 + .../src/System/Data/DataTable.cs | 4 + .../src/System/Data/Filter/FilterException.cs | 7 + .../src/System/Data/PropertyCollection.cs | 3 + .../src/System/Data/SQLTypes/SQLUtility.cs | 12 + .../src/System/Data/StrongTypingException.cs | 5 +- .../src/System/Data/TypedTableBase.cs | 3 + .../System.Data.Odbc/ref/System.Data.Odbc.cs | 4 + .../src/System.Data.Odbc.csproj | 2 + .../src/System/Data/Odbc/OdbcException.cs | 8 + .../ref/System.Data.OleDb.cs | 4 + .../System.Data.OleDb/src/OleDbException.cs | 4 + .../src/System.Data.OleDb.csproj | 2 + .../ref/System.Diagnostics.EventLog.cs | 24 ++ .../src/System.Diagnostics.EventLog.csproj | 2 + .../Diagnostics/Reader/EventLogException.cs | 24 ++ .../ref/System.Diagnostics.Tracing.cs | 2 + ...tem.DirectoryServices.AccountManagement.cs | 93 +++++--- ...DirectoryServices.AccountManagement.csproj | 2 + .../AccountManagement/exceptions.cs | 39 +++- .../ref/System.DirectoryServices.Protocols.cs | 28 +++ .../System.DirectoryServices.Protocols.csproj | 3 + .../Protocols/common/DirectoryException.cs | 13 ++ .../Protocols/ldap/LdapException.cs | 9 + .../ref/System.DirectoryServices.cs | 52 +++++ .../ActiveDirectory/Exception.cs | 44 ++++ .../DirectoryServicesCOMException.cs | 8 + .../ref/System.Formats.Asn1.cs | 4 + .../src/System.Formats.Asn1.csproj | 1 + .../Formats/Asn1/AsnContentException.cs | 5 + .../ref/System.Formats.Cbor.cs | 4 + .../src/System.Formats.Cbor.csproj | 1 + .../Formats/Cbor/CborContentException.cs | 5 + .../src/System.IO.Compression.csproj | 2 + .../Compression/DeflateZLib/ZLibException.cs | 8 + .../ref/System.IO.FileSystem.DriveInfo.cs | 2 + .../src/System.IO.FileSystem.DriveInfo.csproj | 2 + .../src/System/IO/DriveNotFoundException.cs | 3 + .../ref/System.IO.FileSystem.Watcher.cs | 2 + .../src/System.IO.FileSystem.Watcher.csproj | 2 + .../IO/InternalBufferOverflowException.cs | 3 + .../ref/System.IO.IsolatedStorage.cs | 2 + .../src/System.IO.IsolatedStorage.csproj | 2 + .../IsolatedStorageException.cs | 3 + .../ref/System.IO.Packaging.Serialization.cs | 8 + .../src/System.IO.Packaging.csproj | 1 + .../IO/Packaging/FileFormatException.cs | 9 + .../Expressions/Interpreter/LightCompiler.cs | 1 + .../ref/System.Management.cs | 41 +++- .../src/System.Management.csproj | 2 + .../Management/InteropClasses/WMIInterop.cs | 12 +- .../System/Management/ManagementBaseObject.cs | 4 + .../src/System/Management/ManagementClass.cs | 7 +- .../System/Management/ManagementException.cs | 10 +- .../ManagementNamedValueCollection.cs | 7 +- .../src/System/Management/ManagementObject.cs | 5 + .../src/System.Net.Http.WinHttpHandler.csproj | 2 + .../src/System/Net/Http/WinHttpException.cs | 4 + ....Net.Http.WinHttpHandler.Unit.Tests.csproj | 2 + .../src/System.Net.Http.csproj | 2 + .../HPackHuffmanBenchmark.csproj | 2 + .../System.Net.Http.Unit.Tests.csproj | 2 + .../ref/System.Net.HttpListener.cs | 2 + .../src/System.Net.HttpListener.csproj | 2 + .../src/System/Net/HttpListenerException.cs | 2 + .../System.Net.Mail/ref/System.Net.Mail.cs | 21 +- .../src/System.Net.Mail.csproj | 2 + .../src/System/Net/Mail/SmtpException.cs | 12 +- .../Net/Mail/SmtpFailedRecipientException.cs | 12 +- .../Net/Mail/SmtpFailedRecipientsException.cs | 12 +- .../Unit/System.Net.Mail.Unit.Tests.csproj | 2 + .../ref/System.Net.NetworkInformation.cs | 2 + .../src/System.Net.NetworkInformation.csproj | 1 + .../System.Net.Ping/ref/System.Net.Ping.cs | 2 + .../src/System.Net.Ping.csproj | 2 + .../Net/NetworkInformation/PingException.cs | 3 + .../ref/System.Net.Primitives.cs | 6 + .../src/System/Net/CookieException.cs | 6 + .../src/System/Net/SocketException.cs | 2 + .../System.Net.Primitives.Pal.Tests.csproj | 2 + ...stem.Net.Primitives.UnitTests.Tests.csproj | 2 + .../ref/System.Net.Requests.cs | 14 ++ .../src/System/Net/FileWebRequest.cs | 2 + .../src/System/Net/FileWebResponse.cs | 2 + .../src/System/Net/HttpWebRequest.cs | 2 + .../src/System/Net/HttpWebResponse.cs | 1 + .../System/Net/ProtocolViolationException.cs | 6 + .../src/System/Net/WebException.cs | 6 + .../src/System/Net/WebRequest.cs | 2 + .../src/System/Net/WebResponse.cs | 2 + .../ref/System.Net.Security.cs | 6 + .../Authentication/AuthenticationException.cs | 5 + .../ExtendedProtectionPolicy.cs | 3 + .../ref/System.Net.WebHeaderCollection.cs | 4 + .../src/System.Net.WebHeaderCollection.csproj | 2 + .../src/System/Net/WebHeaderCollection.cs | 5 + .../ref/System.Net.WebProxy.cs | 2 + .../src/System.Net.WebProxy.csproj | 1 + .../src/System/Net/WebProxy.cs | 3 + .../ref/System.Net.WebSockets.cs | 2 + .../src/System.Net.WebSockets.csproj | 2 + .../Net/WebSockets/WebSocketException.cs | 4 + ....Private.CoreLib.ManualShimTypeForwards.cs | 4 + .../src/System/AccessViolationException.cs | 3 + .../src/System/AggregateException.cs | 5 + .../src/System/AppDomainUnloadedException.cs | 3 + .../src/System/ApplicationException.cs | 3 + .../src/System/ArgumentException.cs | 5 + .../src/System/ArgumentNullException.cs | 3 + .../src/System/ArgumentOutOfRangeException.cs | 5 + .../src/System/ArithmeticException.cs | 3 + .../src/System/ArrayTypeMismatchException.cs | 3 + .../src/System/BadImageFormatException.cs | 5 + .../System/CannotUnloadAppDomainException.cs | 3 + .../src/System/Collections/Comparer.cs | 3 + .../System/Collections/Generic/Dictionary.cs | 5 + .../src/System/Collections/Generic/HashSet.cs | 5 + .../Generic/KeyNotFoundException.cs | 3 + .../NonRandomizedStringEqualityComparer.cs | 3 + .../src/System/Collections/Hashtable.cs | 11 +- .../System/ComponentModel/Win32Exception.cs | 7 +- .../src/System/Context.cs | 3 + .../src/System/DBNull.cs | 8 +- .../src/System/DataMisalignedException.cs | 3 + .../src/System/Delegate.cs | 3 + .../Contracts/ContractException.cs | 5 +- .../Tracing/EventSourceException.cs | 3 + .../src/System/DivideByZeroException.cs | 3 + .../src/System/DllNotFoundException.cs | 3 + .../System/DuplicateWaitObjectException.cs | 3 + .../src/System/EntryPointNotFoundException.cs | 3 + .../src/System/Exception.cs | 5 + .../src/System/FieldAccessException.cs | 3 + .../src/System/FormatException.cs | 3 + .../Globalization/CultureNotFoundException.cs | 5 + .../System/IO/DirectoryNotFoundException.cs | 3 + .../src/System/IO/EndOfStreamException.cs | 3 + .../src/System/IO/FileLoadException.cs | 5 + .../src/System/IO/FileNotFoundException.cs | 5 + .../src/System/IO/FileSystemInfo.cs | 5 + .../src/System/IO/IOException.cs | 3 + .../src/System/IO/InvalidDataException.cs | 1 + .../src/System/IO/PathTooLongException.cs | 3 + .../src/System/IndexOutOfRangeException.cs | 1 + .../InsufficientExecutionStackException.cs | 1 + .../src/System/InsufficientMemoryException.cs | 1 + .../src/System/InvalidCastException.cs | 3 + .../src/System/InvalidOperationException.cs | 3 + .../src/System/InvalidProgramException.cs | 1 + .../src/System/InvalidTimeZoneException.cs | 3 + .../src/System/MemberAccessException.cs | 3 + .../src/System/MethodAccessException.cs | 3 + .../src/System/MissingFieldException.cs | 3 + .../src/System/MissingMemberException.cs | 5 + .../src/System/MissingMethodException.cs | 3 + .../System/MulticastNotSupportedException.cs | 1 + .../src/System/NonSerializedAttribute.cs | 3 + .../src/System/NotFiniteNumberException.cs | 5 + .../src/System/NotImplementedException.cs | 3 + .../src/System/NotSupportedException.cs | 3 + .../src/System/NullReferenceException.cs | 3 + .../src/System/ObjectDisposedException.cs | 5 + .../src/System/OperatingSystem.cs | 3 + .../src/System/OperationCanceledException.cs | 3 + .../src/System/OutOfMemoryException.cs | 3 + .../src/System/OverflowException.cs | 3 + .../System/PlatformNotSupportedException.cs | 3 + .../src/System/RankException.cs | 3 + .../Reflection/AmbiguousMatchException.cs | 1 + .../src/System/Reflection/Assembly.cs | 3 + .../src/System/Reflection/AssemblyName.cs | 3 + .../CustomAttributeFormatException.cs | 3 + .../InvalidFilterCriteriaException.cs | 3 + .../src/System/Reflection/Module.cs | 3 + .../src/System/Reflection/ParameterInfo.cs | 2 + .../Reflection/ReflectionTypeLoadException.cs | 6 +- .../System/Reflection/StrongNameKeyPair.cs | 3 + .../src/System/Reflection/TargetException.cs | 3 + .../Reflection/TargetInvocationException.cs | 1 + .../TargetParameterCountException.cs | 1 + .../MissingManifestResourceException.cs | 1 + .../MissingSatelliteAssemblyException.cs | 3 + .../AmbiguousImplementationException.cs | 1 + .../RuntimeWrappedException.cs | 4 + .../SwitchExpressionException.cs | 4 + .../Runtime/InteropServices/COMException.cs | 3 + .../InteropServices/ExternalException.cs | 3 + .../InvalidComObjectException.cs | 3 + .../InvalidOleVariantTypeException.cs | 3 + .../MarshalDirectiveException.cs | 3 + .../Runtime/InteropServices/SEHException.cs | 3 + .../SafeArrayRankMismatchException.cs | 3 + .../SafeArrayTypeMismatchException.cs | 3 + .../Serialization/SerializationException.cs | 4 + .../System/Security/CryptographicException.cs | 3 + .../src/System/Security/SecurityException.cs | 5 + .../System/Security/VerificationException.cs | 3 + .../src/System/SerializableAttribute.cs | 3 + .../src/System/StackOverflowException.cs | 1 + .../src/System/SystemException.cs | 3 + .../System/Text/DecoderExceptionFallback.cs | 1 + .../System/Text/EncoderExceptionFallback.cs | 1 + .../Threading/AbandonedMutexException.cs | 3 + .../src/System/Threading/CompressedStack.cs | 3 + .../src/System/Threading/ExecutionContext.cs | 3 + .../Threading/LockRecursionException.cs | 3 + .../Threading/SemaphoreFullException.cs | 3 + .../Threading/SynchronizationLockException.cs | 3 + .../Threading/Tasks/TaskCanceledException.cs | 3 + .../Threading/Tasks/TaskSchedulerException.cs | 3 + .../System/Threading/ThreadAbortException.cs | 1 + .../Threading/ThreadInterruptedException.cs | 3 + .../System/Threading/ThreadStartException.cs | 1 + .../System/Threading/ThreadStateException.cs | 3 + .../WaitHandleCannotBeOpenedException.cs | 3 + .../src/System/TimeZoneNotFoundException.cs | 3 + .../src/System/TimeoutException.cs | 3 + .../src/System/TypeAccessException.cs | 3 + .../src/System/TypeInitializationException.cs | 4 + .../src/System/TypeLoadException.cs | 7 +- .../src/System/TypeUnloadedException.cs | 3 + .../src/System/UnauthorizedAccessException.cs | 3 + .../src/System/WeakReference.T.cs | 3 + .../src/System/WeakReference.cs | 5 + .../System.Private.Uri/src/System/Uri.cs | 3 + .../src/System/UriFormatException.cs | 4 + .../Inference/XmlSchemaInferenceException.cs | 5 + .../System/Xml/Schema/XmlSchemaException.cs | 5 + .../Schema/XmlSchemaValidationException.cs | 5 + .../src/System/Xml/XPath/XPathException.cs | 5 + .../src/System/Xml/XmlException.cs | 5 + .../Xml/Xsl/XPath/XPathCompileException.cs | 4 + .../src/System/Xml/Xsl/XslException.cs | 6 + .../src/System/Xml/Xslt/XsltException.cs | 9 + .../ref/System.Reflection.Metadata.Manual.cs | 4 + .../src/System.Reflection.Metadata.csproj | 1 + ...FormatLimitationException.Serialization.cs | 5 + .../TypeLoading/Assemblies/RoAssembly.cs | 5 + .../TypeLoading/Modules/RoModule.cs | 5 + .../ref/System.Runtime.InteropServices.cs | 16 ++ .../Directory.Build.props | 2 +- ...System.Runtime.Serialization.Primitives.cs | 2 + ...em.Runtime.Serialization.Primitives.csproj | 1 + .../InvalidDataContractException.cs | 3 + .../tests/SerializationTypes.RuntimeOnly.cs | 6 + .../System.Runtime/ref/System.Runtime.cs | 213 +++++++++++++++++- .../ref/System.Security.AccessControl.cs | 2 + .../src/System.Security.AccessControl.csproj | 2 + .../PrivilegeNotHeldException.cs | 6 +- .../ref/System.Security.Claims.cs | 6 + .../src/System.Security.Claims.csproj | 1 + .../System/Security/Claims/ClaimsIdentity.cs | 5 + .../System/Security/Claims/ClaimsPrincipal.cs | 3 + .../System.Security.Cryptography.Xml.csproj | 2 + .../Xml/CryptoSignedXmlRecursionException.cs | 5 + .../ref/System.Security.Cryptography.cs | 6 + ...yptographicUnexpectedOperationException.cs | 3 + .../X509Certificates/X509Certificate.cs | 3 + .../X509Certificates/X509Certificate2.cs | 3 + .../ref/System.Security.Permissions.cs | 12 + .../src/System/ApplicationIdentity.cs | 5 - .../Security/HostProtectionException.cs | 9 + .../src/System/Security/Policy/Hash.cs | 5 + .../System/Security/Policy/PolicyException.cs | 5 + .../src/System/Security/XmlSyntaxException.cs | 3 + .../ref/System.Security.Principal.Windows.cs | 4 + .../System.Security.Principal.Windows.csproj | 2 + .../Principal/IdentityNotMappedException.cs | 4 + .../Security/Principal/WindowsIdentity.cs | 2 + ...System.ServiceProcess.ServiceController.cs | 4 + ...em.ServiceProcess.ServiceController.csproj | 2 + .../System/ServiceProcess/TimeoutException.cs | 5 + .../src/Internal/Synthesis/AudioException.cs | 6 + .../src/Result/RecognitionResult.cs | 1 + .../System.Speech/src/System.Speech.csproj | 2 + .../System.Text.Json/ref/System.Text.Json.cs | 8 + .../src/System/Text/Json/JsonException.cs | 9 + .../Text/Json/Reader/JsonReaderException.cs | 3 + ...m.Text.RegularExpressions.Generator.csproj | 1 + .../ref/System.Text.RegularExpressions.cs | 6 + .../System/Text/RegularExpressions/Regex.cs | 3 + .../RegexMatchTimeoutException.cs | 4 + .../RegularExpressions/RegexParseException.cs | 13 +- ....Text.RegularExpressions.Unit.Tests.csproj | 1 + .../System.Threading.Channels.netcoreapp.cs | 4 + .../src/System.Threading.Channels.csproj | 2 + .../ChannelClosedException.netcoreapp.cs | 5 + .../ref/System.Threading.Thread.cs | 6 + .../System.Threading/ref/System.Threading.cs | 14 ++ .../src/System.Threading.csproj | 2 + .../src/System/Threading/Barrier.cs | 3 + .../src/System/Threading/ReaderWriterLock.cs | 1 + .../ref/System.Transactions.Local.cs | 10 + .../src/System.Transactions.Local.csproj | 1 + .../Transactions/TransactionException.cs | 11 + .../ref/System.Windows.Extensions.cs | 4 + .../src/System.Windows.Extensions.csproj | 2 + .../src/System/Media/SoundPlayer.cs | 4 + .../ref/System.Xml.ReaderWriter.cs | 24 ++ .../System.Xml.XPath/ref/System.Xml.XPath.cs | 4 + .../src/System/MulticastDelegate.cs | 3 + .../src/System/RuntimeFieldHandle.cs | 9 +- .../src/System/RuntimeMethodHandle.cs | 9 +- .../src/System/RuntimeTypeHandle.cs | 9 +- 376 files changed, 2025 insertions(+), 150 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 55f6cfef5e749a..d82c6edce3d51d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -442,7 +442,7 @@ - $(NoWarn);SYSLIB0011;SYSLIB0049 + $(NoWarn);SYSLIB0011;SYSLIB0049;SYSLIB0050 $(NoWarn);IL2121 diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 5c196c912766eb..dc804bd629a902 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -105,6 +105,7 @@ The PR that reveals the implementation of the ` GetCustomAttributesData() #endregion #region Public Virtuals + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.cs b/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.cs index 9fe38d5fe89af1..bc3b9cb9696d5c 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.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; @@ -667,6 +668,8 @@ internal static void RegisterCollectibleTypeDependency(RuntimeType type, Runtime RegisterCollectibleTypeDependency(new QCallTypeHandle(ref type), new QCallAssembly(ref assembly!)); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); @@ -777,6 +780,8 @@ private static IntPtr GetValueInternal(RuntimeMethodHandle rmh) } // ISerializable interface + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); @@ -1222,6 +1227,8 @@ internal static RuntimeType GetApproxDeclaringType(IRuntimeFieldInfo field) internal static extern LoaderAllocator GetLoaderAllocator(RuntimeFieldHandleInternal method); // ISerializable interface + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/MulticastDelegate.cs index 739ae037dbb36a..057db98ff670a9 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/MulticastDelegate.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/MulticastDelegate.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; @@ -408,6 +409,8 @@ protected override MethodInfo GetMethodImpl() return base.GetMethodImpl(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(SR.Serialization_DelegatesNotSupported); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/RuntimeAssemblyInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/RuntimeAssemblyInfo.cs index 93c1252f62222b..bda0e77b3d4a33 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/RuntimeAssemblyInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/RuntimeAssemblyInfo.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; @@ -37,6 +38,8 @@ public sealed override string FullName } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs index 832628114097b5..d8c86e83cc91ea 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.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.Runtime.Serialization; @@ -55,6 +56,8 @@ public sealed override int GetHashCode() return Assembly.GetHashCode(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs index 527f040f10d360..7f8b164ba2b356 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.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.Reflection; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -80,6 +81,8 @@ public override int GetHashCode() return !left.Equals(right); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs index 27e6c489030af9..ba7843ba7c75e8 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.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.Reflection; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -119,6 +120,8 @@ public IntPtr GetFunctionPointer() return ReflectionAugments.ReflectionCoreCallbacks.GetFunctionPointer(this, declaringType); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs index ffd6d9de72bc19..cdf98172819758 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.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.Runtime; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; @@ -107,6 +108,8 @@ public ModuleHandle GetModuleHandle() return type.Module.ModuleHandle; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs index b0225bb6f9a140..dd4c102e4f6dc9 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.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.Runtime.Serialization; namespace System.Net.Http.HPack @@ -21,6 +22,10 @@ public HPackDecodingException(string message, Exception innerException) : base(m { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public HPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs index 287497b7ee115b..b83ca6502e8c55 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.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.Runtime.Serialization; namespace System.Net.Http.HPack @@ -18,16 +19,26 @@ public HuffmanDecodingException(string message) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private HuffmanDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs index 760403267f45a1..5de0efff935d4f 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.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.Runtime.Serialization; namespace System.Net.Http.QPack @@ -20,6 +21,9 @@ public QPackDecodingException(string message, Exception innerException) : base(m { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private QPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs index 6b5647e18e2e4d..7e6eb6f1b79280 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.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.Runtime.Serialization; namespace System.Net.Http.QPack @@ -17,6 +18,9 @@ public QPackEncodingException(string message, Exception innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private QPackEncodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs b/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs index 7c831aa2c43a83..14d23cad452391 100644 --- a/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs +++ b/src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs @@ -35,6 +35,10 @@ public NetworkInformationException(int errorCode) : base(errorCode) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected NetworkInformationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index ae001006a807da..3c2dbea734e3a8 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -162,5 +162,8 @@ internal static class Obsoletions internal const string LegacyFormatterMessage = "Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."; internal const string LegacyFormatterDiagId = "SYSLIB0049"; + + internal const string LegacyFormatterImplMessage = "Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."; + internal const string LegacyFormatterImplDiagId = "SYSLIB0050"; } } diff --git a/src/libraries/Common/src/System/Security/Cryptography/CryptoThrowHelper.Windows.cs b/src/libraries/Common/src/System/Security/Cryptography/CryptoThrowHelper.Windows.cs index b41fe846066263..3081a8bc239bad 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/CryptoThrowHelper.Windows.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/CryptoThrowHelper.Windows.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Security.Cryptography; #if !NETCOREAPP3_1_OR_GREATER @@ -43,11 +44,7 @@ public static CryptographicException ToCryptographicException(this int hr) [Serializable] private sealed class WindowsCryptographicException : CryptographicException { - private WindowsCryptographicException(SerializationInfo info, StreamingContext context) - { - Debug.Fail("This should never be called; we swap the active type during serialization."); - throw new NotImplementedException(); - } + // No need for a serialization ctor: we swap the active type during serialization. public WindowsCryptographicException(int hr, string message) : base(message) @@ -55,6 +52,10 @@ public WindowsCryptographicException(int hr, string message) HResult = hr; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { // This exception shouldn't be serialized since it's a private implementation diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index 5ed2a1ea9b5eae..2982390a3206dd 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -107,6 +107,7 @@ + + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected RuntimeBinderException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs index babe0e5e4c281d..16f19cfff84991 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderInternalCompilerException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Runtime.Serialization; namespace Microsoft.CSharp.RuntimeBinder @@ -46,6 +47,8 @@ public RuntimeBinderInternalCompilerException(string? message, Exception? innerE /// /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected RuntimeBinderInternalCompilerException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostAbortedException.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostAbortedException.cs index c8b88f3218c45f..bb5f8b675a08dc 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostAbortedException.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/HostAbortedException.cs @@ -11,6 +11,9 @@ namespace Microsoft.Extensions.Hosting [Serializable] public sealed class HostAbortedException : Exception { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private HostAbortedException(SerializationInfo info, StreamingContext context) : base(info, context) { } /// diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj index 8ff8abe585f6de..598d4bd69cbd53 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj @@ -10,6 +10,7 @@ + diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 554e10b8ba2075..e3fe236484c4f0 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -1296,7 +1296,8 @@ public static void WriteAllText(string file, string text, bool append, System.Te public partial class MalformedLineException : System.Exception { public MalformedLineException() { } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MalformedLineException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MalformedLineException(string? message) { } public MalformedLineException(string? message, System.Exception? innerException) { } @@ -1304,7 +1305,8 @@ public MalformedLineException(string? message, long lineNumber) { } public MalformedLineException(string? message, long lineNumber, System.Exception? innerException) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Always)] public long LineNumber { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb index adcab1329dd581..c505146937b28a 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb @@ -73,7 +73,9 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ''' - + ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + + Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) @@ -105,7 +107,9 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ''' - + ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + + Public Overrides Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) If info IsNot Nothing Then ' Fix FxCop violation ValidateArgumentsOfPublicMethods. info.AddValue(LINE_NUMBER_PROPERTY, m_LineNumber, GetType(Long)) diff --git a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs index 7403f5ae4ff2cb..d83e5c1374707b 100644 --- a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs +++ b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs @@ -6,15 +6,19 @@ namespace System.ComponentModel { - public partial class Win32Exception : System.Runtime.InteropServices.ExternalException, System.Runtime.Serialization.ISerializable + public partial class Win32Exception : System.Runtime.InteropServices.ExternalException { public Win32Exception() { } public Win32Exception(int error) { } public Win32Exception(int error, string? message) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Win32Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Win32Exception(string? message) { } public Win32Exception(string? message, System.Exception? innerException) { } public int NativeErrorCode { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } diff --git a/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs b/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs index 037dcf84df7a42..b7ef07bf1e3dfe 100644 --- a/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs +++ b/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs @@ -215,10 +215,6 @@ private ICodeParser CreateParserHelper() private sealed class ConfigurationErrorsException : SystemException { public ConfigurationErrorsException(string message) : base(message) { } - public ConfigurationErrorsException(SerializationInfo info, StreamingContext context) : base(info, context) - { - throw new PlatformNotSupportedException(); - } } } } diff --git a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs index 00fc77efe910c2..1d03416e5fc839 100644 --- a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs +++ b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs @@ -96,6 +96,8 @@ protected NameObjectCollectionBase(int capacity) { } protected NameObjectCollectionBase(int capacity, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use NameObjectCollectionBase(Int32, IEqualityComparer) instead.")] protected NameObjectCollectionBase(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameObjectCollectionBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual int Count { get { throw null; } } protected bool IsReadOnly { get { throw null; } set { } } @@ -116,6 +118,8 @@ protected void BaseRemoveAt(int index) { } protected void BaseSet(int index, object? value) { } protected void BaseSet(string? name, object? value) { } public virtual System.Collections.IEnumerator GetEnumerator() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } @@ -143,6 +147,8 @@ public NameValueCollection(int capacity, System.Collections.IEqualityComparer? e [System.ObsoleteAttribute("This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.")] public NameValueCollection(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } public NameValueCollection(int capacity, System.Collections.Specialized.NameValueCollection col) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual string?[] AllKeys { get { throw null; } } public string? this[int index] { get { throw null; } } @@ -167,6 +173,8 @@ public OrderedDictionary() { } public OrderedDictionary(System.Collections.IEqualityComparer? comparer) { } public OrderedDictionary(int capacity) { } public OrderedDictionary(int capacity, System.Collections.IEqualityComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OrderedDictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } public bool IsReadOnly { get { throw null; } } @@ -183,6 +191,8 @@ public void Clear() { } public bool Contains(object key) { throw null; } public void CopyTo(System.Array array, int index) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Insert(int index, object key, object? value) { } protected virtual void OnDeserialization(object? sender) { } diff --git a/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj b/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj index 7a340228a3533d..72b32ed04ee5fa 100644 --- a/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj +++ b/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj @@ -14,6 +14,8 @@ + diff --git a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameObjectCollectionBase.cs b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameObjectCollectionBase.cs index 0d979fce371016..88f03f90401658 100644 --- a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameObjectCollectionBase.cs +++ b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameObjectCollectionBase.cs @@ -10,6 +10,7 @@ #pragma warning disable 618 // obsolete types, namely IHashCodeProvider +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.Serialization; @@ -77,11 +78,15 @@ protected NameObjectCollectionBase(int capacity) Reset(capacity); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NameObjectCollectionBase(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameValueCollection.cs b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameValueCollection.cs index cb8814663043fa..6337a341d21192 100644 --- a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameValueCollection.cs +++ b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/NameValueCollection.cs @@ -7,6 +7,7 @@ * */ +using System.ComponentModel; using System.Diagnostics; using System.Runtime.Serialization; using System.Text; @@ -89,6 +90,8 @@ public NameValueCollection(int capacity, IHashCodeProvider? hashProvider, ICompa { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NameValueCollection(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.cs b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.cs index 82a0c188c6bff7..7e445ce3e5fc3e 100644 --- a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.cs +++ b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.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.Runtime.Serialization; @@ -64,6 +65,8 @@ private OrderedDictionary(OrderedDictionary dictionary) _initialCapacity = dictionary._initialCapacity; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected OrderedDictionary(SerializationInfo info, StreamingContext context) { // We can't do anything with the keys and values until the entire graph has been deserialized @@ -376,6 +379,8 @@ IEnumerator IEnumerable.GetEnumerator() #endregion #region ISerializable implementation + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Collections/ref/System.Collections.cs b/src/libraries/System.Collections/ref/System.Collections.cs index ed0eda8dd458b0..20c1bb23cd7f4d 100644 --- a/src/libraries/System.Collections/ref/System.Collections.cs +++ b/src/libraries/System.Collections/ref/System.Collections.cs @@ -57,6 +57,8 @@ public partial class LinkedList : System.Collections.Generic.ICollection, { public LinkedList() { } public LinkedList(System.Collections.Generic.IEnumerable collection) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } public System.Collections.Generic.LinkedListNode? First { get { throw null; } } @@ -78,6 +80,8 @@ public void CopyTo(T[] array, int index) { } public System.Collections.Generic.LinkedListNode? Find(T value) { throw null; } public System.Collections.Generic.LinkedListNode? FindLast(T value) { throw null; } public System.Collections.Generic.LinkedList.Enumerator GetEnumerator() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } public void Remove(System.Collections.Generic.LinkedListNode node) { } @@ -313,6 +317,8 @@ public SortedSet() { } public SortedSet(System.Collections.Generic.IComparer? comparer) { } public SortedSet(System.Collections.Generic.IEnumerable collection) { } public SortedSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IComparer Comparer { get { throw null; } } public int Count { get { throw null; } } @@ -435,6 +441,8 @@ public Dictionary(System.Collections.Generic.IEnumerable? comparer) { } public Dictionary(int capacity) { } public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } public int Count { get { throw null; } } @@ -459,6 +467,8 @@ public void Clear() { } public bool ContainsValue(TValue value) { throw null; } public int EnsureCapacity(int capacity) { throw null; } public System.Collections.Generic.Dictionary.Enumerator GetEnumerator() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } public bool Remove(TKey key) { throw null; } @@ -566,6 +576,8 @@ public HashSet(System.Collections.Generic.IEnumerable collection, System.Coll public HashSet(System.Collections.Generic.IEqualityComparer? comparer) { } public HashSet(int capacity) { } public HashSet(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } public int Count { get { throw null; } } @@ -580,6 +592,8 @@ public void CopyTo(T[] array, int arrayIndex, int count) { } public int EnsureCapacity(int capacity) { throw null; } public void ExceptWith(System.Collections.Generic.IEnumerable other) { } public System.Collections.Generic.HashSet.Enumerator GetEnumerator() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void IntersectWith(System.Collections.Generic.IEnumerable other) { } public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) { throw null; } diff --git a/src/libraries/System.Collections/src/System.Collections.csproj b/src/libraries/System.Collections/src/System.Collections.csproj index 102ab0ee950ddf..a7e8976d48bfcd 100644 --- a/src/libraries/System.Collections/src/System.Collections.csproj +++ b/src/libraries/System.Collections/src/System.Collections.csproj @@ -29,6 +29,8 @@ Link="Common\System\Collections\Generic\BitHelper.cs" /> + diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs b/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs index a50dce3b158946..14dbc030d7a148 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.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.Runtime.Serialization; @@ -38,6 +39,8 @@ public LinkedList(IEnumerable collection) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected LinkedList(SerializationInfo info, StreamingContext context) { _siInfo = info; @@ -318,6 +321,8 @@ public void RemoveLast() InternalRemoveNode(head.prev!); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs index 64d745a778fcef..78fefca3e0321c 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs @@ -893,6 +893,7 @@ public TreeSet(IComparer? comparer) : base(comparer) { } internal TreeSet(TreeSet set, IComparer? comparer) : base(set, comparer) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private TreeSet(SerializationInfo siInfo, StreamingContext context) : base(siInfo, context) { } internal override bool AddIfNotPresent(T item) diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs index 3282996e5bc5d3..13282ba2137e3b 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.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.Numerics; @@ -125,6 +126,8 @@ public SortedSet(IEnumerable collection, IComparer? comparer) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SortedSet(SerializationInfo info, StreamingContext context) => siInfo = info; #endregion diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index 8658dcecfd6b76..a1fb41bf584e85 100644 --- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -360,6 +360,8 @@ public partial class ValidationException : System.Exception { public ValidationException() { } public ValidationException(System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute? validatingAttribute, object? value) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ValidationException(string? message) { } public ValidationException(string? errorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute? validatingAttribute, object? value) { } diff --git a/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj b/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj index 7f273f3dc5b1f6..40eb3b829bedfb 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj +++ b/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj @@ -60,6 +60,7 @@ + diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationException.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationException.cs index 8e82711afa3c6f..79cf8bd1046278 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationException.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationException.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.Runtime.Serialization; namespace System.ComponentModel.DataAnnotations @@ -74,6 +75,8 @@ public ValidationException(string? message, Exception? innerException) /// /// The SerializationInfo. /// The StreamingContext. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ValidationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs index 60accaee91e879..51b7bb732b4c7c 100644 --- a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs +++ b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs @@ -55,6 +55,10 @@ public ChangeRejectedException(string? message, System.Exception? innerException public partial class CompositionContractMismatchException : System.Exception { public CompositionContractMismatchException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected CompositionContractMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CompositionContractMismatchException(string? message) { } public CompositionContractMismatchException(string? message, System.Exception? innerException) { } @@ -141,6 +145,10 @@ public ImportAttribute(System.Type? contractType) { } public partial class ImportCardinalityMismatchException : System.Exception { public ImportCardinalityMismatchException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ImportCardinalityMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ImportCardinalityMismatchException(string? message) { } public ImportCardinalityMismatchException(string? message, System.Exception? innerException) { } @@ -535,12 +543,20 @@ protected ComposablePartDefinition() { } public partial class ComposablePartException : System.Exception { public ComposablePartException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ComposablePartException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ComposablePartException(string? message) { } public ComposablePartException(string? message, System.ComponentModel.Composition.Primitives.ICompositionElement? element) { } public ComposablePartException(string? message, System.ComponentModel.Composition.Primitives.ICompositionElement? element, System.Exception? innerException) { } public ComposablePartException(string? message, System.Exception? innerException) { } public System.ComponentModel.Composition.Primitives.ICompositionElement? Element { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class ContractBasedImportDefinition : System.ComponentModel.Composition.Primitives.ImportDefinition diff --git a/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj b/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj index 87848420f25f37..0c043fd8a11c8a 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj +++ b/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj @@ -202,5 +202,7 @@ System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices + diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionContractMismatchException.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionContractMismatchException.cs index 498ba7b641cc0c..73b8f0b233529c 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionContractMismatchException.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionContractMismatchException.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.Runtime.Serialization; namespace System.ComponentModel.Composition @@ -76,6 +77,10 @@ public CompositionContractMismatchException(string? message, Exception? innerExc /// /// contains a value that cannot be cast to the correct type. /// +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected CompositionContractMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportCardinalityMismatchException.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportCardinalityMismatchException.cs index 343039d831319a..898934ac298a25 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportCardinalityMismatchException.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportCardinalityMismatchException.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.Runtime.Serialization; @@ -79,6 +80,10 @@ public ImportCardinalityMismatchException(string? message, Exception? innerExcep /// /// contains a value that cannot be cast to the correct type. /// +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ImportCardinalityMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartException.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartException.cs index f719cd5b71ef22..95a0369cd02024 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartException.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartException.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.Runtime.Serialization; @@ -46,6 +47,10 @@ public ComposablePartException() /// /// contains a value that cannot be cast to the correct type. /// +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ComposablePartException(SerializationInfo info, StreamingContext context) : base(info, context) { _element = (ICompositionElement?)info.GetValue("Element", typeof(ICompositionElement)); @@ -159,6 +164,10 @@ public ICompositionElement? Element /// /// is . /// +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs index 2575dcf5013de0..babb2efda26ef1 100644 --- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs +++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs @@ -221,6 +221,8 @@ public InitializationEventAttribute(string eventName) { } public partial class InvalidAsynchronousStateException : System.ArgumentException { public InvalidAsynchronousStateException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidAsynchronousStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidAsynchronousStateException(string? message) { } public InvalidAsynchronousStateException(string? message, System.Exception? innerException) { } @@ -228,6 +230,8 @@ public InvalidAsynchronousStateException(string? message, System.Exception? inne public partial class InvalidEnumArgumentException : System.ArgumentException { public InvalidEnumArgumentException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidEnumArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidEnumArgumentException(string? message) { } public InvalidEnumArgumentException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj index 70b4d97cc473f4..fe840c389fd159 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj +++ b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj @@ -38,6 +38,7 @@ + diff --git a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidAsynchronousStateException.cs b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidAsynchronousStateException.cs index d72bf2d2e1703e..335ade13eff7c8 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidAsynchronousStateException.cs +++ b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidAsynchronousStateException.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.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -38,6 +39,8 @@ public InvalidAsynchronousStateException(string? message, Exception? innerExcept { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidAsynchronousStateException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidEnumArgumentException.cs b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidEnumArgumentException.cs index 567e6a7408cb8a..db2dde302c9c99 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidEnumArgumentException.cs +++ b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidEnumArgumentException.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.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -56,6 +57,8 @@ public InvalidEnumArgumentException(string? argumentName, int invalidValue, Type /// Need this constructor since Exception implements ISerializable. /// We don't have any fields, so just forward this to base. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidEnumArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { } 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 571f81e9f66911..78c4aebd94e472 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -721,12 +721,16 @@ public virtual void SetSavedLicenseKey(System.Type type, string key) { } } public partial class LicenseException : System.SystemException { + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LicenseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LicenseException(System.Type? type) { } public LicenseException(System.Type? type, object? instance) { } public LicenseException(System.Type? type, object? instance, string? message) { } public LicenseException(System.Type? type, object? instance, string? message, System.Exception? innerException) { } public System.Type? LicensedType { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public sealed partial class LicenseManager @@ -1581,6 +1585,8 @@ public VersionConverter() { } public partial class WarningException : System.SystemException { public WarningException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WarningException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WarningException(string? message) { } public WarningException(string? message, System.Exception? innerException) { } @@ -1588,6 +1594,8 @@ public WarningException(string? message, string? helpUrl) { } public WarningException(string? message, string? helpUrl, string? helpTopic) { } public string? HelpTopic { get { throw null; } } public string? HelpUrl { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } } @@ -1604,6 +1612,8 @@ public partial class CheckoutException : System.Runtime.InteropServices.External { public static readonly System.ComponentModel.Design.CheckoutException Canceled; public CheckoutException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CheckoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CheckoutException(string? message) { } public CheckoutException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj index 55ae3dff4e3dbe..f8b998c751ef22 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj @@ -99,6 +99,8 @@ + diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/CheckoutException.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/CheckoutException.cs index 7605b016a1af0e..c4a20c0cbe6cab 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/CheckoutException.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/CheckoutException.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.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -50,6 +51,8 @@ public CheckoutException(string? message, int errorCode) : base(message, errorCo /// Need this constructor since Exception implements ISerializable. We don't have any fields, /// so just forward this to base. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CheckoutException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs index 715ba7b9a8e10a..9e96a64860b981 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.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.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -57,6 +58,8 @@ public LicenseException(Type? type, object? instance, string? message, Exception /// /// Need this constructor since Exception implements ISerializable. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected LicenseException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -69,6 +72,8 @@ protected LicenseException(SerializationInfo info, StreamingContext context) : b /// /// Need this since Exception implements ISerializable. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/WarningException.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/WarningException.cs index 211ee6781b85fe..f49b0e12c580b5 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/WarningException.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/WarningException.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.Runtime.Serialization; namespace System.ComponentModel @@ -58,6 +59,8 @@ public WarningException(string? message, string? helpUrl, string? helpTopic) : b /// /// Need this constructor since Exception implements ISerializable. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WarningException(SerializationInfo info, StreamingContext context) : base(info, context) { HelpUrl = (string?)info.GetValue("helpUrl", typeof(string)); @@ -74,6 +77,8 @@ protected WarningException(SerializationInfo info, StreamingContext context) : b /// public string? HelpTopic { get; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs index 7ef3558b7f6649..d04341b7261add 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs @@ -268,6 +268,10 @@ public ConfigurationElementProperty(System.Configuration.ConfigurationValidatorB public partial class ConfigurationErrorsException : System.Configuration.ConfigurationException { public ConfigurationErrorsException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ConfigurationErrorsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ConfigurationErrorsException(string message) { } public ConfigurationErrorsException(string message, System.Exception inner) { } @@ -286,12 +290,20 @@ public ConfigurationErrorsException(string message, System.Xml.XmlReader reader) public static string GetFilename(System.Xml.XmlReader reader) { throw null; } public static int GetLineNumber(System.Xml.XmlNode node) { throw null; } public static int GetLineNumber(System.Xml.XmlReader reader) { throw null; } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class ConfigurationException : System.SystemException { [System.ObsoleteAttribute("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException instead.")] public ConfigurationException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.ObsoleteAttribute("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException instead.")] public ConfigurationException(string message) { } @@ -309,6 +321,10 @@ public ConfigurationException(string message, System.Xml.XmlNode node) { } public virtual string Filename { get { throw null; } } public virtual int Line { get { throw null; } } public override string Message { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.ObsoleteAttribute("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException.GetFilename instead.")] public static string GetXmlNodeFilename(System.Xml.XmlNode node) { throw null; } @@ -455,6 +471,10 @@ public void CopyTo(System.Configuration.ConfigurationSection[] array, int index) public System.Configuration.ConfigurationSection Get(string name) { throw null; } public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Remove(string name) { } public void RemoveAt(int index) { } @@ -487,6 +507,10 @@ public void CopyTo(System.Configuration.ConfigurationSectionGroup[] array, int i public System.Configuration.ConfigurationSectionGroup Get(string name) { throw null; } public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Remove(string name) { } public void RemoveAt(int index) { } @@ -864,6 +888,10 @@ internal PropertyInformationCollection() { } public System.Configuration.PropertyInformation this[string propertyName] { get { throw null; } } public void CopyTo(System.Configuration.PropertyInformation[] array, int index) { } public override System.Collections.IEnumerator GetEnumerator() { throw null; } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public enum PropertyValueOrigin @@ -1146,6 +1174,10 @@ public void SetReadOnly() { } public partial class SettingsPropertyIsReadOnlyException : System.Exception { public SettingsPropertyIsReadOnlyException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected SettingsPropertyIsReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SettingsPropertyIsReadOnlyException(string message) { } public SettingsPropertyIsReadOnlyException(string message, System.Exception innerException) { } @@ -1153,6 +1185,10 @@ public SettingsPropertyIsReadOnlyException(string message, System.Exception inne public partial class SettingsPropertyNotFoundException : System.Exception { public SettingsPropertyNotFoundException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected SettingsPropertyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SettingsPropertyNotFoundException(string message) { } public SettingsPropertyNotFoundException(string message, System.Exception innerException) { } @@ -1186,6 +1222,10 @@ public void SetReadOnly() { } public partial class SettingsPropertyWrongTypeException : System.Exception { public SettingsPropertyWrongTypeException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected SettingsPropertyWrongTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SettingsPropertyWrongTypeException(string message) { } public SettingsPropertyWrongTypeException(string message, System.Exception innerException) { } @@ -1571,6 +1611,10 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } public partial class ProviderException : System.Exception { public ProviderException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ProviderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ProviderException(string message) { } public ProviderException(string message, System.Exception innerException) { } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationErrorsException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationErrorsException.cs index 5cc2b89c8aaf90..e78b7ecbd7fa78 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationErrorsException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationErrorsException.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Configuration.Internal; using System.Globalization; using System.IO; @@ -100,6 +101,10 @@ internal ConfigurationErrorsException(ArrayList coll) : coll.CopyTo(_errors, 0); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ConfigurationErrorsException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -191,6 +196,10 @@ private static ConfigurationException GetFirstException(ICollection Get(name); public ConfigurationSection this[int index] => Get(index); diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/Provider/ProviderException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/Provider/ProviderException.cs index 98341b706b73f5..a0e163d6eb3550 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/Provider/ProviderException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/Provider/ProviderException.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.Runtime.Serialization; namespace System.Configuration.Provider @@ -19,6 +20,10 @@ public ProviderException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ProviderException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsAttributeDictionary.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsAttributeDictionary.cs index 48f1364b89f624..5291d82555fbef 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsAttributeDictionary.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsAttributeDictionary.cs @@ -13,7 +13,6 @@ public SettingsAttributeDictionary() : base() { } public SettingsAttributeDictionary(SettingsAttributeDictionary attributes) : base(attributes) { } protected SettingsAttributeDictionary(SerializationInfo serializationInfo, StreamingContext streamingContext) - : base(serializationInfo, streamingContext) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsContext.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsContext.cs index 0a9a47210536c9..2834f365d12340 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsContext.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsContext.cs @@ -11,7 +11,6 @@ public class SettingsContext : Hashtable public SettingsContext() : base() { } protected SettingsContext(SerializationInfo serializationInfo, StreamingContext streamingContext) - : base(serializationInfo, streamingContext) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyIsReadOnlyException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyIsReadOnlyException.cs index 44bcb81ef60a5a..e8988c01f2f152 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyIsReadOnlyException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyIsReadOnlyException.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.Runtime.Serialization; namespace System.Configuration @@ -19,6 +20,10 @@ public SettingsPropertyIsReadOnlyException(string message, Exception innerExcept { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected SettingsPropertyIsReadOnlyException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyNotFoundException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyNotFoundException.cs index 15ad57f97fc6c5..51cd1c7119beeb 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyNotFoundException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyNotFoundException.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.Runtime.Serialization; namespace System.Configuration @@ -19,6 +20,10 @@ public SettingsPropertyNotFoundException(string message, Exception innerExceptio { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected SettingsPropertyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyWrongTypeException.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyWrongTypeException.cs index ade0cb641debb0..9ce44c1c31a936 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyWrongTypeException.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyWrongTypeException.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.Runtime.Serialization; namespace System.Configuration @@ -19,6 +20,10 @@ public SettingsPropertyWrongTypeException(string message, Exception innerExcepti { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected SettingsPropertyWrongTypeException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs index c8565ae45e1901..e8da2f171b2e20 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -88,6 +88,8 @@ public void RemoveAt(int index) { } public partial class ConstraintException : System.Data.DataException { public ConstraintException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ConstraintException(string? s) { } public ConstraintException(string? message, System.Exception? innerException) { } @@ -194,6 +196,8 @@ public void RemoveAt(int index) { } public partial class DataException : System.SystemException { public DataException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataException(string? s) { } public DataException(string? s, System.Exception? innerException) { } @@ -494,9 +498,13 @@ public partial class DataSet : System.ComponentModel.MarshalByValueComponent, Sy public DataSet() { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, bool ConstructSchema) { } public DataSet(string dataSetName) { } [System.ComponentModel.DefaultValueAttribute(false)] @@ -548,6 +556,8 @@ public void EndInit() { } public System.Data.DataSet? GetChanges() { throw null; } public System.Data.DataSet? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Xml.Schema.XmlSchema? GetSchemaSerializable() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] @@ -680,6 +690,8 @@ public partial class DataTable : System.ComponentModel.MarshalByValueComponent, protected internal bool fInitInProgress; public DataTable() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataTable(string? tableName) { } public DataTable(string? tableName, string? tableNamespace) { } @@ -754,6 +766,8 @@ public void EndLoadData() { } public System.Data.DataTable? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataTableSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } public System.Data.DataRow[] GetErrors() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Type GetRowType() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] @@ -1166,6 +1180,8 @@ public DBConcurrencyException(string? message, System.Exception? inner, System.D public int RowCount { get { throw null; } } public void CopyToRows(System.Data.DataRow[] array) { } public void CopyToRows(System.Data.DataRow[] array, int arrayIndex) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public enum DbType @@ -1201,6 +1217,8 @@ public enum DbType public partial class DeletedRowInaccessibleException : System.Data.DataException { public DeletedRowInaccessibleException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DeletedRowInaccessibleException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DeletedRowInaccessibleException(string? s) { } public DeletedRowInaccessibleException(string? message, System.Exception? innerException) { } @@ -1208,6 +1226,8 @@ public DeletedRowInaccessibleException(string? message, System.Exception? innerE public partial class DuplicateNameException : System.Data.DataException { public DuplicateNameException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateNameException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateNameException(string? s) { } public DuplicateNameException(string? message, System.Exception? innerException) { } @@ -1240,6 +1260,8 @@ internal EnumerableRowCollection() { } public partial class EvaluateException : System.Data.InvalidExpressionException { public EvaluateException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EvaluateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EvaluateException(string? s) { } public EvaluateException(string? message, System.Exception? innerException) { } @@ -1421,6 +1443,8 @@ public partial interface IDbTransaction : System.IDisposable public partial class InRowChangingEventException : System.Data.DataException { public InRowChangingEventException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InRowChangingEventException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InRowChangingEventException(string? s) { } public InRowChangingEventException(string? message, System.Exception? innerException) { } @@ -1443,6 +1467,8 @@ public virtual void CopyTo(System.Array ar, int index) { } public partial class InvalidConstraintException : System.Data.DataException { public InvalidConstraintException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidConstraintException(string? s) { } public InvalidConstraintException(string? message, System.Exception? innerException) { } @@ -1450,6 +1476,8 @@ public InvalidConstraintException(string? message, System.Exception? innerExcept public partial class InvalidExpressionException : System.Data.DataException { public InvalidExpressionException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidExpressionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidExpressionException(string? s) { } public InvalidExpressionException(string? message, System.Exception? innerException) { } @@ -1513,6 +1541,8 @@ public enum MissingMappingAction public partial class MissingPrimaryKeyException : System.Data.DataException { public MissingPrimaryKeyException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingPrimaryKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingPrimaryKeyException(string? s) { } public MissingPrimaryKeyException(string? message, System.Exception? innerException) { } @@ -1527,6 +1557,8 @@ public enum MissingSchemaAction public partial class NoNullAllowedException : System.Data.DataException { public NoNullAllowedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NoNullAllowedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NoNullAllowedException(string? s) { } public NoNullAllowedException(string? message, System.Exception? innerException) { } @@ -1545,12 +1577,16 @@ public enum ParameterDirection public partial class PropertyCollection : System.Collections.Hashtable, System.ICloneable { public PropertyCollection() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override object Clone() { throw null; } } public partial class ReadOnlyException : System.Data.DataException { public ReadOnlyException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ReadOnlyException(string? s) { } public ReadOnlyException(string? message, System.Exception? innerException) { } @@ -1558,6 +1594,8 @@ public ReadOnlyException(string? message, System.Exception? innerException) { } public partial class RowNotInTableException : System.Data.DataException { public RowNotInTableException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RowNotInTableException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RowNotInTableException(string? s) { } public RowNotInTableException(string? message, System.Exception? innerException) { } @@ -1643,6 +1681,8 @@ public enum StatementType public partial class StrongTypingException : System.Data.DataException { public StrongTypingException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongTypingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongTypingException(string? message) { } public StrongTypingException(string? s, System.Exception? innerException) { } @@ -1650,6 +1690,8 @@ public StrongTypingException(string? s, System.Exception? innerException) { } public partial class SyntaxErrorException : System.Data.InvalidExpressionException { public SyntaxErrorException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SyntaxErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SyntaxErrorException(string? s) { } public SyntaxErrorException(string? message, System.Exception? innerException) { } @@ -1669,6 +1711,8 @@ public abstract partial class TypedTableBase : System.Data.DataTable, System. { protected TypedTableBase() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Data.EnumerableRowCollection Cast() { throw null; } public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } @@ -1713,6 +1757,8 @@ public enum UpdateStatus public partial class VersionNotFoundException : System.Data.DataException { public VersionNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VersionNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VersionNotFoundException(string? s) { } public VersionNotFoundException(string? message, System.Exception? innerException) { } @@ -2450,6 +2496,8 @@ public void Reset() { } public abstract partial class DbException : System.Runtime.InteropServices.ExternalException { protected DbException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DbException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected DbException(string? message) { } protected DbException(string? message, System.Exception? innerException) { } @@ -3731,6 +3779,8 @@ public SqlTruncateException(string? message, System.Exception? e) { } public partial class SqlTypeException : System.SystemException { public SqlTypeException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SqlTypeException(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext sc) { } public SqlTypeException(string? message) { } public SqlTypeException(string? message, System.Exception? e) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbException.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbException.cs index 55b0bce2fddc92..78cc96a4a6b946 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbException.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.Data.Common { [Serializable] @@ -15,6 +17,8 @@ protected DbException(string? message, System.Exception? innerException) : base( protected DbException(string? message, int errorCode) : base(message, errorCode) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DbException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/DBConcurrencyException.cs b/src/libraries/System.Data.Common/src/System/Data/DBConcurrencyException.cs index 871fc6cd1b9def..e99408d9567903 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DBConcurrencyException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DBConcurrencyException.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.Runtime.Serialization; @@ -31,10 +32,13 @@ public DBConcurrencyException(string? message, Exception? inner, DataRow[]? data _dataRows = dataRows; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private DBConcurrencyException(SerializationInfo info, StreamingContext context) : base(info, context) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Data.Common/src/System/Data/DataException.cs b/src/libraries/System.Data.Common/src/System/Data/DataException.cs index 4068e1aa8f4afb..556dcba9ae9feb 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataException.cs @@ -12,6 +12,8 @@ namespace System.Data [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class DataException : SystemException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DataException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -33,6 +35,8 @@ public DataException(string? s, Exception? innerException) : base(s, innerExcept [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class ConstraintException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ConstraintException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -57,6 +61,8 @@ public ConstraintException(string? message, Exception? innerException) : base(me [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class DeletedRowInaccessibleException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DeletedRowInaccessibleException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -87,6 +93,8 @@ public DeletedRowInaccessibleException(string? message, Exception? innerExceptio [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class DuplicateNameException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DuplicateNameException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -111,6 +119,8 @@ public DuplicateNameException(string? message, Exception? innerException) : base [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class InRowChangingEventException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InRowChangingEventException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -135,6 +145,8 @@ public InRowChangingEventException(string? message, Exception? innerException) : [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class InvalidConstraintException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidConstraintException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -159,6 +171,8 @@ public InvalidConstraintException(string? message, Exception? innerException) : [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class MissingPrimaryKeyException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MissingPrimaryKeyException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -183,6 +197,8 @@ public MissingPrimaryKeyException(string? message, Exception? innerException) : [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class NoNullAllowedException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NoNullAllowedException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -207,6 +223,8 @@ public NoNullAllowedException(string? message, Exception? innerException) : base [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class ReadOnlyException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ReadOnlyException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -231,6 +249,8 @@ public ReadOnlyException(string? message, Exception? innerException) : base(mess [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class RowNotInTableException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected RowNotInTableException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -255,6 +275,8 @@ public RowNotInTableException(string? message, Exception? innerException) : base [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class VersionNotFoundException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected VersionNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs index 5da8f73b5edcef..effbbd5268fcdc 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -244,6 +244,8 @@ protected void GetSerializationData(SerializationInfo info, StreamingContext con [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", Justification = "CreateInstanceOfThisType's use of GetType uses only the parameterless constructor, but the annotations preserve all non-public constructors causing a warning for the serialization constructors. Those constructors won't be used here.")] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DataSet(SerializationInfo info, StreamingContext context) : this(info, context, true) { } @@ -252,6 +254,8 @@ protected DataSet(SerializationInfo info, StreamingContext context) : this(info, [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", Justification = "CreateInstanceOfThisType's use of GetType uses only the parameterless constructor, but the annotations preserve all non-public constructors causing a warning for the serialization constructors. Those constructors won't be used here.")] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DataSet(SerializationInfo info, StreamingContext context, bool ConstructSchema) : this() { SerializationFormat remotingFormat = SerializationFormat.Xml; @@ -296,6 +300,8 @@ protected DataSet(SerializationInfo info, StreamingContext context, bool Constru [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "Binary serialization is unsafe in general and is planned to be obsoleted. We do not want to mark interface or ctors of this class as unsafe as that would show many unnecessary warnings elsewhere.")] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { SerializationFormat remotingFormat = RemotingFormat; diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs index d9a7e6bf91e6dc..2da38f233558df 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs @@ -195,6 +195,8 @@ public DataTable(string? tableName, string? tableNamespace) : this(tableName) [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", Justification = "CreateInstance's use of GetType uses only the parameterless constructor. Warnings are about serialization related constructors.")] [RequiresUnreferencedCode(DataSet.RequiresUnreferencedCodeMessage)] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DataTable(SerializationInfo info, StreamingContext context) : this() { bool isSingleTable = context.Context != null ? Convert.ToBoolean(context.Context, CultureInfo.InvariantCulture) : true; @@ -221,6 +223,8 @@ protected DataTable(SerializationInfo info, StreamingContext context) : this() [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "Binary serialization is unsafe in general and is planned to be obsoleted. We do not want to mark interface or ctors of this class as unsafe as that would show many unnecessary warnings elsewhere.")] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { SerializationFormat remotingFormat = RemotingFormat; diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs index 13d8f9b8b0fc31..8d8b8878bd5158 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.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.Globalization; using System.Runtime.Serialization; @@ -11,6 +12,8 @@ namespace System.Data [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class InvalidExpressionException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidExpressionException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -26,6 +29,8 @@ public InvalidExpressionException(string? message, Exception? innerException) : [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class EvaluateException : InvalidExpressionException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected EvaluateException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -41,6 +46,8 @@ public EvaluateException(string? message, Exception? innerException) : base(mess [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class SyntaxErrorException : InvalidExpressionException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SyntaxErrorException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Data.Common/src/System/Data/PropertyCollection.cs b/src/libraries/System.Data.Common/src/System/Data/PropertyCollection.cs index a1dba9aae1473d..16cebcf3ee2454 100644 --- a/src/libraries/System.Data.Common/src/System/Data/PropertyCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/PropertyCollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Data @@ -18,6 +19,8 @@ public PropertyCollection() : base() { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected PropertyCollection(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLUtility.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLUtility.cs index eeff48caa91d20..92c4edfe613059 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLUtility.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLUtility.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.Runtime.Serialization; namespace System.Data.SqlTypes @@ -41,10 +42,13 @@ public SqlTypeException(string? message, Exception? e) : base(message, e) HResult = HResults.SqlType; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SqlTypeException(SerializationInfo si, StreamingContext sc) : base(SqlTypeExceptionSerialization(si, sc), sc) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private static SerializationInfo SqlTypeExceptionSerialization(SerializationInfo? si, StreamingContext sc) { if ((null != si) && (1 == si.MemberCount)) @@ -76,10 +80,13 @@ public SqlNullValueException(string? message, Exception? e) : base(message, e) HResult = HResults.SqlNullValue; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] private SqlNullValueException(SerializationInfo si, StreamingContext sc) : base(SqlNullValueExceptionSerialization(si, sc), sc) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private static SerializationInfo SqlNullValueExceptionSerialization(SerializationInfo si, StreamingContext sc) { if ((null != si) && (1 == si.MemberCount)) @@ -111,10 +118,13 @@ public SqlTruncateException(string? message, Exception? e) : base(message, e) HResult = HResults.SqlTruncate; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] private SqlTruncateException(SerializationInfo si, StreamingContext sc) : base(SqlTruncateExceptionSerialization(si, sc), sc) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private static SerializationInfo SqlTruncateExceptionSerialization(SerializationInfo si, StreamingContext sc) { if ((null != si) && (1 == si.MemberCount)) @@ -146,6 +156,7 @@ public SqlNotFilledException(string? message, Exception? e) : base(message, e) HResult = HResults.SqlNullValue; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private SqlNotFilledException(SerializationInfo si, StreamingContext sc) : base(si, sc) { } @@ -170,6 +181,7 @@ public SqlAlreadyFilledException(string? message, Exception? e) : base(message, HResult = HResults.SqlNullValue; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private SqlAlreadyFilledException(SerializationInfo si, StreamingContext sc) : base(si, sc) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/StrongTypingException.cs b/src/libraries/System.Data.Common/src/System/Data/StrongTypingException.cs index f170174a51d61e..4d075a10e7a521 100644 --- a/src/libraries/System.Data.Common/src/System/Data/StrongTypingException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/StrongTypingException.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.Runtime.Serialization; namespace System.Data @@ -12,8 +13,10 @@ namespace System.Data [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class StrongTypingException : DataException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected StrongTypingException(SerializationInfo info, StreamingContext context) - : base(info, context) + : base(info, context) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/TypedTableBase.cs b/src/libraries/System.Data.Common/src/System/Data/TypedTableBase.cs index de17c7d2d82e44..dbc31d9319585d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/TypedTableBase.cs +++ b/src/libraries/System.Data.Common/src/System/Data/TypedTableBase.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -31,6 +32,8 @@ protected TypedTableBase() : base() { } [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2112:ReflectionToRequiresUnreferencedCode", Justification = "DataTable.CreateInstance's use of GetType uses only the parameterless constructor, not this serialization related constructor.")] [RequiresUnreferencedCode(DataSet.RequiresUnreferencedCodeMessage)] + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs index 7fcc31aa4521f7..e40a7d7a73d255 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs @@ -221,6 +221,10 @@ public sealed partial class OdbcException : System.Data.Common.DbException internal OdbcException() { } public System.Data.Odbc.OdbcErrorCollection Errors { get { throw null; } } public override string Source { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } } public sealed partial class OdbcFactory : System.Data.Common.DbProviderFactory diff --git a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj index 5efd5553d36853..96bbcdbfb6ea9a 100644 --- a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj +++ b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj @@ -118,6 +118,8 @@ System.Data.Odbc.OdbcTransaction + diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcException.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcException.cs index 52b70dc15e8150..b3749cd1c2860f 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcException.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcException.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.Runtime.Serialization; using System.Text; @@ -34,6 +35,9 @@ internal OdbcException(string message, OdbcErrorCollection errors) : base(messag HResult = HResults.OdbcException; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private OdbcException(SerializationInfo si, StreamingContext sc) : base(si, sc) { // Ignoring ODBC32.RETCODE @@ -49,6 +53,10 @@ public OdbcErrorCollection Errors } } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo si, StreamingContext context) { base.GetObjectData(si, context); 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 1a00318b1173aa..63ff8a4b8bf9ba 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -259,6 +259,10 @@ public sealed partial class OleDbException : System.Data.Common.DbException internal OleDbException() { } [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)] public System.Data.OleDb.OleDbErrorCollection Errors { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } } public sealed partial class OleDbFactory : System.Data.Common.DbProviderFactory diff --git a/src/libraries/System.Data.OleDb/src/OleDbException.cs b/src/libraries/System.Data.OleDb/src/OleDbException.cs index fa0747ad450b04..4cead874d43b10 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbException.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbException.cs @@ -35,6 +35,10 @@ private OleDbException(string? message, Exception? inner, string? source, OleDbH this.oledbErrors = errors; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo si, StreamingContext context) { ArgumentNullException.ThrowIfNull(si); diff --git a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj index 0d535399c29a5d..99c375546bd299 100644 --- a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj +++ b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj @@ -134,6 +134,8 @@ System.Data.OleDb.OleDbTransaction + diff --git a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs index 1c13c599509fb0..3593b77ffef9c8 100644 --- a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs +++ b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs @@ -227,10 +227,18 @@ public partial class EventLogException : System.Exception { public EventLogException() { } protected EventLogException(int errorCode) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected EventLogException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public EventLogException(string message) { } public EventLogException(string message, System.Exception innerException) { } public override string Message { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public sealed partial class EventLogInformation @@ -248,6 +256,10 @@ internal EventLogInformation() { } public partial class EventLogInvalidDataException : System.Diagnostics.Eventing.Reader.EventLogException { public EventLogInvalidDataException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected EventLogInvalidDataException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public EventLogInvalidDataException(string message) { } public EventLogInvalidDataException(string message, System.Exception innerException) { } @@ -274,6 +286,10 @@ public enum EventLogMode public partial class EventLogNotFoundException : System.Diagnostics.Eventing.Reader.EventLogException { public EventLogNotFoundException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected EventLogNotFoundException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public EventLogNotFoundException(string message) { } public EventLogNotFoundException(string message, System.Exception innerException) { } @@ -287,6 +303,10 @@ protected virtual void Dispose(bool disposing) { } public partial class EventLogProviderDisabledException : System.Diagnostics.Eventing.Reader.EventLogException { public EventLogProviderDisabledException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected EventLogProviderDisabledException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public EventLogProviderDisabledException(string message) { } public EventLogProviderDisabledException(string message, System.Exception innerException) { } @@ -319,6 +339,10 @@ public void Seek(System.IO.SeekOrigin origin, long offset) { } public partial class EventLogReadingException : System.Diagnostics.Eventing.Reader.EventLogException { public EventLogReadingException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected EventLogReadingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public EventLogReadingException(string message) { } public EventLogReadingException(string message, System.Exception innerException) { } diff --git a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj index c74dea7c375c59..99e2ad2c660aba 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj +++ b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj @@ -107,6 +107,8 @@ System.Diagnostics.EventLog Link="Common\System\Diagnostics\NetFrameworkUtils.cs" /> + diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogException.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogException.cs index b35991bb87f0bd..cd1e3e2e4631ec 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogException.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogException.cs @@ -68,12 +68,20 @@ public override string Message private readonly int _errorCode; +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected EventLogException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { _errorCode = serializationInfo.GetInt32("errorCode"); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); @@ -91,6 +99,10 @@ public EventLogNotFoundException() { } public EventLogNotFoundException(string message) : base(message) { } public EventLogNotFoundException(string message, Exception innerException) : base(message, innerException) { } internal EventLogNotFoundException(int errorCode) : base(errorCode) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected EventLogNotFoundException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } } @@ -106,6 +118,10 @@ public EventLogReadingException() { } public EventLogReadingException(string message) : base(message) { } public EventLogReadingException(string message, Exception innerException) : base(message, innerException) { } internal EventLogReadingException(int errorCode) : base(errorCode) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected EventLogReadingException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } } @@ -121,6 +137,10 @@ public EventLogProviderDisabledException() { } public EventLogProviderDisabledException(string message) : base(message) { } public EventLogProviderDisabledException(string message, Exception innerException) : base(message, innerException) { } internal EventLogProviderDisabledException(int errorCode) : base(errorCode) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected EventLogProviderDisabledException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } } @@ -134,6 +154,10 @@ public EventLogInvalidDataException() { } public EventLogInvalidDataException(string message) : base(message) { } public EventLogInvalidDataException(string message, Exception innerException) : base(message, innerException) { } internal EventLogInvalidDataException(int errorCode) : base(errorCode) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected EventLogInvalidDataException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } } } diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs index 295d3814394685..5815a29e1ce9d2 100644 --- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs +++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs @@ -239,6 +239,8 @@ public EventSourceCreatedEventArgs() { } public partial class EventSourceException : System.Exception { public EventSourceException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EventSourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EventSourceException(string? message) { } public EventSourceException(string? message, System.Exception? innerException) { } 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 3b9228be10af88..07b59f7cfe1377 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs @@ -150,24 +150,36 @@ public enum MatchType } public partial class MultipleMatchesException : System.DirectoryServices.AccountManagement.PrincipalException { - public MultipleMatchesException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected MultipleMatchesException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public MultipleMatchesException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public MultipleMatchesException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public MultipleMatchesException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected MultipleMatchesException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public MultipleMatchesException(string message) { } + public MultipleMatchesException(string message, System.Exception innerException) { } } public partial class NoMatchingPrincipalException : System.DirectoryServices.AccountManagement.PrincipalException { - public NoMatchingPrincipalException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected NoMatchingPrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public NoMatchingPrincipalException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public NoMatchingPrincipalException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public NoMatchingPrincipalException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected NoMatchingPrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public NoMatchingPrincipalException(string message) { } + public NoMatchingPrincipalException(string message, System.Exception innerException) { } } public partial class PasswordException : System.DirectoryServices.AccountManagement.PrincipalException { - public PasswordException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected PasswordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PasswordException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PasswordException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public PasswordException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected PasswordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public PasswordException(string message) { } + public PasswordException(string message, System.Exception innerException) { } } public abstract partial class Principal : System.IDisposable { @@ -263,24 +275,41 @@ public void Dispose() { } } public abstract partial class PrincipalException : System.SystemException { + private protected PrincipalException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected PrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class PrincipalExistsException : System.DirectoryServices.AccountManagement.PrincipalException { - public PrincipalExistsException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected PrincipalExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalExistsException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalExistsException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public PrincipalExistsException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected PrincipalExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context){ } + public PrincipalExistsException(string message){ } + public PrincipalExistsException(string message, System.Exception innerException) { } } public partial class PrincipalOperationException : System.DirectoryServices.AccountManagement.PrincipalException { - public PrincipalOperationException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected PrincipalOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalOperationException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalOperationException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalOperationException(string message, System.Exception innerException, int errorCode) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalOperationException(string message, int errorCode) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public PrincipalOperationException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected PrincipalOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public PrincipalOperationException(string message) { } + public PrincipalOperationException(string message, System.Exception innerException) { } + public PrincipalOperationException(string message, System.Exception innerException, int errorCode) { } + public PrincipalOperationException(string message, int errorCode) { } public int ErrorCode { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class PrincipalSearcher : System.IDisposable @@ -304,13 +333,21 @@ public void Dispose() { } } public partial class PrincipalServerDownException : System.DirectoryServices.AccountManagement.PrincipalException { - public PrincipalServerDownException() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public PrincipalServerDownException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected PrincipalServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalServerDownException(string message) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalServerDownException(string message, System.Exception innerException) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalServerDownException(string message, System.Exception innerException, int errorCode) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalServerDownException(string message, System.Exception innerException, int errorCode, string serverName) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public PrincipalServerDownException(string message, int errorCode) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public PrincipalServerDownException(string message) { } + public PrincipalServerDownException(string message, System.Exception innerException) { } + public PrincipalServerDownException(string message, System.Exception innerException, int errorCode) { } + public PrincipalServerDownException(string message, System.Exception innerException, int errorCode, string serverName) { } + public PrincipalServerDownException(string message, int errorCode) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class PrincipalValueCollection : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj index 7333ffa9cc8cda..2203721d31a805 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj @@ -188,6 +188,8 @@ Link="Common\Microsoft\Win32\SafeHandles\SafeLsaPolicyHandle.cs" /> + diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs index 9ef7f1a51f582b..c0286f26442bb7 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs @@ -23,6 +23,10 @@ internal PrincipalException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PrincipalException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -41,6 +45,10 @@ public MultipleMatchesException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected MultipleMatchesException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -59,8 +67,11 @@ public NoMatchingPrincipalException(string message, Exception innerException) : base(message, innerException) { } - protected NoMatchingPrincipalException(SerializationInfo info, StreamingContext context) : - base(info, context) +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif + protected NoMatchingPrincipalException(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); } @@ -78,6 +89,10 @@ public PasswordException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PasswordException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -96,6 +111,10 @@ public PrincipalExistsException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PrincipalExistsException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -131,6 +150,10 @@ public PrincipalServerDownException(string message, Exception innerException, in _serverName = serverName; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PrincipalServerDownException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -138,6 +161,10 @@ protected PrincipalServerDownException(SerializationInfo info, StreamingContext _serverName = (string)info.GetValue("serverName", typeof(string)); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); @@ -169,12 +196,20 @@ public PrincipalOperationException(string message, Exception innerException, int _errorCode = errorCode; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PrincipalOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { _errorCode = info.GetInt32("errorCode"); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs index 1b740db20bef22..54fc132396a063 100644 --- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs +++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs @@ -46,6 +46,10 @@ public enum AuthType public partial class BerConversionException : System.DirectoryServices.Protocols.DirectoryException { public BerConversionException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected BerConversionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BerConversionException(string message) { } public BerConversionException(string message, System.Exception inner) { } @@ -190,6 +194,10 @@ public void Remove(System.DirectoryServices.Protocols.DirectoryControl value) { public partial class DirectoryException : System.Exception { public DirectoryException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected DirectoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryException(string message) { } public DirectoryException(string message, System.Exception inner) { } @@ -212,10 +220,18 @@ public DirectoryOperationException() { } public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response) { } public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected DirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryOperationException(string message) { } public DirectoryOperationException(string message, System.Exception inner) { } public System.DirectoryServices.Protocols.DirectoryResponse Response { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public abstract partial class DirectoryRequest : System.DirectoryServices.Protocols.DirectoryOperation @@ -345,12 +361,20 @@ public LdapException(int errorCode) { } public LdapException(int errorCode, string message) { } public LdapException(int errorCode, string message, System.Exception inner) { } public LdapException(int errorCode, string message, string serverErrorMessage) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected LdapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LdapException(string message) { } public LdapException(string message, System.Exception inner) { } public int ErrorCode { get { throw null; } } public System.DirectoryServices.Protocols.PartialResultsCollection PartialResults { get { throw null; } } public string ServerErrorMessage { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class LdapSessionOptions @@ -685,6 +709,10 @@ public TlsOperationException() { } public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response) { } public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected TlsOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TlsOperationException(string message) { } public TlsOperationException(string message, System.Exception inner) { } diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj index d340edc61ecb3b..da521e6ac19442 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj +++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj @@ -56,6 +56,9 @@ Common\Interop\Windows\Interop.BOOL.cs + + Common\System\Obsoletions.cs + diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs index e716d36c379faf..8e9e85fcccc7c0 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.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.Text; using System.Runtime.Serialization; @@ -10,6 +11,10 @@ namespace System.DirectoryServices.Protocols [System.Runtime.CompilerServices.TypeForwardedFrom("System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class DirectoryException : Exception { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected DirectoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -31,6 +36,10 @@ public DirectoryException() : base() [System.Runtime.CompilerServices.TypeForwardedFrom("System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class DirectoryOperationException : DirectoryException, ISerializable { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected DirectoryOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } public DirectoryOperationException() : base() { } @@ -74,6 +83,10 @@ private static string CreateMessage(DirectoryResponse response, string message) [System.Runtime.CompilerServices.TypeForwardedFrom("System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class BerConversionException : DirectoryException { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected BerConversionException(SerializationInfo info, StreamingContext context) : base(info, context) { } public BerConversionException() : base(SR.BerConversionError) diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs index 06d892dd9ab9e2..81b5cd168aa782 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.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.Collections.Generic; using System.Runtime.Serialization; @@ -92,6 +93,10 @@ public class LdapException : DirectoryException, ISerializable { private int _errorCode; +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected LdapException(SerializationInfo info, StreamingContext context) : base(info, context) { } public LdapException() : base() { } @@ -140,6 +145,10 @@ private set [System.Runtime.CompilerServices.TypeForwardedFrom("System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class TlsOperationException : DirectoryOperationException { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected TlsOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } public TlsOperationException() : base() { } diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs index 541ac7374ee859..2cbebbdc0a68a9 100644 --- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs +++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs @@ -255,11 +255,19 @@ protected override void Dispose(bool disposing) { } public partial class DirectoryServicesCOMException : System.Runtime.InteropServices.COMException, System.Runtime.Serialization.ISerializable { public DirectoryServicesCOMException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected DirectoryServicesCOMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryServicesCOMException(string? message) { } public DirectoryServicesCOMException(string? message, System.Exception? inner) { } public int ExtendedError { get { throw null; } } public string? ExtendedErrorMessage { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class DirectorySynchronization @@ -531,6 +539,10 @@ public void Save() { } public partial class ActiveDirectoryObjectExistsException : System.Exception { public ActiveDirectoryObjectExistsException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ActiveDirectoryObjectExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ActiveDirectoryObjectExistsException(string? message) { } public ActiveDirectoryObjectExistsException(string? message, System.Exception? inner) { } @@ -538,23 +550,39 @@ public ActiveDirectoryObjectExistsException(string? message, System.Exception? i public partial class ActiveDirectoryObjectNotFoundException : System.Exception, System.Runtime.Serialization.ISerializable { public ActiveDirectoryObjectNotFoundException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ActiveDirectoryObjectNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ActiveDirectoryObjectNotFoundException(string? message) { } public ActiveDirectoryObjectNotFoundException(string? message, System.Exception? inner) { } public ActiveDirectoryObjectNotFoundException(string? message, System.Type? type, string? name) { } public string? Name { get { throw null; } } public System.Type? Type { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class ActiveDirectoryOperationException : System.Exception, System.Runtime.Serialization.ISerializable { public ActiveDirectoryOperationException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ActiveDirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ActiveDirectoryOperationException(string? message) { } public ActiveDirectoryOperationException(string? message, System.Exception? inner) { } public ActiveDirectoryOperationException(string? message, System.Exception? inner, int errorCode) { } public ActiveDirectoryOperationException(string? message, int errorCode) { } public int ErrorCode { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public abstract partial class ActiveDirectoryPartition : System.IDisposable @@ -715,6 +743,10 @@ public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySchem public partial class ActiveDirectoryServerDownException : System.Exception, System.Runtime.Serialization.ISerializable { public ActiveDirectoryServerDownException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ActiveDirectoryServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ActiveDirectoryServerDownException(string? message) { } public ActiveDirectoryServerDownException(string? message, System.Exception? inner) { } @@ -723,6 +755,10 @@ public ActiveDirectoryServerDownException(string? message, int errorCode, string public int ErrorCode { get { throw null; } } public override string Message { get { throw null; } } public string? Name { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class ActiveDirectorySite : System.IDisposable @@ -1275,11 +1311,19 @@ public enum ForestMode public partial class ForestTrustCollisionException : System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException, System.Runtime.Serialization.ISerializable { public ForestTrustCollisionException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ForestTrustCollisionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ForestTrustCollisionException(string? message) { } public ForestTrustCollisionException(string? message, System.Exception? inner) { } public ForestTrustCollisionException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? collisions) { } public System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? Collisions { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public enum ForestTrustCollisionType @@ -1659,11 +1703,19 @@ public enum SyncFromAllServersEvent public partial class SyncFromAllServersOperationException : System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException, System.Runtime.Serialization.ISerializable { public SyncFromAllServersOperationException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected SyncFromAllServersOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SyncFromAllServersOperationException(string? message) { } public SyncFromAllServersOperationException(string? message, System.Exception? inner) { } public SyncFromAllServersOperationException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[]? errors) { } public System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[] ErrorInformation { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } [System.FlagsAttribute] diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Exception.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Exception.cs index 950075ba9c8be7..30a01c04ba09ea 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Exception.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Exception.cs @@ -47,6 +47,10 @@ public ActiveDirectoryObjectNotFoundException(string? message) : base(message) { public ActiveDirectoryObjectNotFoundException() : base() { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ActiveDirectoryObjectNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -55,6 +59,10 @@ protected ActiveDirectoryObjectNotFoundException(SerializationInfo info, Streami public string? Name { get; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); @@ -95,12 +103,20 @@ public ActiveDirectoryOperationException(string? message) : base(message) { } public ActiveDirectoryOperationException() : base(SR.DSUnknownFailure) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ActiveDirectoryOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } public int ErrorCode { get; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); @@ -129,6 +145,10 @@ public ActiveDirectoryServerDownException(string? message) : base(message) { } public ActiveDirectoryServerDownException() : base() { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ActiveDirectoryServerDownException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -150,6 +170,10 @@ public override string Message } } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); @@ -166,6 +190,10 @@ public ActiveDirectoryObjectExistsException(string? message) : base(message) { } public ActiveDirectoryObjectExistsException() : base() { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ActiveDirectoryObjectExistsException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -188,6 +216,10 @@ public SyncFromAllServersOperationException(string? message) : base(message) { } public SyncFromAllServersOperationException() : base(SR.DSSyncAllFailure) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected SyncFromAllServersOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -207,6 +239,10 @@ public SyncFromAllServersErrorInformation[] ErrorInformation } } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); @@ -228,12 +264,20 @@ public ForestTrustCollisionException(string? message) : base(message) { } public ForestTrustCollisionException() : base(SR.ForestTrustCollision) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ForestTrustCollisionException(SerializationInfo info, StreamingContext context) : base(info, context) { } public ForestTrustRelationshipCollisionCollection? Collisions { get; } = new ForestTrustRelationshipCollisionCollection(); +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesCOMException.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesCOMException.cs index 6ff6d88c562415..00ee0f88f77667 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesCOMException.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesCOMException.cs @@ -17,6 +17,10 @@ public DirectoryServicesCOMException(string? message) : base(message) { } public DirectoryServicesCOMException(string? message, Exception? inner) : base(message, inner) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected DirectoryServicesCOMException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -31,6 +35,10 @@ internal DirectoryServicesCOMException(string? extendedMessage, int extendedErro public string? ExtendedErrorMessage { get; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs index 7c4003e2978476..210d6635195cad 100644 --- a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs +++ b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs @@ -45,6 +45,10 @@ namespace System.Formats.Asn1 public partial class AsnContentException : System.Exception { public AsnContentException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected AsnContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AsnContentException(string? message) { } public AsnContentException(string? message, System.Exception? inner) { } diff --git a/src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj b/src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj index 53502fc348e684..a899353cd4a050 100644 --- a/src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj +++ b/src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj @@ -53,6 +53,7 @@ System.Formats.Asn1.AsnWriter + diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnContentException.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnContentException.cs index 9e3d03c45e84de..4bbee61211e78a 100644 --- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnContentException.cs +++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnContentException.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.Runtime.Serialization; namespace System.Formats.Asn1 @@ -23,6 +24,10 @@ public AsnContentException(string? message, Exception? inner) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected AsnContentException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs index 54b232c9864a77..b44d7aad9b700a 100644 --- a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs +++ b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs @@ -15,6 +15,10 @@ public enum CborConformanceMode } public partial class CborContentException : System.Exception { +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected CborContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CborContentException(string? message) { } public CborContentException(string? message, System.Exception? inner) { } diff --git a/src/libraries/System.Formats.Cbor/src/System.Formats.Cbor.csproj b/src/libraries/System.Formats.Cbor/src/System.Formats.Cbor.csproj index 2e43a07a64d860..0757a3e86d0217 100644 --- a/src/libraries/System.Formats.Cbor/src/System.Formats.Cbor.csproj +++ b/src/libraries/System.Formats.Cbor/src/System.Formats.Cbor.csproj @@ -13,6 +13,7 @@ System.Formats.Cbor.CborWriter + diff --git a/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborContentException.cs b/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborContentException.cs index 148c26bd447986..68f606dac4e7f0 100644 --- a/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborContentException.cs +++ b/src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/CborContentException.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.Runtime.Serialization; namespace System.Formats.Cbor @@ -36,6 +37,10 @@ public CborContentException(string? message, Exception? inner) /// /// The object that holds the serialized object data. /// The contextual information about the source or destination. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected CborContentException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj index 798fccdac5bba4..149604a5e355bc 100644 --- a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj +++ b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj @@ -39,6 +39,8 @@ + diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/ZLibException.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/ZLibException.cs index 12355eb4bfe9d1..c9748918a0a7e8 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/ZLibException.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/ZLibException.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.Runtime.Serialization; namespace System.IO.Compression @@ -52,6 +53,10 @@ public ZLibException(string? message, Exception? innerException) : base(message, /// /// The SerializationInfo that holds the serialized object data about the exception being thrown. /// The StreamingContext that contains contextual information about the source or destination. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ZLibException(SerializationInfo info, StreamingContext context) : base(info, context) { _zlibErrorContext = info.GetString("zlibErrorContext"); @@ -59,6 +64,9 @@ protected ZLibException(SerializationInfo info, StreamingContext context) : base _zlibErrorMessage = info.GetString("zlibErrorMessage"); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context) { base.GetObjectData(si, context); diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs index 19e8f51412b35f..cf81b1a5f319c3 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs @@ -26,6 +26,8 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class DriveNotFoundException : System.IO.IOException { public DriveNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DriveNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DriveNotFoundException(string? message) { } public DriveNotFoundException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj index 43823c8111daa1..70ccc2c053a1d3 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj @@ -13,6 +13,8 @@ Link="Common\System\HResults.cs" /> + diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveNotFoundException.cs b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveNotFoundException.cs index 20d3d0d3915983..1d0873a2ba8c3e 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveNotFoundException.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveNotFoundException.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.Runtime.Serialization; namespace System.IO @@ -28,6 +29,8 @@ public DriveNotFoundException(string? message, Exception? innerException) HResult = HResults.COR_E_DIRECTORYNOTFOUND; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DriveNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs index d640d89cfe3888..1824df48ab4026 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs @@ -55,6 +55,8 @@ protected void OnRenamed(System.IO.RenamedEventArgs e) { } public partial class InternalBufferOverflowException : System.SystemException { public InternalBufferOverflowException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InternalBufferOverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InternalBufferOverflowException(string? message) { } public InternalBufferOverflowException(string? message, System.Exception? inner) { } diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj index 15b70f231a8298..f865fd51da017d 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj @@ -31,6 +31,8 @@ Link="Common\System\IO\PathInternal.cs" /> + + diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageException.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageException.cs index aae8198f565306..7c42d59b68e034 100644 --- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageException.cs +++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.IO.IsolatedStorage @@ -34,6 +35,8 @@ public IsolatedStorageException(string? message, Exception? inner) HResult = COR_E_ISOSTORE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected IsolatedStorageException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs index 19809fb07bcc4e..4680e78033e25c 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs @@ -8,7 +8,15 @@ namespace System.IO { public partial class FileFormatException : System.FormatException { +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected FileFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } } diff --git a/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj b/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj index 3812ff100aaaf5..fd5fa77c1cea4c 100644 --- a/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj +++ b/src/libraries/System.IO.Packaging/src/System.IO.Packaging.csproj @@ -40,6 +40,7 @@ + diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/FileFormatException.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/FileFormatException.cs index 6574ee7d0322d4..6bed53f5796374 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/FileFormatException.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/FileFormatException.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.Runtime.Serialization; namespace System.IO @@ -112,6 +113,10 @@ public FileFormatException(Uri? sourceUri, string? message, Exception? innerExce _sourceUri = sourceUri; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected FileFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { string? sourceUriString = info.GetString("SourceUri"); @@ -124,6 +129,10 @@ protected FileFormatException(SerializationInfo info, StreamingContext context) /// /// The object that holds the serialized object data. /// The contextual information about the source or destination. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs index 068f933ed7d40f..2424fd75c352e6 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs @@ -200,6 +200,7 @@ internal TryFaultHandler(int tryStart, int tryEnd, int finallyStart, int finally internal sealed class RethrowException : Exception { public RethrowException() : base() { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] internal RethrowException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/src/libraries/System.Management/ref/System.Management.cs b/src/libraries/System.Management/ref/System.Management.cs index 70dbeff2bd2337..a6e92b38fe3ad7 100644 --- a/src/libraries/System.Management/ref/System.Management.cs +++ b/src/libraries/System.Management/ref/System.Management.cs @@ -135,6 +135,11 @@ public InvokeMethodOptions(System.Management.ManagementNamedValueCollection cont [System.ComponentModel.ToolboxItemAttribute(false)] public partial class ManagementBaseObject : System.ComponentModel.Component, System.ICloneable, System.Runtime.Serialization.ISerializable { + private protected ManagementBaseObject() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ManagementBaseObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual System.Management.ManagementPath ClassPath { get { throw null; } } public object this[string propertyName] { get { throw null; } set { } } @@ -163,6 +168,10 @@ public ManagementClass() { } public ManagementClass(System.Management.ManagementPath path) { } public ManagementClass(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } public ManagementClass(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ManagementClass(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ManagementClass(string path) { } public ManagementClass(string path, System.Management.ObjectGetOptions options) { } @@ -233,16 +242,28 @@ public void Stop() { } public partial class ManagementException : System.SystemException { public ManagementException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ManagementException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ManagementException(string message) { } public ManagementException(string message, System.Exception innerException) { } public System.Management.ManagementStatus ErrorCode { get { throw null; } } public System.Management.ManagementBaseObject ErrorInformation { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class ManagementNamedValueCollection : System.Collections.Specialized.NameObjectCollectionBase { public ManagementNamedValueCollection() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ManagementNamedValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public object this[string name] { get { throw null; } } public void Add(string name, object value) { } @@ -252,14 +273,18 @@ public void RemoveAll() { } } public partial class ManagementObject : System.Management.ManagementBaseObject, System.ICloneable { - public ManagementObject() : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(System.Management.ManagementPath path) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - protected ManagementObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(string path) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(string path, System.Management.ObjectGetOptions options) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } - public ManagementObject(string scopeString, string pathString, System.Management.ObjectGetOptions options) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } + public ManagementObject() { } + public ManagementObject(System.Management.ManagementPath path) { } + public ManagementObject(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } + public ManagementObject(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif + protected ManagementObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public ManagementObject(string path) { } + public ManagementObject(string path, System.Management.ObjectGetOptions options) { } + public ManagementObject(string scopeString, string pathString, System.Management.ObjectGetOptions options) { } public override System.Management.ManagementPath ClassPath { get { throw null; } } public System.Management.ObjectGetOptions Options { get { throw null; } set { } } public virtual System.Management.ManagementPath Path { get { throw null; } set { } } diff --git a/src/libraries/System.Management/src/System.Management.csproj b/src/libraries/System.Management/src/System.Management.csproj index 3c23101e634792..88bb095f348946 100644 --- a/src/libraries/System.Management/src/System.Management.csproj +++ b/src/libraries/System.Management/src/System.Management.csproj @@ -38,6 +38,8 @@ System.Management.SelectQuery Link="Common\Interop\Windows\Ole32\Interop.CoGetObjectContext.cs" /> + diff --git a/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs b/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs index 087c352d87ee59..771c16184465ed 100644 --- a/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs +++ b/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs @@ -15,7 +15,7 @@ namespace WbemUtilities_v1 { } namespace System.Management { #region FreeThreadedInterfaces - internal sealed class IWbemClassObjectFreeThreaded : IDisposable, ISerializable + internal sealed class IWbemClassObjectFreeThreaded : IDisposable { // // This is to force load wminet_utils.dll as a COM component. Since wminet_utils.dll @@ -44,16 +44,6 @@ public static implicit operator IntPtr(IWbemClassObjectFreeThreaded wbemClassObj return wbemClassObject.pWbemClassObject; } - public IWbemClassObjectFreeThreaded(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - - void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - public void Dispose() { Dispose_(false); diff --git a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs index bc5db3b39820f5..c196511a32b0fd 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs @@ -223,6 +223,10 @@ internal IWbemClassObjectFreeThreaded wbemObject /// /// The to populate with data. /// The destination (see ) for this serialization. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ManagementBaseObject(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Management/src/System/Management/ManagementClass.cs b/src/libraries/System.Management/src/System/Management/ManagementClass.cs index 86e691f562bdaa..69a2e70b7b62fb 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementClass.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementClass.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; +using System.ComponentModel; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.CodeDom; @@ -266,7 +267,11 @@ public ManagementClass(ManagementScope scope, ManagementPath path, ObjectGetOpti public ManagementClass(string scope, string path, ObjectGetOptions options) : base(new ManagementScope(scope), new ManagementPath(path), options) { } - protected ManagementClass(SerializationInfo info, StreamingContext context) : base(info, context) +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif + protected ManagementClass(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Management/src/System/Management/ManagementException.cs b/src/libraries/System.Management/src/System/Management/ManagementException.cs index f573756225f8e9..92a3a66513976c 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementException.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementException.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.Runtime.InteropServices; using System.Runtime.Serialization; @@ -671,6 +672,10 @@ internal ManagementException(Exception e, string msg, ManagementBaseObject errOb /// /// The to populate with data. /// The destination (see ) for this serialization. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ManagementException(SerializationInfo info, StreamingContext context) : base(info, context) { errorCode = (ManagementStatus)info.GetValue("errorCode", typeof(ManagementStatus)); @@ -715,7 +720,10 @@ public ManagementException(string message, Exception innerException):this(innerE /// /// The to populate with data. /// The destination (see ) for this serialization. - +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Management/src/System/Management/ManagementNamedValueCollection.cs b/src/libraries/System.Management/src/System/Management/ManagementNamedValueCollection.cs index 862419ff4631c3..68efddb9bdae59 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementNamedValueCollection.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementNamedValueCollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Management @@ -45,7 +46,11 @@ public ManagementNamedValueCollection() /// /// The to populate with data. /// The destination (see ) for this serialization. - protected ManagementNamedValueCollection(SerializationInfo info, StreamingContext context) : base(info, context) +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif + protected ManagementNamedValueCollection(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Management/src/System/Management/ManagementObject.cs b/src/libraries/System.Management/src/System/Management/ManagementObject.cs index 18b70aa9b6ecfe..28eaadc9a39632 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementObject.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementObject.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.Runtime.InteropServices; using System.Runtime.Serialization; @@ -461,6 +462,10 @@ public ManagementObject(string scopeString, string pathString, ObjectGetOptions /// /// The to populate with data. /// The destination (see ) for this serialization. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ManagementObject(SerializationInfo info, StreamingContext context) : base(info, context) { ManagementObjectCTOR(null, null, null); diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj index e6dd2f5192891f..404e965fd8f512 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj @@ -103,6 +103,8 @@ System.Net.Http.WinHttpHandler Link="Common\System\Net\Logging\NetEventSource.Common.cs" /> + diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpException.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpException.cs index 54fa11b8fea5a5..fb017ebe43612d 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpException.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpException.cs @@ -17,6 +17,10 @@ public WinHttpException(int error, string message) : base(error, message) this.HResult = ConvertErrorCodeToHR(error); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public WinHttpException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj index 791b0032f86422..b459c0e2c9545d 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj @@ -29,6 +29,8 @@ Link="Common\System\CharArrayHelpers.cs" /> + + diff --git a/src/libraries/System.Net.Http/tests/PerformanceTests/HPackHuffmanBenchmark/HPackHuffmanBenchmark.csproj b/src/libraries/System.Net.Http/tests/PerformanceTests/HPackHuffmanBenchmark/HPackHuffmanBenchmark.csproj index ddec3c81968aab..2241ec7ee9b231 100644 --- a/src/libraries/System.Net.Http/tests/PerformanceTests/HPackHuffmanBenchmark/HPackHuffmanBenchmark.csproj +++ b/src/libraries/System.Net.Http/tests/PerformanceTests/HPackHuffmanBenchmark/HPackHuffmanBenchmark.csproj @@ -12,6 +12,8 @@ Link="Common\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs" /> + diff --git a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index 42409627be0433..f2d027bfd648e7 100644 --- a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -397,6 +397,8 @@ Link="Common\System\Text\ValueStringBuilder.cs" /> + + diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerException.cs b/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerException.cs index 249e579d47d1b7..e4846e7f577913 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerException.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerException.cs @@ -26,6 +26,8 @@ public HttpListenerException(int errorCode, string message) : base(errorCode, me if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected HttpListenerException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { diff --git a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs index 6c91e785def67d..f2e8b8439f3c47 100644 --- a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs +++ b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs @@ -209,41 +209,50 @@ public enum SmtpDeliveryMethod SpecifiedPickupDirectory = 1, PickupDirectoryFromIis = 2, } - public partial class SmtpException : System.Exception, System.Runtime.Serialization.ISerializable + public partial class SmtpException : System.Exception { public SmtpException() { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode) { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode, string? message) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public SmtpException(string? message) { } public SmtpException(string? message, System.Exception? innerException) { } public System.Net.Mail.SmtpStatusCode StatusCode { get { throw null; } set { } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } - void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } - public partial class SmtpFailedRecipientException : System.Net.Mail.SmtpException, System.Runtime.Serialization.ISerializable + public partial class SmtpFailedRecipientException : System.Net.Mail.SmtpException { public SmtpFailedRecipientException() { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient) { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient, string? serverResponse) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientException(string? message) { } public SmtpFailedRecipientException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientException(string? message, string? failedRecipient, System.Exception? innerException) { } public string? FailedRecipient { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } - void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } - public partial class SmtpFailedRecipientsException : System.Net.Mail.SmtpFailedRecipientException, System.Runtime.Serialization.ISerializable + public partial class SmtpFailedRecipientsException : System.Net.Mail.SmtpFailedRecipientException { public SmtpFailedRecipientsException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientsException(string? message) { } public SmtpFailedRecipientsException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientsException(string? message, System.Net.Mail.SmtpFailedRecipientException[] innerExceptions) { } public System.Net.Mail.SmtpFailedRecipientException[] InnerExceptions { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } - void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public enum SmtpStatusCode { diff --git a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj index 7d1afb2d61aa70..a86bca0286a204 100644 --- a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj +++ b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj @@ -76,6 +76,8 @@ Link="Common\System\StringExtensions.cs" /> + diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpException.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpException.cs index aa59188d748887..ac504e916f2abc 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpException.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpException.cs @@ -1,13 +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.Net.Mail { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class SmtpException : Exception, ISerializable + public class SmtpException : Exception { private SmtpStatusCode _statusCode = SmtpStatusCode.GeneralFailure; @@ -92,6 +93,8 @@ public SmtpException(string? message, Exception? innerException) : base(message, { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SmtpException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { _statusCode = (SmtpStatusCode)serializationInfo.GetInt32("Status"); @@ -106,11 +109,8 @@ internal SmtpException(string message, string? serverResponse) : base(message + { } - void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) - { - GetObjectData(serializationInfo, streamingContext); - } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs index f3a5d300f0cc90..7060721ffe2919 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; @@ -9,7 +10,7 @@ namespace System.Net.Mail { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class SmtpFailedRecipientException : SmtpException, ISerializable + public class SmtpFailedRecipientException : SmtpException { private readonly string? _failedRecipient; @@ -23,6 +24,8 @@ public SmtpFailedRecipientException(string? message) : base(message) { } public SmtpFailedRecipientException(string? message, Exception? innerException) : base(message, innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SmtpFailedRecipientException(SerializationInfo info, StreamingContext context) : base(info, context) { _failedRecipient = info.GetString("failedRecipient"); @@ -51,11 +54,8 @@ public string? FailedRecipient } } - void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) - { - GetObjectData(serializationInfo, streamingContext); - } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs index 6cd03b0efcf99b..19ea0d39c4154e 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.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.Runtime.Serialization; @@ -9,7 +10,7 @@ namespace System.Net.Mail { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class SmtpFailedRecipientsException : SmtpFailedRecipientException, ISerializable + public class SmtpFailedRecipientsException : SmtpFailedRecipientException { private readonly SmtpFailedRecipientException[] _innerExceptions; @@ -29,6 +30,8 @@ public SmtpFailedRecipientsException(string? message, Exception? innerException) _innerExceptions = smtpException == null ? Array.Empty() : new SmtpFailedRecipientException[] { smtpException }; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SmtpFailedRecipientsException(SerializationInfo info, StreamingContext context) : base(info, context) { _innerExceptions = (SmtpFailedRecipientException[])info.GetValue("innerExceptions", typeof(SmtpFailedRecipientException[]))!; @@ -60,11 +63,8 @@ public SmtpFailedRecipientException[] InnerExceptions } } - void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) - { - GetObjectData(serializationInfo, streamingContext); - } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj b/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj index e7eeed8be58c97..1f2f599959a966 100644 --- a/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj +++ b/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj @@ -145,6 +145,8 @@ Link="Common\System\Net\SecurityStatusPal.cs" /> + diff --git a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs index da345adb5929c7..7d234b8db0e7ca 100644 --- a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs +++ b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs @@ -413,6 +413,8 @@ public partial class NetworkInformationException : System.ComponentModel.Win32Ex { public NetworkInformationException() { } public NetworkInformationException(int errorCode) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NetworkInformationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } } diff --git a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj index c9b2bbb83a5af7..2a742d79f71441 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj +++ b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj @@ -51,6 +51,7 @@ + diff --git a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs index d549c5e306575a..cd0d091d9cd18f 100644 --- a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs +++ b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs @@ -77,6 +77,8 @@ public partial class PingCompletedEventArgs : System.ComponentModel.AsyncComplet public delegate void PingCompletedEventHandler(object sender, System.Net.NetworkInformation.PingCompletedEventArgs e); public partial class PingException : System.InvalidOperationException { + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public PingException(string? message) { } public PingException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj b/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj index 16b84ae2ad5af6..9c817f3908a98c 100644 --- a/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj +++ b/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj @@ -19,6 +19,8 @@ + diff --git a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/PingException.cs b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/PingException.cs index c3c88d3b5123df..779f6dc08ff429 100644 --- a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/PingException.cs +++ b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/PingException.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.Runtime.Serialization; namespace System.Net.NetworkInformation @@ -19,6 +20,8 @@ public PingException(string? message, Exception? innerException) : { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected PingException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { diff --git a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs index 5e329e0b9aa5e5..b9cc5da0919e29 100644 --- a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -89,7 +89,11 @@ public void SetCookies(System.Uri uri, string cookieHeader) { } public partial class CookieException : System.FormatException, System.Runtime.Serialization.ISerializable { public CookieException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -504,6 +508,8 @@ public partial class SocketException : System.ComponentModel.Win32Exception public SocketException() { } public SocketException(int errorCode) { } public SocketException(int errorCode, string? message) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } public override string Message { get { throw null; } } diff --git a/src/libraries/System.Net.Primitives/src/System/Net/CookieException.cs b/src/libraries/System.Net.Primitives/src/System/Net/CookieException.cs index fd7f3ade521226..e53dcfda1d56b5 100644 --- a/src/libraries/System.Net.Primitives/src/System/Net/CookieException.cs +++ b/src/libraries/System.Net.Primitives/src/System/Net/CookieException.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.Runtime.Serialization; namespace System.Net @@ -21,16 +22,21 @@ internal CookieException(string? message, Exception? inner) : base(message, inne { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CookieException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Primitives/src/System/Net/SocketException.cs b/src/libraries/System.Net.Primitives/src/System/Net/SocketException.cs index 6bbc58c0e8cc39..1a9c516563a452 100644 --- a/src/libraries/System.Net.Primitives/src/System/Net/SocketException.cs +++ b/src/libraries/System.Net.Primitives/src/System/Net/SocketException.cs @@ -51,6 +51,8 @@ internal SocketException(SocketError socketError, string? message) : base(GetNat public SocketError SocketErrorCode => _errorCode; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SocketException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { diff --git a/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj b/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj index fde9a8ab0e3510..a48a8e9eb222c9 100644 --- a/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj +++ b/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj @@ -37,6 +37,8 @@ Link="ProductionCode\Common\System\Text\StringBuilderCache.cs" /> + diff --git a/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj b/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj index df7e660405802b..3bbac4fb7203e7 100644 --- a/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj +++ b/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj @@ -48,6 +48,8 @@ Link="ProductionCode\System\Net\IPAddressParser.cs" /> + 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 825698e157c179..8c4f7a4064a0d1 100644 --- a/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs +++ b/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs @@ -34,6 +34,7 @@ public Authorization(string? token, bool finished, string? connectionGroupId) { public partial class FileWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable { [System.ObsoleteAttribute("Serialization has been deprecated for FileWebRequest.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string? ConnectionGroupName { get { throw null; } set { } } public override long ContentLength { get { throw null; } set { } } @@ -63,6 +64,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable { [System.ObsoleteAttribute("Serialization has been deprecated for FileWebResponse.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override long ContentLength { get { throw null; } } public override string ContentType { get { throw null; } } @@ -178,6 +180,7 @@ public GlobalProxySelection() { } 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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; } } @@ -252,6 +255,7 @@ public partial class HttpWebResponse : System.Net.WebResponse, System.Runtime.Se [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HttpWebResponse() { } [System.ObsoleteAttribute("Serialization has been deprecated for HttpWebResponse.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HttpWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public string? CharacterSet { get { throw null; } } public string ContentEncoding { get { throw null; } } @@ -295,14 +299,20 @@ public partial interface IWebRequestCreate public partial class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public ProtocolViolationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ProtocolViolationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public ProtocolViolationException(string? message) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class WebException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public WebException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebException(string? message) { } public WebException(string? message, System.Exception? innerException) { } @@ -310,6 +320,8 @@ public WebException(string? message, System.Exception? innerException, System.Ne public WebException(string? message, System.Net.WebExceptionStatus status) { } public System.Net.WebResponse? Response { get { throw null; } } public System.Net.WebExceptionStatus Status { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -342,6 +354,7 @@ public abstract partial class WebRequest : System.MarshalByRefObject, System.Run [System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected WebRequest() { } [System.ObsoleteAttribute("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId = "SYSLIB0014", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public System.Net.Security.AuthenticationLevel AuthenticationLevel { get { throw null; } set { } } public virtual System.Net.Cache.RequestCachePolicy? CachePolicy { get { throw null; } set { } } @@ -423,6 +436,7 @@ public abstract partial class WebResponse : System.MarshalByRefObject, System.ID { protected WebResponse() { } [System.ObsoleteAttribute("Serialization has been deprecated for WebResponse.")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 { } } 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 42a7f41018fafb..7a938664b5cebc 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.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.IO; using System.Threading; using System.Runtime.Serialization; @@ -36,6 +37,7 @@ internal FileWebRequest(Uri uri) } [Obsolete("Serialization has been deprecated for FileWebRequest.")] + [EditorBrowsable(EditorBrowsableState.Never)] protected FileWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, 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 1a2009c75f5449..c1c26f1705995a 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.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.IO; using System.Runtime.Serialization; using System.Globalization; @@ -46,6 +47,7 @@ internal FileWebResponse(FileWebRequest request, Uri uri, FileAccess access, boo } [Obsolete("Serialization has been deprecated for FileWebResponse.")] + [EditorBrowsable(EditorBrowsableState.Never)] protected FileWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, 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 68cfb32755b34e..5362745761ba1f 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.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.Globalization; @@ -169,6 +170,7 @@ public bool AreParametersAcceptableForCaching() private const string ChunkedHeader = "chunked"; [Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected HttpWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, 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 3002d360e98554..f7fae7869b1e7f 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/HttpWebResponse.cs @@ -35,6 +35,7 @@ public HttpWebResponse() } [Obsolete("Serialization has been deprecated for HttpWebResponse.")] + [EditorBrowsable(EditorBrowsableState.Never)] protected HttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Requests/src/System/Net/ProtocolViolationException.cs b/src/libraries/System.Net.Requests/src/System/Net/ProtocolViolationException.cs index aa6576cde311bd..3d8ce6d57dc538 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/ProtocolViolationException.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/ProtocolViolationException.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.Runtime.Serialization; namespace System.Net @@ -34,16 +35,21 @@ public ProtocolViolationException(string? message) : base(message) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ProtocolViolationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Requests/src/System/Net/WebException.cs b/src/libraries/System.Net.Requests/src/System/Net/WebException.cs index 06f2207308a6b2..2e95bb61f2b43a 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/WebException.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/WebException.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.Net.Http; using System.Net.Sockets; @@ -52,6 +53,8 @@ public WebException(string? message, } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WebException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { @@ -61,11 +64,14 @@ protected WebException(SerializationInfo serializationInfo, StreamingContext str public WebResponse? Response => _response; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); 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 8ba5533841f118..168873423c0b1f 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/WebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/WebRequest.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.IO; @@ -37,6 +38,7 @@ public WebRequestPrefixElement(string prefix, IWebRequestCreate creator) protected WebRequest() { } [Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WebRequest(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 8f43fabf1e5667..5261eb84fde37f 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/WebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/WebResponse.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.IO; using System.Runtime.Serialization; @@ -24,6 +25,7 @@ protected WebResponse() } [Obsolete("Serialization has been deprecated for WebResponse.")] + [EditorBrowsable(EditorBrowsableState.Never)] protected WebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.Security/ref/System.Net.Security.cs b/src/libraries/System.Net.Security/ref/System.Net.Security.cs index 0f32fd2090c56b..41c3b13f1765e2 100644 --- a/src/libraries/System.Net.Security/ref/System.Net.Security.cs +++ b/src/libraries/System.Net.Security/ref/System.Net.Security.cs @@ -674,6 +674,8 @@ namespace System.Security.Authentication public partial class AuthenticationException : System.SystemException { public AuthenticationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AuthenticationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public AuthenticationException(string? message) { } public AuthenticationException(string? message, System.Exception? innerException) { } @@ -681,6 +683,8 @@ public AuthenticationException(string? message, System.Exception? innerException public partial class InvalidCredentialException : System.Security.Authentication.AuthenticationException { public InvalidCredentialException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCredentialException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public InvalidCredentialException(string? message) { } public InvalidCredentialException(string? message, System.Exception? innerException) { } @@ -690,6 +694,8 @@ namespace System.Security.Authentication.ExtendedProtection { public partial class ExtendedProtectionPolicy : System.Runtime.Serialization.ISerializable { + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement) { } public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ChannelBinding customChannelBinding) { } diff --git a/src/libraries/System.Net.Security/src/System/Security/Authentication/AuthenticationException.cs b/src/libraries/System.Net.Security/src/System/Security/Authentication/AuthenticationException.cs index 560491b73f7b56..b83e75144bbb08 100644 --- a/src/libraries/System.Net.Security/src/System/Security/Authentication/AuthenticationException.cs +++ b/src/libraries/System.Net.Security/src/System/Security/Authentication/AuthenticationException.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.Runtime.Serialization; namespace System.Security.Authentication @@ -20,6 +21,8 @@ public AuthenticationException(string? message) : base(message) { } public AuthenticationException(string? message, Exception? innerException) : base(message, innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected AuthenticationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } @@ -42,6 +45,8 @@ public InvalidCredentialException(string? message) : base(message) { } public InvalidCredentialException(string? message, Exception? innerException) : base(message, innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidCredentialException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } diff --git a/src/libraries/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ExtendedProtectionPolicy.cs b/src/libraries/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ExtendedProtectionPolicy.cs index 7fcb88eda48737..d0d19339322f76 100644 --- a/src/libraries/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ExtendedProtectionPolicy.cs +++ b/src/libraries/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ExtendedProtectionPolicy.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.ComponentModel; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; @@ -67,6 +68,8 @@ public ExtendedProtectionPolicy(PolicyEnforcement policyEnforcement) _protectionScenario = ProtectionScenario.TransportSelected; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ExtendedProtectionPolicy(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs index 297dc1dd6560be..028be87df1fecb 100644 --- a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs +++ b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs @@ -86,6 +86,8 @@ public enum HttpResponseHeader public partial class WebHeaderCollection : System.Collections.Specialized.NameValueCollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable { public WebHeaderCollection() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[] AllKeys { get { throw null; } } public override int Count { get { throw null; } } @@ -102,6 +104,8 @@ public override void Clear() { } public override string? Get(string? name) { throw null; } public override System.Collections.IEnumerator GetEnumerator() { throw null; } public override string GetKey(int index) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[]? GetValues(int index) { throw null; } public override string[]? GetValues(string header) { throw null; } diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj index e787e038e147c9..bb0668ed63149f 100644 --- a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj +++ b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj @@ -15,6 +15,8 @@ Link="Common\System\Net\HttpKnownHeaderNames.cs" /> + diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs index f28ca8de82104e..0c8a61f0134ab4 100644 --- a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs +++ b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs @@ -4,6 +4,7 @@ using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Runtime.Serialization; @@ -28,6 +29,8 @@ public class WebHeaderCollection : NameValueCollection, ISerializable private static HeaderInfoTable? _headerInfo; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WebHeaderCollection(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); @@ -134,6 +137,8 @@ public void Set(HttpResponseHeader header, string? value) this.Set(header.GetName(), value); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs index 332ad18ed59dc6..a681a7b309f455 100644 --- a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs +++ b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs @@ -15,6 +15,8 @@ public partial interface IWebProxyScript public partial class WebProxy : System.Net.IWebProxy, System.Runtime.Serialization.ISerializable { public WebProxy() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebProxy(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebProxy(string? Address) { } public WebProxy(string? Address, bool BypassOnLocal) { } diff --git a/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj b/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj index 68485c90ea3556..9becff3118f39b 100644 --- a/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj +++ b/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj @@ -6,6 +6,7 @@ + diff --git a/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs b/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs index 94b7e980745566..96d091cc37b50e 100644 --- a/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs +++ b/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs @@ -3,6 +3,7 @@ using System.Buffers; using System.Collections; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -203,6 +204,8 @@ public bool IsBypassed(Uri host) IsMatchInBypassList(host); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WebProxy(SerializationInfo serializationInfo, StreamingContext streamingContext) => throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs index 69cd0cba6f1ff4..4c46e51dd299a3 100644 --- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs +++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs @@ -106,6 +106,8 @@ public WebSocketException(string? message) { } public WebSocketException(string? message, System.Exception? innerException) { } public override int ErrorCode { get { throw null; } } public System.Net.WebSockets.WebSocketError WebSocketErrorCode { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public enum WebSocketMessageType diff --git a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj index f9ef1c7848c47c..ebb2af8ed9ab71 100644 --- a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj +++ b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj @@ -33,6 +33,8 @@ Link="Common\System\IO\Compression\ZLibNative.ZStream.cs" /> + diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs index d21721fc25420d..4f4c5d5468be14 100644 --- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs +++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs @@ -95,11 +95,15 @@ public WebSocketException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] private WebSocketException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs index 6c35380a4f729a..afb422f0b9d0fe 100644 --- a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs +++ b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs @@ -91,6 +91,8 @@ public GenericEqualityComparer() { } } public partial class NonRandomizedStringEqualityComparer : System.Collections.Generic.IEqualityComparer, System.Runtime.Serialization.ISerializable { + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NonRandomizedStringEqualityComparer(System.Runtime.Serialization.SerializationInfo information, System.Runtime.Serialization.StreamingContext context) { } public virtual bool Equals(string? x, string? y) { throw null; } public virtual int GetHashCode(string? obj) { throw null; } @@ -140,6 +142,8 @@ public ContractException(System.Diagnostics.Contracts.ContractFailureKind kind, public string Failure { get { throw null; } } public System.Diagnostics.Contracts.ContractFailureKind Kind { get { throw null; } } public string? UserMessage { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs index 45300b56e958a2..9c98879b7fbe23 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public AccessViolationException(string? message, Exception? innerException) HResult = HResults.E_POINTER; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected AccessViolationException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs index 7c2d694d651194..cedfd4916fa5f2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Runtime.ExceptionServices; @@ -183,6 +184,8 @@ internal AggregateException(string message, List innerExc /// contains contextual information about the source or destination. /// The argument is null. /// The exception could not be deserialized correctly. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected AggregateException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -204,6 +207,8 @@ protected AggregateException(SerializationInfo info, StreamingContext context) : /// The that /// contains contextual information about the source or destination. /// The argument is null. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/AppDomainUnloadedException.cs b/src/libraries/System.Private.CoreLib/src/System/AppDomainUnloadedException.cs index 13421ea751fdf2..cca4a77821de0b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AppDomainUnloadedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AppDomainUnloadedException.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.Runtime.Serialization; namespace System @@ -27,6 +28,8 @@ public AppDomainUnloadedException(string? message, Exception? innerException) HResult = HResults.COR_E_APPDOMAINUNLOADED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected AppDomainUnloadedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs b/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs index 192e39ebad1739..230f9bbd09bfee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -50,6 +51,8 @@ public ApplicationException(string? message, Exception? innerException) HResult = HResults.COR_E_APPLICATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs index 2c2971f805d3ac..e9b41c5af3e8a7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -62,12 +63,16 @@ public ArgumentException(string? message, string? paramName) HResult = HResults.COR_E_ARGUMENT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { _paramName = info.GetString("ParamName"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs index c8c7aac72733bb..fb86d3164dd745 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -49,6 +50,8 @@ public ArgumentNullException(string? paramName, string? message) HResult = HResults.E_POINTER; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ArgumentNullException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs index 830a425a3caec3..4f0f7bde312412 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; @@ -58,12 +59,16 @@ public ArgumentOutOfRangeException(string? paramName, object? actualValue, strin HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ArgumentOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { _actualValue = info.GetValue("ActualValue", typeof(object)); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs b/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs index 33c863cadb227d..fcac02874fb03a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -45,6 +46,8 @@ public ArithmeticException(string? message, Exception? innerException) HResult = HResults.COR_E_ARITHMETIC; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs b/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs index 58cf3f2581e4ae..fb5e015403b1b3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -45,6 +46,8 @@ public ArrayTypeMismatchException(string? message, Exception? innerException) HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs index ced884d47d54fa..a6ce855ba7b368 100644 --- a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs @@ -10,6 +10,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.IO; using System.Runtime.Serialization; @@ -53,6 +54,8 @@ public BadImageFormatException(string? message, string? fileName, Exception? inn _fileName = fileName; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected BadImageFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -60,6 +63,8 @@ protected BadImageFormatException(SerializationInfo info, StreamingContext conte _fusionLog = info.GetString("BadImageFormat_FusionLog"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/CannotUnloadAppDomainException.cs b/src/libraries/System.Private.CoreLib/src/System/CannotUnloadAppDomainException.cs index d9967a45883d56..4bc63d4414f5d9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/CannotUnloadAppDomainException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/CannotUnloadAppDomainException.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.Runtime.Serialization; namespace System @@ -27,6 +28,8 @@ public CannotUnloadAppDomainException(string? message, Exception? innerException HResult = HResults.COR_E_CANNOTUNLOADAPPDOMAIN; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CannotUnloadAppDomainException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs index d676f813f68637..8c518d56c3b937 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs @@ -7,6 +7,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Globalization; using System.Runtime.Serialization; @@ -35,6 +36,8 @@ private Comparer(SerializationInfo info, StreamingContext context) _compareInfo = (CompareInfo)info.GetValue("CompareInfo", typeof(CompareInfo))!; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs index fe5f11e025198f..bb470cc9b5fd84 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.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.Runtime.CompilerServices; @@ -156,6 +157,8 @@ private void AddRange(IEnumerable> collection) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Dictionary(SerializationInfo info, StreamingContext context) { // We can't do anything with the keys and values until the entire graph has been deserialized @@ -342,6 +345,8 @@ IEnumerator> IEnumerable>. Count == 0 ? GenericEmptyEnumerator>.Instance : GetEnumerator(); + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs index 7537e2d4b80f90..668550bddf66b5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.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.Runtime.CompilerServices; @@ -129,6 +130,8 @@ public HashSet(int capacity, IEqualityComparer? comparer) : this(comparer) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected HashSet(SerializationInfo info, StreamingContext context) { // We can't do anything with the keys and values until the entire graph has been @@ -368,6 +371,8 @@ IEnumerator IEnumerable.GetEnumerator() => #region ISerializable methods + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/KeyNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/KeyNotFoundException.cs index 47e0e94f307acf..9e3483d40b4159 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/KeyNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/KeyNotFoundException.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.Runtime.Serialization; namespace System.Collections.Generic @@ -27,6 +28,8 @@ public KeyNotFoundException(string? message, Exception? innerException) HResult = HResults.COR_E_KEYNOTFOUND; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected KeyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs index 25846a6b2abb2c..de01ba5bdc5ad9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.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.Runtime.Serialization; @@ -31,6 +32,8 @@ private NonRandomizedStringEqualityComparer(IEqualityComparer underlyin } // This is used by the serialization engine. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NonRandomizedStringEqualityComparer(SerializationInfo information, StreamingContext context) : this(EqualityComparer.Default) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs index b0c8757c3065a2..dfc019167c7d80 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs @@ -11,6 +11,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Diagnostics; using System.Runtime.Serialization; using System.Threading; @@ -361,6 +362,8 @@ public Hashtable(IDictionary d, float loadFactor, IEqualityComparer? equalityCom Add(e.Key, e.Value); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Hashtable(SerializationInfo info, StreamingContext context) { // We can't do anything with the keys and values until the entire graph has been deserialized @@ -1019,6 +1022,8 @@ public static Hashtable Synchronized(Hashtable table) return new SyncHashtable(table); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); @@ -1252,11 +1257,7 @@ internal SyncHashtable(Hashtable table) : base(false) _table = table; } - internal SyncHashtable(SerializationInfo info, StreamingContext context) : base(info, context) - { - throw new PlatformNotSupportedException(); - } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/ComponentModel/Win32Exception.cs b/src/libraries/System.Private.CoreLib/src/System/ComponentModel/Win32Exception.cs index dfc7955362fc01..a6239139beef8d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ComponentModel/Win32Exception.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ComponentModel/Win32Exception.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.Globalization; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -13,7 +14,7 @@ namespace System.ComponentModel /// [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class Win32Exception : ExternalException, ISerializable + public class Win32Exception : ExternalException { private const int E_FAIL = unchecked((int)0x80004005); @@ -56,11 +57,15 @@ public Win32Exception(string? message, Exception? innerException) : base(message NativeErrorCode = Marshal.GetLastPInvokeError(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Win32Exception(SerializationInfo info, StreamingContext context) : base(info, context) { NativeErrorCode = info.GetInt32(nameof(NativeErrorCode)); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Context.cs b/src/libraries/System.Private.CoreLib/src/System/Context.cs index e9aeef1838bae3..49f0cf41878eda 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Context.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Context.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.Runtime.Serialization; namespace System @@ -27,6 +28,8 @@ public ContextMarshalException(string? message, Exception? inner) : base(message HResult = HResults.COR_E_CONTEXTMARSHAL; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ContextMarshalException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs b/src/libraries/System.Private.CoreLib/src/System/DBNull.cs index 9f2f17c5043629..f3691b4343a21a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DBNull.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.Runtime.Serialization; namespace System @@ -12,13 +13,10 @@ private DBNull() { } - private DBNull(SerializationInfo info, StreamingContext context) - { - throw new NotSupportedException(SR.NotSupported_DBNullSerial); - } - public static readonly DBNull Value = new DBNull(); + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { #pragma warning disable SYSLIB0049 // UnitySerializationHolder is obsolete diff --git a/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs b/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs index b2860db70ea096..9325e30e67a50e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs @@ -8,6 +8,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -34,6 +35,8 @@ public DataMisalignedException(string? message, Exception? innerException) HResult = HResults.COR_E_DATAMISALIGNED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] private DataMisalignedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Delegate.cs b/src/libraries/System.Private.CoreLib/src/System/Delegate.cs index 4d233631223d2d..be5b8157debbff 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Delegate.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Delegate.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; @@ -61,6 +62,8 @@ public abstract partial class Delegate : ICloneable, ISerializable return DynamicInvokeImpl(args); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) => throw new PlatformNotSupportedException(); public MethodInfo Method => GetMethodImpl(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractException.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractException.cs index 52883c91f2ee99..8925fb287823d1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractException.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.Runtime.Serialization; namespace System.Diagnostics.Contracts @@ -34,6 +35,7 @@ public ContractException(ContractFailureKind kind, string? failure, string? user _condition = condition; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private ContractException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -42,7 +44,8 @@ private ContractException(SerializationInfo info, StreamingContext context) _condition = info.GetString("Condition"); } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs index 8127d1d7db183d..29a2a53c927466 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Diagnostics.Tracing @@ -32,6 +33,8 @@ public EventSourceException(string? message, Exception? innerException) : base(m /// /// Initializes a new instance of the EventSourceException class with serialized data. /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected EventSourceException(SerializationInfo info, StreamingContext context) : base(info, context) { } internal EventSourceException(Exception? innerException) : diff --git a/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs b/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs index 1adfeeb463630a..7db76dc9f2d350 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public DivideByZeroException(string? message, Exception? innerException) HResult = HResults.COR_E_DIVIDEBYZERO; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DivideByZeroException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs index 6b0a364c022007..3da70e3f7be0ae 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -37,6 +38,8 @@ public DllNotFoundException(string? message, Exception? inner) HResult = HResults.COR_E_DLLNOTFOUND; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DllNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs b/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs index 2a3c27f0b32c43..24c86492ec822e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -46,6 +47,8 @@ public DuplicateWaitObjectException(string? message, Exception? innerException) HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DuplicateWaitObjectException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs index 8aaa97b9a9de13..d6677ed353edf7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public EntryPointNotFoundException(string? message, Exception? inner) HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected EntryPointNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Exception.cs b/src/libraries/System.Private.CoreLib/src/System/Exception.cs index f8271606e92b49..f7d5139e98a939 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Exception.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Exception.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; @@ -38,6 +39,8 @@ public Exception(string? message, Exception? innerException) _innerException = innerException; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Exception(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); @@ -95,6 +98,8 @@ public virtual string? Source set => _source = value; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs index b8db7bd340a063..2fbdd9d53e0336 100644 --- a/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs @@ -8,6 +8,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -34,6 +35,8 @@ public FieldAccessException(string? message, Exception? inner) HResult = HResults.COR_E_FIELDACCESS; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected FieldAccessException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/FormatException.cs b/src/libraries/System.Private.CoreLib/src/System/FormatException.cs index 3681fed74b6b0e..2eee0bca9ce988 100644 --- a/src/libraries/System.Private.CoreLib/src/System/FormatException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/FormatException.cs @@ -10,6 +10,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public FormatException(string? message, Exception? innerException) HResult = HResults.COR_E_FORMAT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected FormatException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureNotFoundException.cs index bc274c3c907907..41f714b2cd1f96 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureNotFoundException.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.Runtime.Serialization; namespace System.Globalization @@ -56,6 +57,8 @@ public CultureNotFoundException(string? paramName, int invalidCultureId, string? _invalidCultureId = invalidCultureId; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CultureNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -63,6 +66,8 @@ protected CultureNotFoundException(SerializationInfo info, StreamingContext cont _invalidCultureName = (string?)info.GetValue("InvalidCultureName", typeof(string)); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryNotFoundException.cs index 1d53a086ea7161..dade7b3a68a64c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryNotFoundException.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.Runtime.Serialization; namespace System.IO @@ -33,6 +34,8 @@ public DirectoryNotFoundException(string? message, Exception? innerException) HResult = HResults.COR_E_DIRECTORYNOTFOUND; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/EndOfStreamException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/EndOfStreamException.cs index c1f5c18ab18d9b..7bd422ba220c19 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/EndOfStreamException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/EndOfStreamException.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.Runtime.Serialization; namespace System.IO @@ -27,6 +28,8 @@ public EndOfStreamException(string? message, Exception? innerException) HResult = HResults.COR_E_ENDOFSTREAM; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected EndOfStreamException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs index a7ca60e90c1b3f..816b90577eee85 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.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.Runtime.Serialization; namespace System.IO @@ -67,6 +68,8 @@ public override string ToString() return s; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected FileLoadException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -74,6 +77,8 @@ protected FileLoadException(SerializationInfo info, StreamingContext context) FusionLog = info.GetString("FileLoad_FusionLog"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs index 094a81877b6046..569dc1850b9ff2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.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.Runtime.Serialization; @@ -89,6 +90,8 @@ public override string ToString() return s; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected FileNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -96,6 +99,8 @@ protected FileNotFoundException(SerializationInfo info, StreamingContext context FusionLog = info.GetString("FileNotFound_FusionLog"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs index da70b06ed50393..6c4242dfa4cf23 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Runtime.Serialization; @@ -20,6 +21,8 @@ public abstract partial class FileSystemInfo : MarshalByRefObject, ISerializable private string? _linkTarget; private bool _linkTargetIsValid; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected FileSystemInfo(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); @@ -31,6 +34,8 @@ internal void Invalidate() InvalidateCore(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/IOException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/IOException.cs index e3bcac9aafef19..0cbaac41038f11 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/IOException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/IOException.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.Runtime.Serialization; namespace System.IO @@ -33,6 +34,8 @@ public IOException(string? message, Exception? innerException) HResult = HResults.COR_E_IO; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected IOException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/InvalidDataException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/InvalidDataException.cs index bd193133ef3392..2907219cc1e859 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/InvalidDataException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/InvalidDataException.cs @@ -36,6 +36,7 @@ public InvalidDataException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private InvalidDataException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathTooLongException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PathTooLongException.cs index 51269a482ba28d..e5b66894f95bf6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/PathTooLongException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/PathTooLongException.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.Runtime.Serialization; namespace System.IO @@ -27,6 +28,8 @@ public PathTooLongException(string? message, Exception? innerException) HResult = HResults.COR_E_PATHTOOLONG; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected PathTooLongException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs b/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs index 19ec2ee6819c45..2a900f8d24be1b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs @@ -36,6 +36,7 @@ public IndexOutOfRangeException(string? message, Exception? innerException) HResult = HResults.COR_E_INDEXOUTOFRANGE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private IndexOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/InsufficientExecutionStackException.cs b/src/libraries/System.Private.CoreLib/src/System/InsufficientExecutionStackException.cs index 125238128fd179..57479d9279ad6f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InsufficientExecutionStackException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InsufficientExecutionStackException.cs @@ -27,6 +27,7 @@ public InsufficientExecutionStackException(string? message, Exception? innerExce HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private InsufficientExecutionStackException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/InsufficientMemoryException.cs b/src/libraries/System.Private.CoreLib/src/System/InsufficientMemoryException.cs index 1bac8b52bda970..e6681690a642ee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InsufficientMemoryException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InsufficientMemoryException.cs @@ -40,6 +40,7 @@ public InsufficientMemoryException(string? message, Exception? innerException) HResult = HResults.COR_E_INSUFFICIENTMEMORY; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private InsufficientMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs index 39492818d0890c..867c7bb97cc1bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs @@ -7,6 +7,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -39,6 +40,8 @@ public InvalidCastException(string? message, int errorCode) HResult = errorCode; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidCastException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs index 1bd63539ac5198..8ac60234798dea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -37,6 +38,8 @@ public InvalidOperationException(string? message, Exception? innerException) HResult = HResults.COR_E_INVALIDOPERATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs index 67bef8a2d0c4d0..b4cdf72787ce94 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs @@ -36,6 +36,7 @@ public InvalidProgramException(string? message, Exception? inner) HResult = HResults.COR_E_INVALIDPROGRAM; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private InvalidProgramException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidTimeZoneException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidTimeZoneException.cs index 3d98454aedf832..6ad67475a41d0d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/InvalidTimeZoneException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/InvalidTimeZoneException.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.Runtime.Serialization; namespace System @@ -23,6 +24,8 @@ public InvalidTimeZoneException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidTimeZoneException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/MemberAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/MemberAccessException.cs index d080911af1ee99..3863bc505e8b01 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MemberAccessException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MemberAccessException.cs @@ -7,6 +7,7 @@ // access, due to it being removed, private or something similar. //////////////////////////////////////////////////////////////////////////////// +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -42,6 +43,8 @@ public MemberAccessException(string? message, Exception? inner) HResult = HResults.COR_E_MEMBERACCESS; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MemberAccessException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs index a42370e95aaab0..ff7f21820a55ee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs @@ -8,6 +8,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -34,6 +35,8 @@ public MethodAccessException(string? message, Exception? inner) HResult = HResults.COR_E_METHODACCESS; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MethodAccessException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/MissingFieldException.cs b/src/libraries/System.Private.CoreLib/src/System/MissingFieldException.cs index 11aad6da3cb2d1..2c388e8d7fbae0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MissingFieldException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MissingFieldException.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.Runtime.Serialization; namespace System @@ -34,6 +35,8 @@ public MissingFieldException(string? className, string? fieldName) HResult = HResults.COR_E_MISSINGFIELD; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MissingFieldException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/MissingMemberException.cs b/src/libraries/System.Private.CoreLib/src/System/MissingMemberException.cs index f0ef486d86e8b8..0ae639e0a31398 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MissingMemberException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MissingMemberException.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.Runtime.Serialization; namespace System @@ -34,6 +35,8 @@ public MissingMemberException(string? className, string? memberName) HResult = HResults.COR_E_MISSINGMEMBER; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MissingMemberException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -42,6 +45,8 @@ protected MissingMemberException(SerializationInfo info, StreamingContext contex Signature = (byte[]?)info.GetValue("MMSignature", typeof(byte[])); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs b/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs index e8363f67a3d918..e16db06b7ecf08 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -43,6 +44,8 @@ public MissingMethodException(string? className, string? methodName) HResult = HResults.COR_E_MISSINGMETHOD; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MissingMethodException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/MulticastNotSupportedException.cs b/src/libraries/System.Private.CoreLib/src/System/MulticastNotSupportedException.cs index c252ed8fb6114a..0826497e1dd0d9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MulticastNotSupportedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MulticastNotSupportedException.cs @@ -32,6 +32,7 @@ public MulticastNotSupportedException(string? message, Exception? inner) HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private MulticastNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/NonSerializedAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/NonSerializedAttribute.cs index e521b6c7367862..c23e505d4e4a3c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/NonSerializedAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/NonSerializedAttribute.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 { [AttributeUsage(AttributeTargets.Field, Inherited = false)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class NonSerializedAttribute : Attribute { public NonSerializedAttribute() diff --git a/src/libraries/System.Private.CoreLib/src/System/NotFiniteNumberException.cs b/src/libraries/System.Private.CoreLib/src/System/NotFiniteNumberException.cs index 658acf29efbaf8..021e3cf3a2c3e2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/NotFiniteNumberException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/NotFiniteNumberException.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.Runtime.Serialization; namespace System @@ -51,11 +52,15 @@ public NotFiniteNumberException(string? message, double offendingNumber, Excepti HResult = HResults.COR_E_NOTFINITENUMBER; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NotFiniteNumberException(SerializationInfo info, StreamingContext context) : base(info, context) { _offendingNumber = info.GetDouble("OffendingNumber"); // Do not rename (binary serialization) } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs b/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs index e3186470803538..5afbddf0cacd83 100644 --- a/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -35,6 +36,8 @@ public NotImplementedException(string? message, Exception? inner) HResult = HResults.E_NOTIMPL; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs b/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs index 2ad334efd0575d..b5946a1611e356 100644 --- a/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public NotSupportedException(string? message, Exception? innerException) HResult = HResults.COR_E_NOTSUPPORTED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs b/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs index 63fa7e7369f08b..b54b391f2a2d44 100644 --- a/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public NullReferenceException(string? message, Exception? innerException) HResult = HResults.E_POINTER; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected NullReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs index c0d5803d79f4e7..5066ae5ea43795 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.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.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Diagnostics; @@ -40,6 +41,8 @@ public ObjectDisposedException(string? message, Exception? innerException) HResult = HResults.COR_E_OBJECTDISPOSED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ObjectDisposedException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -72,6 +75,8 @@ public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs index 30d5455249d4ce..8d6f33448325f8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.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.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -65,6 +66,8 @@ internal OperatingSystem(PlatformID platform, Version version, string? servicePa _servicePack = servicePack; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs index 66537488945b1c..e0e0c72754aedc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs @@ -10,6 +10,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; using System.Threading; @@ -65,6 +66,8 @@ public OperationCanceledException(string? message, Exception? innerException, Ca CancellationToken = token; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected OperationCanceledException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/OutOfMemoryException.cs b/src/libraries/System.Private.CoreLib/src/System/OutOfMemoryException.cs index a361f1402d8337..4094711a82f8e0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OutOfMemoryException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OutOfMemoryException.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.Runtime.Serialization; namespace System @@ -35,6 +36,8 @@ public OutOfMemoryException(string? message, Exception? innerException) HResult = HResults.COR_E_OUTOFMEMORY; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected OutOfMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs b/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs index 9bcaf83fff9fcc..8d30c3b75c299a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public OverflowException(string? message, Exception? innerException) HResult = HResults.COR_E_OVERFLOW; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected OverflowException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs b/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs index 70f0b98d0c3758..474e0736f638ee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public PlatformNotSupportedException(string? message, Exception? inner) HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected PlatformNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/RankException.cs b/src/libraries/System.Private.CoreLib/src/System/RankException.cs index a65ba6a469bbba..4bfe6529ee32e3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/RankException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/RankException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -37,6 +38,8 @@ public RankException(string? message, Exception? innerException) HResult = HResults.COR_E_RANK; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected RankException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AmbiguousMatchException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AmbiguousMatchException.cs index 024ba7ac99fed6..e86467d58a2330 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AmbiguousMatchException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AmbiguousMatchException.cs @@ -27,6 +27,7 @@ public AmbiguousMatchException(string? message, Exception? inner) HResult = HResults.COR_E_AMBIGUOUSMATCH; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private AmbiguousMatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs index 00095ffb7f48bd..ea22b60e5544e7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs @@ -4,6 +4,7 @@ using System.IO; using System.Globalization; using System.Collections.Generic; +using System.ComponentModel; using System.Configuration.Assemblies; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; @@ -164,6 +165,8 @@ public virtual IEnumerable ExportedTypes [RequiresAssemblyFiles(ThrowingMessageInRAF)] public virtual FileStream[] GetFiles(bool getResourceModules) { throw NotImplemented.ByDesign; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; } public override string ToString() diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs index 479c6199feceb2..791f6f22d9f9f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.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.Configuration.Assemblies; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; @@ -278,6 +279,8 @@ public override string ToString() return s; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeFormatException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeFormatException.cs index 794ab45c2f054e..f381af37df05cc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeFormatException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeFormatException.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.Runtime.Serialization; namespace System.Reflection @@ -25,6 +26,8 @@ public CustomAttributeFormatException(string? message, Exception? inner) HResult = HResults.COR_E_CUSTOMATTRIBUTEFORMAT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CustomAttributeFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvalidFilterCriteriaException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvalidFilterCriteriaException.cs index fc373de5990835..14a84fe6baade9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvalidFilterCriteriaException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvalidFilterCriteriaException.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.Runtime.Serialization; namespace System.Reflection @@ -25,6 +26,8 @@ public InvalidFilterCriteriaException(string? message, Exception? inner) HResult = HResults.COR_E_INVALIDFILTERCRITERIA; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidFilterCriteriaException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs index 30f47a9e21a8d7..8234c96676d6f9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.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.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -137,6 +138,8 @@ public virtual Type[] FindTypes(TypeFilter? filter, object? filterCriteria) [RequiresUnreferencedCode("Trimming changes metadata tokens")] public virtual Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; } public override bool Equals(object? o) => base.Equals(o); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs index 7f8cf8108c085e..fe72911e7c2635 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs @@ -55,6 +55,8 @@ public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) public virtual int MetadataToken => MetadataToken_ParamDef; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public object GetRealObject(StreamingContext context) { // Once all the serializable fields have come in we can set up the real diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ReflectionTypeLoadException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ReflectionTypeLoadException.cs index 61b658c47df407..975b3993017e50 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ReflectionTypeLoadException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ReflectionTypeLoadException.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.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Text; @@ -9,7 +10,7 @@ namespace System.Reflection { [Serializable] [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public sealed class ReflectionTypeLoadException : SystemException, ISerializable + public sealed class ReflectionTypeLoadException : SystemException { public ReflectionTypeLoadException(Type?[]? classes, Exception?[]? exceptions) : this(classes, exceptions, null) @@ -24,6 +25,7 @@ public ReflectionTypeLoadException(Type?[]? classes, Exception?[]? exceptions, s HResult = HResults.COR_E_REFLECTIONTYPELOAD; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private ReflectionTypeLoadException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -31,6 +33,8 @@ private ReflectionTypeLoadException(SerializationInfo info, StreamingContext con LoaderExceptions = (Exception?[]?)info.GetValue("Exceptions", typeof(Exception[])) ?? Array.Empty(); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/StrongNameKeyPair.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/StrongNameKeyPair.cs index 7ceaaebab1fb07..23c420df8eaa6e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/StrongNameKeyPair.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/StrongNameKeyPair.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.IO; using System.Runtime.Serialization; @@ -15,6 +16,8 @@ public StrongNameKeyPair(FileStream keyPairFile) => public StrongNameKeyPair(byte[] keyPairArray) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected StrongNameKeyPair(SerializationInfo info, StreamingContext context) => throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetException.cs index a1d65febb3b83b..9efa8c9a1bc159 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetException.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.Runtime.Serialization; namespace System.Reflection @@ -25,6 +26,8 @@ public TargetException(string? message, Exception? inner) HResult = HResults.COR_E_TARGET; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TargetException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetInvocationException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetInvocationException.cs index 83a32c0f123753..82b8a2b0ba1116 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetInvocationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetInvocationException.cs @@ -21,6 +21,7 @@ public TargetInvocationException(string? message, Exception? inner) HResult = HResults.COR_E_TARGETINVOCATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private TargetInvocationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetParameterCountException.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetParameterCountException.cs index 531bf4927b5622..de84822e6c92a9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetParameterCountException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/TargetParameterCountException.cs @@ -27,6 +27,7 @@ public TargetParameterCountException(string? message, Exception? inner) HResult = HResults.COR_E_TARGETPARAMCOUNT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private TargetParameterCountException(SerializationInfo info, StreamingContext context) : base(info, context) { 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 b99dd7b3e26421..cfce9985321dd2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingManifestResourceException.cs @@ -29,6 +29,7 @@ public MissingManifestResourceException(string? message, Exception? inner) HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] protected MissingManifestResourceException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/MissingSatelliteAssemblyException.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingSatelliteAssemblyException.cs index 9634667e1193dc..de7724b91dcead 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/MissingSatelliteAssemblyException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/MissingSatelliteAssemblyException.cs @@ -14,6 +14,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Resources @@ -49,6 +50,8 @@ public MissingSatelliteAssemblyException(string? message, Exception? inner) HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MissingSatelliteAssemblyException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/AmbiguousImplementationException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/AmbiguousImplementationException.cs index 015ce9a317d9ef..692a26884d4875 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/AmbiguousImplementationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/AmbiguousImplementationException.cs @@ -27,6 +27,7 @@ public AmbiguousImplementationException(string? message, Exception? innerExcepti HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private AmbiguousImplementationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs index 74d207ba27b31e..e1c5af0e34daea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeWrappedException.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.Runtime.Serialization; namespace System.Runtime.CompilerServices @@ -23,12 +24,15 @@ public RuntimeWrappedException(object thrownObject) _wrappedException = thrownObject; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private RuntimeWrappedException(SerializationInfo info, StreamingContext context) : base(info, context) { _wrappedException = info.GetValue("WrappedException", typeof(object))!; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/SwitchExpressionException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/SwitchExpressionException.cs index f8106f171a60b9..b9a358eb538ecf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/SwitchExpressionException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/SwitchExpressionException.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.Runtime.Serialization; namespace System.Runtime.CompilerServices @@ -27,6 +28,7 @@ public SwitchExpressionException(object? unmatchedValue) : this() UnmatchedValue = unmatchedValue; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private SwitchExpressionException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -40,6 +42,8 @@ public SwitchExpressionException(string? message, Exception? innerException) public object? UnmatchedValue { get; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs index 5fddcf97372948..f4dd72a3136175 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.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.Runtime.Serialization; using System.Globalization; using System.Text; @@ -40,6 +41,8 @@ public COMException(string? message, int errorCode) HResult = errorCode; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected COMException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs index 13b85e99139348..9032dbd17dc021 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Globalization; using System.Runtime.Serialization; @@ -46,6 +47,8 @@ public ExternalException(string? message, int errorCode) HResult = errorCode; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ExternalException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidComObjectException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidComObjectException.cs index ef909472dbbd65..45614c4f6f27dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidComObjectException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidComObjectException.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.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -32,6 +33,8 @@ public InvalidComObjectException(string? message, Exception? inner) HResult = HResults.COR_E_INVALIDCOMOBJECT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidComObjectException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs index c8937ae454719a..83b87e253ec09e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.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.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -31,6 +32,8 @@ public InvalidOleVariantTypeException(string? message, Exception? inner) HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidOleVariantTypeException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs index 470b8498c5a1b7..8defddf208a10d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -36,6 +37,8 @@ public MarshalDirectiveException(string? message, Exception? inner) HResult = HResults.COR_E_MARSHALDIRECTIVE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected MarshalDirectiveException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SEHException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SEHException.cs index 5374fa82ac4b36..7b3596354d1a0a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SEHException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SEHException.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.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -29,6 +30,8 @@ public SEHException(string? message, Exception? inner) HResult = HResults.E_FAIL; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SEHException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs index 480d6b6b78b35b..f61cd68137f512 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.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.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -31,6 +32,8 @@ public SafeArrayRankMismatchException(string? message, Exception? inner) HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SafeArrayRankMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs index 809ce090d1f1d2..6f27786022ee59 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.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.Runtime.Serialization; namespace System.Runtime.InteropServices @@ -31,6 +32,8 @@ public SafeArrayTypeMismatchException(string? message, Exception? inner) HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SafeArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationException.cs index 688bd7ea08ea39..8b0ec24d125717 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationException.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.Serialization { [Serializable] @@ -29,6 +31,8 @@ public SerializationException(string? message, Exception? innerException) HResult = HResults.COR_E_SERIALIZATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SerializationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs b/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs index 03abeccc82ac1c..e9669d4aae2a15 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.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.Runtime.Serialization; @@ -36,6 +37,8 @@ public CryptographicException([StringSyntax(StringSyntaxAttribute.CompositeForma { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CryptographicException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/SecurityException.cs b/src/libraries/System.Private.CoreLib/src/System/Security/SecurityException.cs index fcf3a7d796a570..42d95825ad6e92 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/SecurityException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/SecurityException.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.Reflection; using System.Runtime.Serialization; @@ -50,6 +51,8 @@ public SecurityException(string? message, Type? type, string? state) PermissionState = state; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SecurityException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -63,6 +66,8 @@ protected SecurityException(SerializationInfo info, StreamingContext context) public override string ToString() => base.ToString(); + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/VerificationException.cs b/src/libraries/System.Private.CoreLib/src/System/Security/VerificationException.cs index 2bffac3ac5bd93..604d29e2bad3de 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/VerificationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/VerificationException.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.Runtime.Serialization; namespace System.Security @@ -27,6 +28,8 @@ public VerificationException(string? message, Exception? innerException) HResult = HResults.COR_E_VERIFICATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected VerificationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/SerializableAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/SerializableAttribute.cs index 670a9142fda303..edca62a808b897 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SerializableAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SerializableAttribute.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 { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class SerializableAttribute : Attribute { public SerializableAttribute() { } diff --git a/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs b/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs index ce34e3f7e6b32e..3c75a77aa4ed09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs @@ -36,6 +36,7 @@ public StackOverflowException(string? message, Exception? innerException) HResult = HResults.COR_E_STACKOVERFLOW; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private StackOverflowException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/SystemException.cs b/src/libraries/System.Private.CoreLib/src/System/SystemException.cs index 0e219ccbd8f1e0..bc27ed3f05d541 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SystemException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SystemException.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.Runtime.Serialization; namespace System @@ -27,6 +28,8 @@ public SystemException(string? message, Exception? innerException) HResult = HResults.COR_E_SYSTEM; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SystemException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs b/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs index e3eb90b5393cb5..06470463438371 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs @@ -100,6 +100,7 @@ public DecoderFallbackException(string? message, byte[]? bytesUnknown, int index _index = index; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private DecoderFallbackException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/EncoderExceptionFallback.cs b/src/libraries/System.Private.CoreLib/src/System/Text/EncoderExceptionFallback.cs index b314e6a19a4de9..a2295863caa006 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/EncoderExceptionFallback.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/EncoderExceptionFallback.cs @@ -120,6 +120,7 @@ internal EncoderFallbackException( _index = index; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private EncoderFallbackException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/AbandonedMutexException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/AbandonedMutexException.cs index 50e6641a043ef9..de8353322f442b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/AbandonedMutexException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/AbandonedMutexException.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.Runtime.Serialization; namespace System.Threading @@ -51,6 +52,8 @@ public AbandonedMutexException(string? message, Exception? inner, int location, SetupException(location, handle); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected AbandonedMutexException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/CompressedStack.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/CompressedStack.cs index a56996a80aead8..3ba3c58b11034b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/CompressedStack.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/CompressedStack.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.Runtime.Serialization; namespace System.Threading @@ -11,6 +12,8 @@ private CompressedStack() { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs index a08bf91a530aa5..ea47926d3dc4b9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs @@ -10,6 +10,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -47,6 +48,8 @@ private ExecutionContext( m_isFlowSuppressed = isFlowSuppressed; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/LockRecursionException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/LockRecursionException.cs index a57e8303ce28c0..eae6c61949b78a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/LockRecursionException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/LockRecursionException.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.Runtime.Serialization; namespace System.Threading @@ -23,6 +24,8 @@ public LockRecursionException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected LockRecursionException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreFullException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreFullException.cs index b1df072d464065..e57b02d28e3142 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreFullException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreFullException.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.Runtime.Serialization; namespace System.Threading @@ -21,6 +22,8 @@ public SemaphoreFullException(string? message, Exception? innerException) : base { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SemaphoreFullException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs index 9f53457fe6a0fb..d118ddd5c59762 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Threading @@ -37,6 +38,8 @@ public SynchronizationLockException(string? message, Exception? innerException) HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected SynchronizationLockException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCanceledException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCanceledException.cs index 1cc01ab6ef0014..c7fc558ea93f81 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCanceledException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCanceledException.cs @@ -9,6 +9,7 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Threading.Tasks @@ -79,6 +80,8 @@ public TaskCanceledException(Task? task) : /// /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TaskCanceledException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskSchedulerException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskSchedulerException.cs index f8364706ad5f0d..5e3ebd6f9f36ed 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskSchedulerException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskSchedulerException.cs @@ -9,6 +9,7 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Threading.Tasks @@ -67,6 +68,8 @@ public TaskSchedulerException(string? message, Exception? innerException) : base /// the serialized object data about the exception being thrown. /// The that /// contains contextual information about the source or destination. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TaskSchedulerException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs index d86ecc400640b8..f1cc648fc4a9d4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs @@ -28,6 +28,7 @@ internal ThreadAbortException() public object? ExceptionState => null; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private ThreadAbortException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInterruptedException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInterruptedException.cs index 6c04711737a605..b6d9d7fcd8422d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInterruptedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInterruptedException.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.Runtime.Serialization; namespace System.Threading @@ -35,6 +36,8 @@ public ThreadInterruptedException(string? message, Exception? innerException) HResult = HResults.COR_E_THREADINTERRUPTED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ThreadInterruptedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStartException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStartException.cs index 80d0eb64e5c357..915495526101bf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStartException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStartException.cs @@ -21,6 +21,7 @@ internal ThreadStartException(Exception reason) HResult = HResults.COR_E_THREADSTART; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private ThreadStartException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs index b8ece7ce7859c0..a4622f30eed777 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs @@ -11,6 +11,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Threading @@ -37,6 +38,8 @@ public ThreadStateException(string? message, Exception? innerException) HResult = HResults.COR_E_THREADSTATE; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ThreadStateException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandleCannotBeOpenedException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandleCannotBeOpenedException.cs index eb75a7733b8b15..51e81d9ce2092e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandleCannotBeOpenedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandleCannotBeOpenedException.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.Runtime.Serialization; namespace System.Threading @@ -24,6 +25,8 @@ public WaitHandleCannotBeOpenedException(string? message, Exception? innerExcept HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WaitHandleCannotBeOpenedException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneNotFoundException.cs index 23b48ad8f479dc..ee12022332dcff 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneNotFoundException.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.Runtime.Serialization; namespace System @@ -23,6 +24,8 @@ public TimeZoneNotFoundException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TimeZoneNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs b/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs index 21070493e3305c..6531c86a8815f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs @@ -10,6 +10,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -36,6 +37,8 @@ public TimeoutException(string? message, Exception? innerException) HResult = HResults.COR_E_TIMEOUT; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeAccessException.cs index 3020228d363898..16b6aa7c89410b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TypeAccessException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TypeAccessException.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.Runtime.Serialization; namespace System @@ -29,6 +30,8 @@ public TypeAccessException(string? message, Exception? inner) HResult = HResults.COR_E_TYPEACCESS; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TypeAccessException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs index 7f0ac685ac9a5b..7e71dad29fb400 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs @@ -13,6 +13,7 @@ ** =============================================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -51,12 +52,15 @@ internal TypeInitializationException(string? fullTypeName, string? message, Exce HResult = HResults.COR_E_TYPEINITIALIZATION; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private TypeInitializationException(SerializationInfo info, StreamingContext context) : base(info, context) { _typeName = info.GetString("TypeName"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeLoadException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeLoadException.cs index e1a5bedc8daadd..9ac7ff2efc1f9f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TypeLoadException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TypeLoadException.cs @@ -1,13 +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 { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public partial class TypeLoadException : SystemException, ISerializable + public partial class TypeLoadException : SystemException { public TypeLoadException() : base(SR.Arg_TypeLoadException) @@ -38,6 +39,8 @@ public override string Message public string TypeName => _className ?? string.Empty; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TypeLoadException(SerializationInfo info, StreamingContext context) : base(info, context) { _className = info.GetString("TypeLoadClassName"); @@ -46,6 +49,8 @@ protected TypeLoadException(SerializationInfo info, StreamingContext context) : _resourceId = info.GetInt32("TypeLoadResourceID"); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeUnloadedException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeUnloadedException.cs index ab9dd72f118045..31ef328977f32c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TypeUnloadedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TypeUnloadedException.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.Runtime.Serialization; namespace System @@ -27,6 +28,8 @@ public TypeUnloadedException(string? message, Exception? innerException) HResult = HResults.COR_E_TYPEUNLOADED; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TypeUnloadedException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs index 7b2013246fea04..b57da7c36c30bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs @@ -12,6 +12,7 @@ ** ===========================================================*/ +using System.ComponentModel; using System.Runtime.Serialization; namespace System @@ -40,6 +41,8 @@ public UnauthorizedAccessException(string? message, Exception? inner) HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected UnauthorizedAccessException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs index 36cb48135dd89e..5bc19e32b6e9a8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs +++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.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.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -63,6 +64,8 @@ public bool TryGetTarget([MaybeNullWhen(false), NotNullWhen(true)] out T target) return o != null; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs index 81c33fd07445e3..5f4079183edfa8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs +++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.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.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -51,6 +52,8 @@ public WeakReference(object? target, bool trackResurrection) Create(target, trackResurrection); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected WeakReference(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); @@ -61,6 +64,8 @@ protected WeakReference(SerializationInfo info, StreamingContext context) Create(target, trackResurrection); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { ArgumentNullException.ThrowIfNull(info); diff --git a/src/libraries/System.Private.Uri/src/System/Uri.cs b/src/libraries/System.Private.Uri/src/System/Uri.cs index 3c29cd3ba5052b..2203e42b544566 100644 --- a/src/libraries/System.Private.Uri/src/System/Uri.cs +++ b/src/libraries/System.Private.Uri/src/System/Uri.cs @@ -3,6 +3,7 @@ using System.Buffers; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -450,6 +451,8 @@ public Uri(Uri baseUri, string? relativeUri) // // ISerializable constructor // + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Uri(SerializationInfo serializationInfo, StreamingContext streamingContext) { string? uriString = serializationInfo.GetString("AbsoluteUri"); // Do not rename (binary serialization) diff --git a/src/libraries/System.Private.Uri/src/System/UriFormatException.cs b/src/libraries/System.Private.Uri/src/System/UriFormatException.cs index 5eab840edfcc4f..76b88bb4c1207d 100644 --- a/src/libraries/System.Private.Uri/src/System/UriFormatException.cs +++ b/src/libraries/System.Private.Uri/src/System/UriFormatException.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.Runtime.Serialization; namespace System @@ -24,10 +25,13 @@ public UriFormatException(string? textString, Exception? e) : base(textString, e { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected UriFormatException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs index e9ba54d399b3ac..a94063d84e2608 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.IO; using System.Resources; using System.Runtime.Serialization; @@ -15,10 +16,14 @@ namespace System.Xml.Schema [System.Runtime.CompilerServices.TypeForwardedFrom("System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class XmlSchemaInferenceException : XmlSchemaException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XmlSchemaInferenceException(SerializationInfo info, StreamingContext context) : base(info, context) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs index 4e90c684de605a..a6e1e567fd48a3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.IO; using System.Text; using System.Resources; @@ -27,6 +28,8 @@ public class XmlSchemaException : SystemException // message == null for V2 or higher exceptions; the exception message is stored on the base class (Exception._message) private readonly string? _message; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XmlSchemaException(SerializationInfo info, StreamingContext context) : base(info, context) { _res = (string?)info.GetValue("res", typeof(string)); @@ -57,6 +60,8 @@ protected XmlSchemaException(SerializationInfo info, StreamingContext context) : } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs index a3742ab827e123..b542720a2f6d46 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.IO; using System.Text; using System.Resources; @@ -16,10 +17,14 @@ public class XmlSchemaValidationException : XmlSchemaException { private object? _sourceNodeObject; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XmlSchemaValidationException(SerializationInfo info, StreamingContext context) : base(info, context) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs index bca6862c4d6b84..420e0150a87fed 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Resources; using System.Runtime.Serialization; using System.Diagnostics; @@ -22,6 +23,8 @@ public class XPathException : SystemException // message == null for created V2 exceptions; the exception message is stored in Exception._message private readonly string? _message; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XPathException(SerializationInfo info, StreamingContext context) : base(info, context) { _res = (string)info.GetValue("res", typeof(string))!; @@ -49,6 +52,8 @@ protected XPathException(SerializationInfo info, StreamingContext context) : bas } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs index a728ab2a164529..8cadf7feff813e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Resources; using System.Text; using System.Diagnostics; @@ -30,6 +31,8 @@ public class XmlException : SystemException // message == null for V2 or higher exceptions; the exception message is stored on the base class (Exception._message) private readonly string? _message; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XmlException(SerializationInfo info, StreamingContext context) : base(info, context) { _res = (string)info.GetValue("res", typeof(string))!; @@ -65,6 +68,8 @@ protected XmlException(SerializationInfo info, StreamingContext context) : base( } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathCompileException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathCompileException.cs index c4d4e030964ba5..36aa9e793e1cb4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathCompileException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathCompileException.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.Runtime.Serialization; using System.Text; @@ -25,6 +26,7 @@ internal XPathCompileException(string resId, params string[] args) : base(resId, args) { } // queryString will be set later + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] internal XPathCompileException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -33,6 +35,8 @@ internal XPathCompileException(SerializationInfo info, StreamingContext context) endChar = (int)info.GetValue("EndChar", typeof(int))!; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XslException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XslException.cs index d2d6bdb62db3dd..64f22b58357bdd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XslException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XslException.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.Globalization; using System.Resources; @@ -16,6 +17,8 @@ public XslTransformException(Exception? inner, string res, params string?[]? arg : base(CreateMessage(res, args), inner) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public XslTransformException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -110,6 +113,7 @@ internal XslLoadException(Exception? inner, ISourceLineInfo? lineInfo) SetSourceLineInfo(lineInfo); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] internal XslLoadException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -161,6 +165,8 @@ internal void SetSourceLineInfo(ISourceLineInfo? lineInfo) _lineInfo = lineInfo; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltException.cs index e328918d7c9d71..dd4647c9df7f53 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltException.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.Globalization; using System.Resources; @@ -23,6 +24,8 @@ public class XsltException : SystemException // message == null for created V2 exceptions; the exception message is stored in Exception._message private readonly string? _message; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XsltException(SerializationInfo info, StreamingContext context) : base(info, context) { _res = (string)info.GetValue("res", typeof(string))!; @@ -53,6 +56,8 @@ protected XsltException(SerializationInfo info, StreamingContext context) : base } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); @@ -149,10 +154,14 @@ private static string CreateMessage(string res, string?[]? args, string? sourceU [System.Runtime.CompilerServices.TypeForwardedFrom("System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class XsltCompileException : XsltException { + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected XsltCompileException(SerializationInfo info, StreamingContext context) : base(info, context) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs index 4a615aec89750b..0f1aac7055dabc 100644 --- a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs +++ b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs @@ -16,6 +16,10 @@ public readonly partial struct AssemblyReference } public partial class ImageFormatLimitationException : System.Exception { +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } } diff --git a/src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj b/src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj index 04cbedc65b3c70..6d42a53f7c5a7c 100644 --- a/src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj +++ b/src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj @@ -249,6 +249,7 @@ The System.Reflection.Metadata library is built-in as part of the shared framewo + diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/ImageFormatLimitationException.Serialization.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/ImageFormatLimitationException.Serialization.cs index 4885861a0a9b3b..ed6b2ab3e8eab8 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/ImageFormatLimitationException.Serialization.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/ImageFormatLimitationException.Serialization.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.Reflection.Metadata.Ecma335; using System.Runtime.Serialization; @@ -9,6 +10,10 @@ namespace System.Reflection.Metadata [Serializable] public partial class ImageFormatLimitationException : Exception { +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ImageFormatLimitationException(SerializationInfo info, StreamingContext context) : base(info, context) { 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 568fb5e4d18789..9e0e4320a021c9 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 @@ -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.Globalization; using System.IO; @@ -197,6 +198,10 @@ public sealed override AssemblyName[] GetReferencedAssemblies() } // Serialization +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public sealed override void GetObjectData(SerializationInfo info, StreamingContext context) => throw new NotSupportedException(); // Satellite assemblies 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 c932b87e373dd3..bd19faaac6256d 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 @@ -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.IO; @@ -71,6 +72,10 @@ public sealed override string Name public abstract override MethodInfo[] GetMethods(BindingFlags bindingFlags); protected abstract override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers); +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public sealed override void GetObjectData(SerializationInfo info, StreamingContext context) => throw new NotSupportedException(); public abstract override void GetPEKind(out PortableExecutableKinds peKind, out ImageFileMachine machine); diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 6e091f27cc3e70..d5ee8c8c8dffc8 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -345,6 +345,8 @@ public DataMisalignedException(string? message, System.Exception? innerException public partial class DllNotFoundException : System.TypeLoadException { public DllNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DllNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DllNotFoundException(string? message) { } public DllNotFoundException(string? message, System.Exception? inner) { } @@ -510,6 +512,8 @@ public static void Combine(object rcw, System.Guid iid, int dispid, System.Deleg public partial class COMException : System.Runtime.InteropServices.ExternalException { public COMException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected COMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public COMException(string? message) { } public COMException(string? message, System.Exception? inner) { } @@ -748,6 +752,8 @@ public InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType in public partial class InvalidComObjectException : System.SystemException { public InvalidComObjectException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidComObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidComObjectException(string? message) { } public InvalidComObjectException(string? message, System.Exception? inner) { } @@ -755,6 +761,8 @@ public InvalidComObjectException(string? message, System.Exception? inner) { } public partial class InvalidOleVariantTypeException : System.SystemException { public InvalidOleVariantTypeException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOleVariantTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOleVariantTypeException(string? message) { } public InvalidOleVariantTypeException(string? message, System.Exception? inner) { } @@ -1054,6 +1062,8 @@ public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanaged public partial class MarshalDirectiveException : System.SystemException { public MarshalDirectiveException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MarshalDirectiveException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MarshalDirectiveException(string? message) { } public MarshalDirectiveException(string? message, System.Exception? inner) { } @@ -1393,6 +1403,8 @@ public ProgIdAttribute(string progId) { } public partial class SafeArrayRankMismatchException : System.SystemException { public SafeArrayRankMismatchException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayRankMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayRankMismatchException(string? message) { } public SafeArrayRankMismatchException(string? message, System.Exception? inner) { } @@ -1400,6 +1412,8 @@ public SafeArrayRankMismatchException(string? message, System.Exception? inner) public partial class SafeArrayTypeMismatchException : System.SystemException { public SafeArrayTypeMismatchException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayTypeMismatchException(string? message) { } public SafeArrayTypeMismatchException(string? message, System.Exception? inner) { } @@ -1407,6 +1421,8 @@ public SafeArrayTypeMismatchException(string? message, System.Exception? inner) public partial class SEHException : System.Runtime.InteropServices.ExternalException { public SEHException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SEHException(string? message) { } public SEHException(string? message, System.Exception? inner) { } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props index b7d39deed818e1..6f77d0b27c47b4 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props +++ b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props @@ -3,6 +3,6 @@ Microsoft - $(NoWarn);SYSLIB0011;SYSLIB0049 + $(NoWarn);SYSLIB0011;SYSLIB0049;SYSLIB0050 \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs index 63f1abbba95ae9..755409e61870db 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs +++ b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs @@ -66,6 +66,8 @@ public IgnoreDataMemberAttribute() { } public partial class InvalidDataContractException : System.Exception { public InvalidDataContractException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidDataContractException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidDataContractException(string? message) { } public InvalidDataContractException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj b/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj index bd7267ae26b97c..e013ff5194a485 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj +++ b/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj @@ -15,6 +15,7 @@ + diff --git a/src/libraries/System.Runtime.Serialization.Primitives/src/System/Runtime/Serialization/InvalidDataContractException.cs b/src/libraries/System.Runtime.Serialization.Primitives/src/System/Runtime/Serialization/InvalidDataContractException.cs index 9d821d781d5db4..0c5bff994f156d 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/src/System/Runtime/Serialization/InvalidDataContractException.cs +++ b/src/libraries/System.Runtime.Serialization.Primitives/src/System/Runtime/Serialization/InvalidDataContractException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Runtime.CompilerServices; namespace System.Runtime.Serialization @@ -25,6 +26,8 @@ public InvalidDataContractException(string? message, Exception? innerException) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected InvalidDataContractException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs index 316800e18fe336..f93692bac327ae 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs @@ -4145,6 +4145,9 @@ public MyArgumentException(string message, string paramName) : base(message) _paramName = paramName; } +#if NET8_0_OR_GREATER + [Obsolete("Exception..ctor(SerializationInfo, StreamingContext) is obsolete.", DiagnosticId = "SYSLIB0050")] +#endif protected MyArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { _paramName = info.GetString("ParamName"); } @@ -4161,6 +4164,9 @@ internal set } } +#if NET8_0_OR_GREATER + [Obsolete("Exception.GetObjectData is obsolete.", DiagnosticId = "SYSLIB0050")] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 25fc2aa34819a8..c5b2c18b1f06e6 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -46,6 +46,8 @@ namespace System public partial class AccessViolationException : System.SystemException { public AccessViolationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AccessViolationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AccessViolationException(string? message) { } public AccessViolationException(string? message, System.Exception? innerException) { } @@ -94,6 +96,8 @@ public partial class AggregateException : System.Exception public AggregateException() { } public AggregateException(System.Collections.Generic.IEnumerable innerExceptions) { } public AggregateException(params System.Exception[] innerExceptions) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AggregateException(string? message) { } public AggregateException(string? message, System.Collections.Generic.IEnumerable innerExceptions) { } @@ -103,6 +107,8 @@ public AggregateException(string? message, params System.Exception[] innerExcept public override string Message { get { throw null; } } public System.AggregateException Flatten() { throw null; } public override System.Exception GetBaseException() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Handle(System.Func predicate) { } public override string ToString() { throw null; } @@ -226,6 +232,8 @@ internal AppDomainSetup() { } public partial class AppDomainUnloadedException : System.SystemException { public AppDomainUnloadedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AppDomainUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AppDomainUnloadedException(string? message) { } public AppDomainUnloadedException(string? message, System.Exception? innerException) { } @@ -233,6 +241,8 @@ public AppDomainUnloadedException(string? message, System.Exception? innerExcept public partial class ApplicationException : System.Exception { public ApplicationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ApplicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ApplicationException(string? message) { } public ApplicationException(string? message, System.Exception? innerException) { } @@ -269,6 +279,8 @@ public void End() { } public partial class ArgumentException : System.SystemException { public ArgumentException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentException(string? message) { } public ArgumentException(string? message, System.Exception? innerException) { } @@ -276,12 +288,16 @@ public ArgumentException(string? message, string? paramName) { } public ArgumentException(string? message, string? paramName, System.Exception? innerException) { } public override string Message { get { throw null; } } public virtual string? ParamName { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfNullOrEmpty([System.Diagnostics.CodeAnalysis.NotNullAttribute] string? argument, [System.Runtime.CompilerServices.CallerArgumentExpression("argument")] string? paramName = null) { throw null; } } public partial class ArgumentNullException : System.ArgumentException { public ArgumentNullException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentNullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentNullException(string? paramName) { } public ArgumentNullException(string? message, System.Exception? innerException) { } @@ -293,6 +309,8 @@ public ArgumentNullException(string? paramName, string? message) { } public partial class ArgumentOutOfRangeException : System.ArgumentException { public ArgumentOutOfRangeException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentOutOfRangeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentOutOfRangeException(string? paramName) { } public ArgumentOutOfRangeException(string? message, System.Exception? innerException) { } @@ -300,6 +318,8 @@ public ArgumentOutOfRangeException(string? paramName, object? actualValue, strin public ArgumentOutOfRangeException(string? paramName, string? message) { } public virtual object? ActualValue { get { throw null; } } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfZero(T value, [System.Runtime.CompilerServices.CallerArgumentExpressionAttribute(nameof(value))] string? paramName = null) where T : System.Numerics.INumberBase { throw null; } public static void ThrowIfNegative(T value, [System.Runtime.CompilerServices.CallerArgumentExpressionAttribute(nameof(value))] string? paramName = null) where T : System.Numerics.INumberBase { throw null; } @@ -312,6 +332,8 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public partial class ArithmeticException : System.SystemException { public ArithmeticException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArithmeticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArithmeticException(string? message) { } public ArithmeticException(string? message, System.Exception? innerException) { } @@ -493,6 +515,8 @@ void System.Collections.IEnumerator.Reset() { } public partial class ArrayTypeMismatchException : System.SystemException { public ArrayTypeMismatchException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArrayTypeMismatchException(string? message) { } public ArrayTypeMismatchException(string? message, System.Exception? innerException) { } @@ -577,6 +601,8 @@ public AttributeUsageAttribute(System.AttributeTargets validOn) { } public partial class BadImageFormatException : System.SystemException { public BadImageFormatException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BadImageFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BadImageFormatException(string? message) { } public BadImageFormatException(string? message, System.Exception? inner) { } @@ -585,6 +611,8 @@ public BadImageFormatException(string? message, string? fileName, System.Excepti public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -859,6 +887,8 @@ public static void SetByte(System.Array array, int index, byte value) { } public partial class CannotUnloadAppDomainException : System.SystemException { public CannotUnloadAppDomainException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CannotUnloadAppDomainException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CannotUnloadAppDomainException(string? message) { } public CannotUnloadAppDomainException(string? message, System.Exception? innerException) { } @@ -1059,6 +1089,8 @@ protected ContextBoundObject() { } public partial class ContextMarshalException : System.SystemException { public ContextMarshalException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ContextMarshalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ContextMarshalException(string? message) { } public ContextMarshalException(string? message, System.Exception? inner) { } @@ -1866,6 +1898,8 @@ public sealed partial class DBNull : System.IConvertible, System.Runtime.Seriali { internal DBNull() { } public static readonly System.DBNull Value; + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.TypeCode GetTypeCode() { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } @@ -2120,6 +2154,8 @@ protected Delegate([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAt public override int GetHashCode() { throw null; } public virtual System.Delegate[] GetInvocationList() { throw null; } protected virtual System.Reflection.MethodInfo GetMethodImpl() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.Delegate? d1, System.Delegate? d2) { throw null; } public static bool operator !=(System.Delegate? d1, System.Delegate? d2) { throw null; } @@ -2130,6 +2166,8 @@ public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo public partial class DivideByZeroException : System.ArithmeticException { public DivideByZeroException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DivideByZeroException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DivideByZeroException(string? message) { } public DivideByZeroException(string? message, System.Exception? innerException) { } @@ -2328,6 +2366,8 @@ public DivideByZeroException(string? message, System.Exception? innerException) public partial class DuplicateWaitObjectException : System.ArgumentException { public DuplicateWaitObjectException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateWaitObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateWaitObjectException(string? parameterName) { } public DuplicateWaitObjectException(string? message, System.Exception? innerException) { } @@ -2336,6 +2376,8 @@ public DuplicateWaitObjectException(string? parameterName, string? message) { } public partial class EntryPointNotFoundException : System.TypeLoadException { public EntryPointNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EntryPointNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EntryPointNotFoundException(string? message) { } public EntryPointNotFoundException(string? message, System.Exception? inner) { } @@ -2530,6 +2572,8 @@ public EventArgs() { } public partial class Exception : System.Runtime.Serialization.ISerializable { public Exception() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Exception(string? message) { } public Exception(string? message, System.Exception? innerException) { } @@ -2544,6 +2588,8 @@ public Exception(string? message, System.Exception? innerException) { } [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected event System.EventHandler? SerializeObjectState { add { } remove { } } public virtual System.Exception GetBaseException() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public new System.Type GetType() { throw null; } public override string ToString() { throw null; } @@ -2558,6 +2604,8 @@ public ExecutionEngineException(string? message, System.Exception? innerExceptio public partial class FieldAccessException : System.MemberAccessException { public FieldAccessException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FieldAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FieldAccessException(string? message) { } public FieldAccessException(string? message, System.Exception? inner) { } @@ -2570,6 +2618,8 @@ public FlagsAttribute() { } public partial class FormatException : System.SystemException { public FormatException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FormatException(string? message) { } public FormatException(string? message, System.Exception? innerException) { } @@ -3810,6 +3860,8 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class InvalidCastException : System.SystemException { public InvalidCastException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCastException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidCastException(string? message) { } public InvalidCastException(string? message, System.Exception? innerException) { } @@ -3818,6 +3870,8 @@ public InvalidCastException(string? message, int errorCode) { } public partial class InvalidOperationException : System.SystemException { public InvalidOperationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOperationException(string? message) { } public InvalidOperationException(string? message, System.Exception? innerException) { } @@ -3831,6 +3885,8 @@ public InvalidProgramException(string? message, System.Exception? inner) { } public partial class InvalidTimeZoneException : System.Exception { public InvalidTimeZoneException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidTimeZoneException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidTimeZoneException(string? message) { } public InvalidTimeZoneException(string? message, System.Exception? innerException) { } @@ -4112,6 +4168,8 @@ public static partial class MathF public partial class MemberAccessException : System.SystemException { public MemberAccessException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MemberAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MemberAccessException(string? message) { } public MemberAccessException(string? message, System.Exception? inner) { } @@ -4145,6 +4203,8 @@ public void CopyTo(System.Memory destination) { } public partial class MethodAccessException : System.MemberAccessException { public MethodAccessException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MethodAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MethodAccessException(string? message) { } public MethodAccessException(string? message, System.Exception? inner) { } @@ -4157,31 +4217,39 @@ public enum MidpointRounding ToNegativeInfinity = 3, ToPositiveInfinity = 4, } - public partial class MissingFieldException : System.MissingMemberException, System.Runtime.Serialization.ISerializable + public partial class MissingFieldException : System.MissingMemberException { public MissingFieldException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingFieldException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingFieldException(string? message) { } public MissingFieldException(string? message, System.Exception? inner) { } public MissingFieldException(string? className, string? fieldName) { } public override string Message { get { throw null; } } } - public partial class MissingMemberException : System.MemberAccessException, System.Runtime.Serialization.ISerializable + public partial class MissingMemberException : System.MemberAccessException { protected string? ClassName; protected string? MemberName; protected byte[]? Signature; public MissingMemberException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMemberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMemberException(string? message) { } public MissingMemberException(string? message, System.Exception? inner) { } public MissingMemberException(string? className, string? memberName) { } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class MissingMethodException : System.MissingMemberException { public MissingMethodException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMethodException(string? message) { } public MissingMethodException(string? message, System.Exception? inner) { } @@ -4233,6 +4301,8 @@ public abstract partial class MulticastDelegate : System.Delegate public sealed override int GetHashCode() { throw null; } public sealed override System.Delegate[] GetInvocationList() { throw null; } protected override System.Reflection.MethodInfo GetMethodImpl() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.MulticastDelegate? d1, System.MulticastDelegate? d2) { throw null; } public static bool operator !=(System.MulticastDelegate? d1, System.MulticastDelegate? d2) { throw null; } @@ -4245,6 +4315,7 @@ public MulticastNotSupportedException(string? message) { } public MulticastNotSupportedException(string? message, System.Exception? inner) { } } [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false)] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class NonSerializedAttribute : System.Attribute { public NonSerializedAttribute() { } @@ -4253,17 +4324,23 @@ public partial class NotFiniteNumberException : System.ArithmeticException { public NotFiniteNumberException() { } public NotFiniteNumberException(double offendingNumber) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotFiniteNumberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotFiniteNumberException(string? message) { } public NotFiniteNumberException(string? message, double offendingNumber) { } public NotFiniteNumberException(string? message, double offendingNumber, System.Exception? innerException) { } public NotFiniteNumberException(string? message, System.Exception? innerException) { } public double OffendingNumber { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class NotImplementedException : System.SystemException { public NotImplementedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotImplementedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotImplementedException(string? message) { } public NotImplementedException(string? message, System.Exception? inner) { } @@ -4271,6 +4348,8 @@ public NotImplementedException(string? message, System.Exception? inner) { } public partial class NotSupportedException : System.SystemException { public NotSupportedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotSupportedException(string? message) { } public NotSupportedException(string? message, System.Exception? innerException) { } @@ -4300,6 +4379,8 @@ public partial struct Nullable where T : struct public partial class NullReferenceException : System.SystemException { public NullReferenceException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NullReferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NullReferenceException(string? message) { } public NullReferenceException(string? message, System.Exception? innerException) { } @@ -4318,12 +4399,16 @@ public Object() { } } public partial class ObjectDisposedException : System.InvalidOperationException { + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectDisposedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ObjectDisposedException(string? objectName) { } public ObjectDisposedException(string? message, System.Exception? innerException) { } public ObjectDisposedException(string? objectName, string? message) { } public override string Message { get { throw null; } } public string ObjectName { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIf([System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)] bool condition, object instance) => throw null; public static void ThrowIf([System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)] bool condition, System.Type type) => throw null; @@ -4347,6 +4432,8 @@ public OperatingSystem(System.PlatformID platform, System.Version version) { } public System.Version Version { get { throw null; } } public string VersionString { get { throw null; } } public object Clone() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsAndroid() { throw null; } public static bool IsAndroidVersionAtLeast(int major, int minor = 0, int build = 0, int revision = 0) { throw null; } @@ -4376,6 +4463,8 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S public partial class OperationCanceledException : System.SystemException { public OperationCanceledException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OperationCanceledException(string? message) { } public OperationCanceledException(string? message, System.Exception? innerException) { } @@ -4387,6 +4476,8 @@ public OperationCanceledException(System.Threading.CancellationToken token) { } public partial class OutOfMemoryException : System.SystemException { public OutOfMemoryException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OutOfMemoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OutOfMemoryException(string? message) { } public OutOfMemoryException(string? message, System.Exception? innerException) { } @@ -4394,6 +4485,8 @@ public OutOfMemoryException(string? message, System.Exception? innerException) { public partial class OverflowException : System.ArithmeticException { public OverflowException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OverflowException(string? message) { } public OverflowException(string? message, System.Exception? innerException) { } @@ -4422,6 +4515,8 @@ public enum PlatformID public partial class PlatformNotSupportedException : System.NotSupportedException { public PlatformNotSupportedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PlatformNotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PlatformNotSupportedException(string? message) { } public PlatformNotSupportedException(string? message, System.Exception? inner) { } @@ -4475,6 +4570,8 @@ public void Shuffle(T[] values) { } public partial class RankException : System.SystemException { public RankException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RankException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RankException(string? message) { } public RankException(string? message, System.Exception? innerException) { } @@ -4565,6 +4662,8 @@ public partial struct RuntimeFieldHandle : System.IEquatable : System.Runtime.Serialization.ISerializable where T : class? @@ -7103,6 +7229,8 @@ public sealed partial class WeakReference : System.Runtime.Serialization.ISer public WeakReference(T target) { } public WeakReference(T target, bool trackResurrection) { } ~WeakReference() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void SetTarget(T target) { } public bool TryGetTarget([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false), System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out T target) { throw null; } @@ -7316,6 +7444,8 @@ public sealed partial class Comparer : System.Collections.IComparer, System.Runt public static readonly System.Collections.Comparer DefaultInvariant; public Comparer(System.Globalization.CultureInfo culture) { } public int Compare(object? a, object? b) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial struct DictionaryEntry @@ -7350,6 +7480,8 @@ public Hashtable(int capacity, float loadFactor) { } public Hashtable(int capacity, float loadFactor, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(int, float, IEqualityComparer) instead.")] public Hashtable(int capacity, float loadFactor, System.Collections.IHashCodeProvider? hcp, System.Collections.IComparer? comparer) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Hashtable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.ObsoleteAttribute("Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.")] protected System.Collections.IComparer? comparer { get { throw null; } set { } } @@ -7373,6 +7505,8 @@ public virtual void Clear() { } public virtual void CopyTo(System.Array array, int arrayIndex) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } protected virtual int GetHash(object key) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual bool KeyEquals(object? item, object key) { throw null; } public virtual void OnDeserialization(object? sender) { } @@ -7553,6 +7687,8 @@ public partial interface ISet : System.Collections.Generic.ICollection, Sy public partial class KeyNotFoundException : System.SystemException { public KeyNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected KeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public KeyNotFoundException(string? message) { } public KeyNotFoundException(string? message, System.Exception? innerException) { } @@ -8447,6 +8583,8 @@ public void ClearCachedData() { } public partial class CultureNotFoundException : System.ArgumentException { public CultureNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CultureNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CultureNotFoundException(string? message) { } public CultureNotFoundException(string? message, System.Exception? innerException) { } @@ -8458,6 +8596,8 @@ public CultureNotFoundException(string? paramName, string? invalidCultureName, s public virtual int? InvalidCultureId { get { throw null; } } public virtual string? InvalidCultureName { get { throw null; } } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } [System.FlagsAttribute] @@ -9323,6 +9463,8 @@ public void MoveTo(string destDirName) { } public partial class DirectoryNotFoundException : System.IO.IOException { public DirectoryNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DirectoryNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryNotFoundException(string? message) { } public DirectoryNotFoundException(string? message, System.Exception? innerException) { } @@ -9330,6 +9472,8 @@ public DirectoryNotFoundException(string? message, System.Exception? innerExcept public partial class EndOfStreamException : System.IO.IOException { public EndOfStreamException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EndOfStreamException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EndOfStreamException(string? message) { } public EndOfStreamException(string? message, System.Exception? innerException) { } @@ -9507,6 +9651,8 @@ public void MoveTo(string destFileName, bool overwrite) { } public partial class FileLoadException : System.IO.IOException { public FileLoadException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileLoadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileLoadException(string? message) { } public FileLoadException(string? message, System.Exception? inner) { } @@ -9515,6 +9661,8 @@ public FileLoadException(string? message, string? fileName, System.Exception? in public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -9530,6 +9678,8 @@ public enum FileMode public partial class FileNotFoundException : System.IO.IOException { public FileNotFoundException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileNotFoundException(string? message) { } public FileNotFoundException(string? message, System.Exception? innerException) { } @@ -9538,6 +9688,8 @@ public FileNotFoundException(string? message, string? fileName, System.Exception public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -9646,6 +9798,8 @@ public abstract partial class FileSystemInfo : System.MarshalByRefObject, System protected string FullPath; protected string OriginalPath; protected FileSystemInfo() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.IO.FileAttributes Attributes { get { throw null; } set { } } public System.DateTime CreationTime { get { throw null; } set { } } @@ -9662,6 +9816,8 @@ protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, Sy public System.IO.UnixFileMode UnixFileMode { get { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("windows")] set { } } public void CreateAsSymbolicLink(string pathToTarget) { } public abstract void Delete(); + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Refresh() { } public System.IO.FileSystemInfo? ResolveLinkTarget(bool returnFinalTarget) { throw null; } @@ -9681,6 +9837,8 @@ public InvalidDataException(string? message, System.Exception? innerException) { public partial class IOException : System.SystemException { public IOException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected IOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public IOException(string? message) { } public IOException(string? message, System.Exception? innerException) { } @@ -9797,6 +9955,8 @@ public static partial class Path public partial class PathTooLongException : System.IO.IOException { public PathTooLongException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PathTooLongException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PathTooLongException(string? message) { } public PathTooLongException(string? message, System.Exception? innerException) { } @@ -10706,6 +10866,8 @@ public virtual event System.Reflection.ModuleResolveEventHandler? ModuleResolve public virtual System.Reflection.Module[] GetModules(bool getResourceModules) { throw null; } public virtual System.Reflection.AssemblyName GetName() { throw null; } public virtual System.Reflection.AssemblyName GetName(bool copiedName) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Assembly references might be removed")] public virtual System.Reflection.AssemblyName[] GetReferencedAssemblies() { throw null; } @@ -10880,6 +11042,8 @@ public AssemblyName(string assemblyName) { } public System.Configuration.Assemblies.AssemblyVersionCompatibility VersionCompatibility { get { throw null; } set { } } public object Clone() { throw null; } public static System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public byte[]? GetPublicKey() { throw null; } public byte[]? GetPublicKeyToken() { throw null; } @@ -11048,6 +11212,8 @@ public static partial class CustomAttributeExtensions public partial class CustomAttributeFormatException : System.FormatException { public CustomAttributeFormatException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CustomAttributeFormatException(string? message) { } public CustomAttributeFormatException(string? message, System.Exception? inner) { } @@ -11248,6 +11414,8 @@ public static partial class IntrospectionExtensions public partial class InvalidFilterCriteriaException : System.ApplicationException { public InvalidFilterCriteriaException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidFilterCriteriaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidFilterCriteriaException(string? message) { } public InvalidFilterCriteriaException(string? message, System.Exception? inner) { } @@ -11504,6 +11672,8 @@ protected Module() { } public System.Reflection.MethodInfo[] GetMethods() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Methods might be removed")] public virtual System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags) { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void GetPEKind(out System.Reflection.PortableExecutableKinds peKind, out System.Reflection.ImageFileMachine machine) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Types might be removed")] @@ -11627,6 +11797,8 @@ protected ParameterInfo() { } public virtual System.Collections.Generic.IList GetCustomAttributesData() { throw null; } public virtual System.Type GetModifiedParameterType() { throw null; } public virtual System.Type[] GetOptionalCustomModifiers() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { throw null; } public virtual System.Type[] GetRequiredCustomModifiers() { throw null; } public virtual bool IsDefined(System.Type attributeType, bool inherit) { throw null; } @@ -11721,13 +11893,15 @@ protected ReflectionContext() { } public abstract System.Reflection.Assembly MapAssembly(System.Reflection.Assembly assembly); public abstract System.Reflection.TypeInfo MapType(System.Reflection.TypeInfo type); } - public sealed partial class ReflectionTypeLoadException : System.SystemException, System.Runtime.Serialization.ISerializable + public sealed partial class ReflectionTypeLoadException : System.SystemException { public ReflectionTypeLoadException(System.Type?[]? classes, System.Exception?[]? exceptions) { } public ReflectionTypeLoadException(System.Type?[]? classes, System.Exception?[]? exceptions, string? message) { } public System.Exception?[] LoaderExceptions { get { throw null; } } public override string Message { get { throw null; } } public System.Type?[] Types { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -11763,6 +11937,8 @@ public partial class StrongNameKeyPair : System.Runtime.Serialization.IDeseriali { public StrongNameKeyPair(byte[] keyPairArray) { } public StrongNameKeyPair(System.IO.FileStream keyPairFile) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongNameKeyPair(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongNameKeyPair(string keyPairContainer) { } public byte[] PublicKey { get { throw null; } } @@ -11772,6 +11948,8 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TargetException : System.ApplicationException { public TargetException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TargetException(string? message) { } public TargetException(string? message, System.Exception? inner) { } @@ -11948,6 +12126,7 @@ public partial interface IResourceReader : System.Collections.IEnumerable, Syste public partial class MissingManifestResourceException : System.SystemException { public MissingManifestResourceException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected MissingManifestResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingManifestResourceException(string? message) { } public MissingManifestResourceException(string? message, System.Exception? inner) { } @@ -11955,6 +12134,8 @@ public MissingManifestResourceException(string? message, System.Exception? inner public partial class MissingSatelliteAssemblyException : System.SystemException { public MissingSatelliteAssemblyException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingSatelliteAssemblyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingSatelliteAssemblyException(string? message) { } public MissingSatelliteAssemblyException(string? message, System.Exception? inner) { } @@ -12709,6 +12890,8 @@ public sealed partial class RuntimeWrappedException : System.Exception { public RuntimeWrappedException(object thrownObject) { } public object WrappedException { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)] @@ -12755,6 +12938,8 @@ public SwitchExpressionException(string? message) { } public SwitchExpressionException(string? message, System.Exception? innerException) { } public override string Message { get { throw null; } } public object? UnmatchedValue { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public readonly partial struct TaskAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion @@ -13005,6 +13190,8 @@ public void SetHandleAsInvalid() { } public partial class ExternalException : System.SystemException { public ExternalException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExternalException(string? message) { } public ExternalException(string? message, System.Exception? inner) { } @@ -13394,6 +13581,8 @@ public readonly partial struct SerializationEntry public partial class SerializationException : System.SystemException { public SerializationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SerializationException(string? message) { } public SerializationException(string? message, System.Exception? innerException) { } @@ -13733,6 +13922,8 @@ public void AddChild(System.Security.SecurityElement child) { } public partial class SecurityException : System.SystemException { public SecurityException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SecurityException(string? message) { } public SecurityException(string? message, System.Exception? inner) { } @@ -13748,6 +13939,8 @@ public SecurityException(string? message, System.Type? type, string? state) { } public object? PermitOnlySetInstance { get { throw null; } set { } } public string? RefusedSet { get { throw null; } set { } } public string? Url { get { throw null; } set { } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -13793,6 +13986,8 @@ public UnverifiableCodeAttribute() { } public partial class VerificationException : System.SystemException { public VerificationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VerificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VerificationException(string? message) { } public VerificationException(string? message, System.Exception? innerException) { } @@ -13804,6 +13999,8 @@ public partial class CryptographicException : System.SystemException { public CryptographicException() { } public CryptographicException(int hr) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicException(string? message) { } public CryptographicException(string? message, System.Exception? inner) { } @@ -14728,6 +14925,8 @@ public static partial class TaskAsyncEnumerableExtensions public partial class TaskCanceledException : System.OperationCanceledException { public TaskCanceledException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskCanceledException(string? message) { } public TaskCanceledException(string? message, System.Exception? innerException) { } @@ -14954,6 +15153,8 @@ public partial class TaskSchedulerException : System.Exception { public TaskSchedulerException() { } public TaskSchedulerException(System.Exception? innerException) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskSchedulerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskSchedulerException(string? message) { } public TaskSchedulerException(string? message, System.Exception? innerException) { } @@ -15194,6 +15395,8 @@ public partial class Uri : System.Runtime.Serialization.ISerializable public static readonly string UriSchemeTelnet; public static readonly string UriSchemeWs; public static readonly string UriSchemeWss; + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uriString) { } [System.ObsoleteAttribute("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(string) instead.")] @@ -15340,6 +15543,8 @@ public enum UriFormat public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable { public UriFormatException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public UriFormatException(string? textString) { } public UriFormatException(string? textString, System.Exception? e) { } diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs index 54edec6fe4570a..28d127fe1f1869 100644 --- a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs +++ b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs @@ -444,6 +444,8 @@ public PrivilegeNotHeldException() { } public PrivilegeNotHeldException(string? privilege) { } public PrivilegeNotHeldException(string? privilege, System.Exception? inner) { } public string? PrivilegeName { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } [System.FlagsAttribute] diff --git a/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj b/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj index 35fabc2416c000..90b30c498da536 100644 --- a/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj +++ b/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj @@ -24,6 +24,8 @@ + diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/PrivilegeNotHeldException.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/PrivilegeNotHeldException.cs index dab91343bdd7bc..b501fc7a3c7e97 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/PrivilegeNotHeldException.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/PrivilegeNotHeldException.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Globalization; using System.Runtime.Serialization; @@ -9,7 +10,7 @@ namespace System.Security.AccessControl { [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public sealed class PrivilegeNotHeldException : UnauthorizedAccessException, ISerializable + public sealed class PrivilegeNotHeldException : UnauthorizedAccessException { private readonly string? _privilegeName; @@ -30,11 +31,14 @@ public PrivilegeNotHeldException(string? privilege, Exception? inner) _privilegeName = privilege; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] private PrivilegeNotHeldException(SerializationInfo info, StreamingContext context) : base(info, context) { _privilegeName = info.GetString(nameof(PrivilegeName)); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs index 60066df503fc99..ed5bb8e5ac1a2a 100644 --- a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs +++ b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs @@ -41,7 +41,11 @@ public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType) { } public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType, string? nameType, string? roleType) { } public ClaimsIdentity(System.IO.BinaryReader reader) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected ClaimsIdentity(System.Security.Claims.ClaimsIdentity other) { } public ClaimsIdentity(System.Security.Principal.IIdentity? identity) { } @@ -80,6 +84,8 @@ public partial class ClaimsPrincipal : System.Security.Principal.IPrincipal public ClaimsPrincipal() { } public ClaimsPrincipal(System.Collections.Generic.IEnumerable identities) { } public ClaimsPrincipal(System.IO.BinaryReader reader) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsPrincipal(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ClaimsPrincipal(System.Security.Principal.IIdentity identity) { } public ClaimsPrincipal(System.Security.Principal.IPrincipal principal) { } diff --git a/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj b/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj index 33c7635be6086b..f7f1be10a3687d 100644 --- a/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj +++ b/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj @@ -10,6 +10,7 @@ + diff --git a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs index 282c8fe08250ca..9733ca86ff10b9 100644 --- a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs +++ b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.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.IO; using System.Runtime.Serialization; using System.Security.Principal; @@ -229,6 +230,8 @@ protected ClaimsIdentity(ClaimsIdentity other) SafeAddClaims(other._instanceClaims); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ClaimsIdentity(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); @@ -242,6 +245,8 @@ protected ClaimsIdentity(SerializationInfo info, StreamingContext context) /// The to read from. /// /// Thrown is the is null. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ClaimsIdentity(SerializationInfo info) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs index f13d91a6b2e27a..a423bfa4ce4712 100644 --- a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs +++ b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.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.IO; using System.Runtime.Serialization; using System.Security.Principal; @@ -44,6 +45,8 @@ private enum SerializationMask }; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected ClaimsPrincipal(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj index bb9788b511908b..4e3b5e4f5201dc 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj +++ b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj @@ -133,6 +133,8 @@ System.Security.Cryptography.Xml.XmlLicenseTransform + diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoSignedXmlRecursionException.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoSignedXmlRecursionException.cs index 907a494e7cd2f7..773341fe2f5c75 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoSignedXmlRecursionException.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoSignedXmlRecursionException.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.Runtime.Serialization; using System.Xml; @@ -19,6 +20,10 @@ public class CryptoSignedXmlRecursionException : XmlException public CryptoSignedXmlRecursionException() : base() { } public CryptoSignedXmlRecursionException(string message) : base(message) { } public CryptoSignedXmlRecursionException(string message, Exception inner) : base(message, inner) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected CryptoSignedXmlRecursionException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } 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 8b9691bf9e6dd4..5f48790a3d29dd 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs @@ -542,6 +542,8 @@ public static void ZeroMemory(System.Span buffer) { } public partial class CryptographicUnexpectedOperationException : System.Security.Cryptography.CryptographicException { public CryptographicUnexpectedOperationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicUnexpectedOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicUnexpectedOperationException(string? message) { } public CryptographicUnexpectedOperationException(string? message, System.Exception? inner) { } @@ -2749,6 +2751,8 @@ public X509Certificate(byte[] rawData, string? password) { } public X509Certificate(byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate(System.IntPtr handle) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public X509Certificate(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate(System.Security.Cryptography.X509Certificates.X509Certificate cert) { } @@ -2846,6 +2850,8 @@ public X509Certificate2(System.IntPtr handle) { } public X509Certificate2(System.ReadOnlySpan rawData) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate2(System.ReadOnlySpan rawData, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected X509Certificate2(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate2(System.Security.Cryptography.X509Certificates.X509Certificate certificate) { } diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptographicUnexpectedOperationException.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptographicUnexpectedOperationException.cs index 8c442b922e03a3..508b39fbcf6034 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptographicUnexpectedOperationException.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptographicUnexpectedOperationException.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.Globalization; using System.Runtime.Serialization; @@ -30,6 +31,8 @@ public CryptographicUnexpectedOperationException(string format, string? insert) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected CryptographicUnexpectedOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs index 59a82d473dc575..30640e705e6b6e 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs @@ -3,6 +3,7 @@ using Internal.Cryptography; using Microsoft.Win32.SafeHandles; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -208,6 +209,8 @@ public X509Certificate(X509Certificate cert) } #pragma warning disable SYSLIB0026 + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public X509Certificate(SerializationInfo info, StreamingContext context) : this() #pragma warning restore SYSLIB0026 { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs index b2855084370f44..650bea6130be9d 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.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.Formats.Asn1; using System.IO; @@ -168,6 +169,8 @@ public X509Certificate2(X509Certificate certificate) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected X509Certificate2(SerializationInfo info, StreamingContext context) : base(info, context) { 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 9f6048c4b3e091..e9d86a2085d97c 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -676,6 +676,10 @@ public static void RevertPermitOnly() { } public partial class HostProtectionException : System.SystemException { public HostProtectionException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected HostProtectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public HostProtectionException(string message) { } public HostProtectionException(string message, System.Exception e) { } @@ -2057,6 +2061,10 @@ public Hash(System.Reflection.Assembly assembly) { } public static System.Security.Policy.Hash CreateSHA1(byte[] sha1) { throw null; } public static System.Security.Policy.Hash CreateSHA256(byte[] sha256) { throw null; } public byte[] GenerateHash(System.Security.Cryptography.HashAlgorithm hashAlg) { throw null; } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } } @@ -2123,6 +2131,10 @@ public PermissionRequestEvidence(System.Security.PermissionSet request, System.S public partial class PolicyException : System.SystemException { public PolicyException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected PolicyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PolicyException(string message) { } public PolicyException(string message, System.Exception exception) { } diff --git a/src/libraries/System.Security.Permissions/src/System/ApplicationIdentity.cs b/src/libraries/System.Security.Permissions/src/System/ApplicationIdentity.cs index ab86933db6c310..56d7de00ed6eff 100644 --- a/src/libraries/System.Security.Permissions/src/System/ApplicationIdentity.cs +++ b/src/libraries/System.Security.Permissions/src/System/ApplicationIdentity.cs @@ -10,11 +10,6 @@ public sealed class ApplicationIdentity : ISerializable { private ApplicationIdentity() { } public ApplicationIdentity(string applicationIdentityFullName) { } - private ApplicationIdentity(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - public string FullName { get { return null; } } public string CodeBase { get { return null; } } public override string ToString() { return null; } 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 fe7cd369cf470d..b93a00a2a8e59b 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/HostProtectionException.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.Runtime.Serialization; using System.Security.Permissions; using System.Text; @@ -47,6 +48,10 @@ public HostProtectionException(string message, HostProtectionResource protectedR DemandedResources = demandedResources; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected HostProtectionException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -80,6 +85,10 @@ public override string ToString() return sb.ToString(); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs index d6df6bd611c49e..2db87c89e08dbd 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.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.Security.Cryptography; using System.Runtime.Serialization; @@ -16,6 +17,10 @@ public Hash(System.Reflection.Assembly assembly) { } public static Hash CreateSHA1(byte[] sha1) { return default(Hash); } public static Hash CreateSHA256(byte[] sha256) { return default(Hash); } public byte[] GenerateHash(HashAlgorithm hashAlg) { return null; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyException.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyException.cs index 4aa294e642d004..0c80cbc66509b9 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyException.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/PolicyException.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.Runtime.Serialization; namespace System.Security.Policy @@ -10,6 +11,10 @@ namespace System.Security.Policy public partial class PolicyException : System.SystemException { public PolicyException() { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected PolicyException(SerializationInfo info, StreamingContext context) : base(info, context) { } public PolicyException(string message) : base(message) { } public PolicyException(string message, Exception exception) : base(message, exception) { } diff --git a/src/libraries/System.Security.Permissions/src/System/Security/XmlSyntaxException.cs b/src/libraries/System.Security.Permissions/src/System/Security/XmlSyntaxException.cs index fc92711a1ab58f..b942716638c78f 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/XmlSyntaxException.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/XmlSyntaxException.cs @@ -14,6 +14,9 @@ public XmlSyntaxException(int lineNumber) { } public XmlSyntaxException(int lineNumber, string message) { } public XmlSyntaxException(string message) { } public XmlSyntaxException(string message, Exception inner) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private XmlSyntaxException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } diff --git a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs index 36dfeefbb7e156..e12c56007ee583 100644 --- a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs +++ b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs @@ -23,6 +23,8 @@ public IdentityNotMappedException() { } public IdentityNotMappedException(string? message) { } public IdentityNotMappedException(string? message, System.Exception? inner) { } public System.Security.Principal.IdentityReferenceCollection UnmappedIdentities { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public abstract partial class IdentityReference @@ -236,6 +238,8 @@ public WindowsIdentity(System.IntPtr userToken) { } public WindowsIdentity(System.IntPtr userToken, string type) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public WindowsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected WindowsIdentity(System.Security.Principal.WindowsIdentity identity) { } public WindowsIdentity(string sUserPrincipalName) { } diff --git a/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj b/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj index a67d4af63ebe44..9bc4bee276e996 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj +++ b/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj @@ -24,6 +24,8 @@ + + Link="Common\Interop\Windows\WinMm\Interop.waveOutRestart.cs" /> + 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 12426171d3f1eb..b7920a677193c8 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -142,6 +142,10 @@ public void Reset() { } public partial class JsonException : System.Exception { public JsonException() { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public JsonException(string? message) { } public JsonException(string? message, System.Exception? innerException) { } @@ -151,6 +155,10 @@ public JsonException(string? message, string? path, long? lineNumber, long? byte public long? LineNumber { get { throw null; } } public override string Message { get { throw null; } } public string? Path { get { throw null; } } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class JsonNamingPolicy diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs index 75b23332f4a86a..d3301362fcc1a8 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.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.Runtime.Serialization; namespace System.Text.Json @@ -84,6 +85,10 @@ public JsonException() : base() { } /// /// Thrown when is . /// +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context) { LineNumber = (long?)info.GetValue("LineNumber", typeof(long?)); @@ -102,6 +107,10 @@ protected JsonException(SerializationInfo info, StreamingContext context) : base /// /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs index 3c42977d383c1c..a50c91c9452913 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs @@ -13,6 +13,9 @@ public JsonReaderException(string message, long lineNumber, long bytePositionInL { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private JsonReaderException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj index 20c35068fbc757..8899c55f958798 100644 --- a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj +++ b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj @@ -27,6 +27,7 @@ + diff --git a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs index 29cd116d641b26..f0762289ca5339 100644 --- a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs +++ b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs @@ -142,6 +142,8 @@ public partial class Regex : System.Runtime.Serialization.ISerializable protected internal string? pattern; protected internal System.Text.RegularExpressions.RegexOptions roptions; protected Regex() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Regex(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Regex([System.Diagnostics.CodeAnalysis.StringSyntax(System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex)] string pattern) { } public Regex([System.Diagnostics.CodeAnalysis.StringSyntax(System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex, "options")] string pattern, System.Text.RegularExpressions.RegexOptions options) { } @@ -264,6 +266,8 @@ public GeneratedRegexAttribute([System.Diagnostics.CodeAnalysis.StringSyntax(Sys public partial class RegexMatchTimeoutException : System.TimeoutException, System.Runtime.Serialization.ISerializable { public RegexMatchTimeoutException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RegexMatchTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RegexMatchTimeoutException(string message) { } public RegexMatchTimeoutException(string message, System.Exception inner) { } @@ -328,6 +332,8 @@ public sealed partial class RegexParseException : System.ArgumentException private RegexParseException() { } public System.Text.RegularExpressions.RegexParseError Error { get { throw null; } } public int Offset { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class RegexRunner diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs index 6516af531e2a6f..d41516f57bde6c 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -169,6 +170,8 @@ protected internal static void ValidateMatchTimeout(TimeSpan matchTimeout) } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected Regex(SerializationInfo info, StreamingContext context) => throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexMatchTimeoutException.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexMatchTimeoutException.cs index 1dcd7efab3605c..aac7f3420da9ab 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexMatchTimeoutException.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexMatchTimeoutException.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.Runtime.Serialization; namespace System.Text.RegularExpressions @@ -50,6 +51,8 @@ public RegexMatchTimeoutException(string message) : base(message) { } /// The exception that is the cause of the current exception, or a null. public RegexMatchTimeoutException(string message, Exception inner) : base(message, inner) { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected RegexMatchTimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -58,6 +61,7 @@ protected RegexMatchTimeoutException(SerializationInfo info, StreamingContext co MatchTimeout = new TimeSpan(info.GetInt64("timeoutTicks")); } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseException.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseException.cs index 38808caac811fe..fad385a183aaca 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseException.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseException.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.Runtime.Serialization; namespace System.Text.RegularExpressions @@ -23,18 +24,18 @@ sealed class RegexParseException : ArgumentException /// Gets the zero-based character offset in the regular expression pattern where the parse error occurs. public int Offset { get; } + // No need for a serialization ctor: we swap the active type during serialization. + internal RegexParseException(RegexParseError error, int offset, string message) : base(message) { Error = error; Offset = offset; } - private RegexParseException(SerializationInfo info, StreamingContext context) - { - // It means someone modified the payload. - throw new NotImplementedException(); - } - +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); diff --git a/src/libraries/System.Text.RegularExpressions/tests/UnitTests/System.Text.RegularExpressions.Unit.Tests.csproj b/src/libraries/System.Text.RegularExpressions/tests/UnitTests/System.Text.RegularExpressions.Unit.Tests.csproj index 25c3668059d99b..a3d8e3a172dc7a 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/UnitTests/System.Text.RegularExpressions.Unit.Tests.csproj +++ b/src/libraries/System.Text.RegularExpressions/tests/UnitTests/System.Text.RegularExpressions.Unit.Tests.csproj @@ -22,6 +22,7 @@ + diff --git a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs index c090e57d0ded47..0cee3ad97ad542 100644 --- a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs @@ -8,6 +8,10 @@ namespace System.Threading.Channels { public partial class ChannelClosedException : System.InvalidOperationException { +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected ChannelClosedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class ChannelReader diff --git a/src/libraries/System.Threading.Channels/src/System.Threading.Channels.csproj b/src/libraries/System.Threading.Channels/src/System.Threading.Channels.csproj index 4fa5540d270690..64804032bc9e45 100644 --- a/src/libraries/System.Threading.Channels/src/System.Threading.Channels.csproj +++ b/src/libraries/System.Threading.Channels/src/System.Threading.Channels.csproj @@ -45,6 +45,8 @@ System.Threading.Channel<T> Link="Common\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs" /> + diff --git a/src/libraries/System.Threading.Channels/src/System/Threading/Channels/ChannelClosedException.netcoreapp.cs b/src/libraries/System.Threading.Channels/src/System/Threading/Channels/ChannelClosedException.netcoreapp.cs index 8c439e2f420fb4..f3e3c31338c698 100644 --- a/src/libraries/System.Threading.Channels/src/System/Threading/Channels/ChannelClosedException.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/src/System/Threading/Channels/ChannelClosedException.netcoreapp.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.Runtime.Serialization; namespace System.Threading.Channels @@ -12,6 +13,10 @@ public partial class ChannelClosedException : InvalidOperationException /// Initializes a new instance of the class with serialized data. /// The object that holds the serialized object data. /// The contextual information about the source or destination. +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected ChannelClosedException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs index d764627ce63651..567abdfa135805 100644 --- a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs +++ b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs @@ -26,6 +26,8 @@ internal CompressedStack() { } public static System.Threading.CompressedStack Capture() { throw null; } public System.Threading.CompressedStack CreateCopy() { throw null; } public static System.Threading.CompressedStack GetCompressedStack() { throw null; } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void Run(System.Threading.CompressedStack compressedStack, System.Threading.ContextCallback callback, object? state) { } } @@ -161,6 +163,8 @@ public ThreadExceptionEventArgs(System.Exception t) { } public partial class ThreadInterruptedException : System.SystemException { public ThreadInterruptedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadInterruptedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadInterruptedException(string? message) { } public ThreadInterruptedException(string? message, System.Exception? innerException) { } @@ -195,6 +199,8 @@ public enum ThreadState public partial class ThreadStateException : System.SystemException { public ThreadStateException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadStateException(string? message) { } public ThreadStateException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.Threading/ref/System.Threading.cs b/src/libraries/System.Threading/ref/System.Threading.cs index 2963a3ad970c4b..7421be76c7db64 100644 --- a/src/libraries/System.Threading/ref/System.Threading.cs +++ b/src/libraries/System.Threading/ref/System.Threading.cs @@ -39,6 +39,8 @@ public partial class BarrierPostPhaseException : System.Exception { public BarrierPostPhaseException() { } public BarrierPostPhaseException(System.Exception? innerException) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BarrierPostPhaseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BarrierPostPhaseException(string? message) { } public BarrierPostPhaseException(string? message, System.Exception? innerException) { } @@ -130,6 +132,8 @@ public partial class AbandonedMutexException : System.SystemException { public AbandonedMutexException() { } public AbandonedMutexException(int location, System.Threading.WaitHandle? handle) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AbandonedMutexException(string? message) { } public AbandonedMutexException(string? message, System.Exception? inner) { } @@ -194,6 +198,8 @@ internal ExecutionContext() { } public static System.Threading.ExecutionContext? Capture() { throw null; } public System.Threading.ExecutionContext CreateCopy() { throw null; } public void Dispose() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsFlowSuppressed() { throw null; } public static void Restore(System.Threading.ExecutionContext executionContext) { } @@ -280,6 +286,8 @@ public static partial class LazyInitializer public partial class LockRecursionException : System.Exception { public LockRecursionException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LockRecursionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LockRecursionException(string? message) { } public LockRecursionException(string? message, System.Exception? innerException) { } @@ -398,6 +406,8 @@ public Semaphore(int initialCount, int maximumCount, string? name) { } public partial class SemaphoreFullException : System.SystemException { public SemaphoreFullException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SemaphoreFullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SemaphoreFullException(string? message) { } public SemaphoreFullException(string? message, System.Exception? innerException) { } @@ -478,6 +488,8 @@ protected void SetWaitNotificationRequired() { } public partial class SynchronizationLockException : System.SystemException { public SynchronizationLockException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SynchronizationLockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SynchronizationLockException(string? message) { } public SynchronizationLockException(string? message, System.Exception? innerException) { } @@ -542,6 +554,8 @@ public static void Write([System.Diagnostics.CodeAnalysis.NotNullIfNotNullAtt public partial class WaitHandleCannotBeOpenedException : System.ApplicationException { public WaitHandleCannotBeOpenedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WaitHandleCannotBeOpenedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WaitHandleCannotBeOpenedException(string? message) { } public WaitHandleCannotBeOpenedException(string? message, System.Exception? innerException) { } diff --git a/src/libraries/System.Threading/src/System.Threading.csproj b/src/libraries/System.Threading/src/System.Threading.csproj index 929c5cbcca9dcb..1996fdb878272e 100644 --- a/src/libraries/System.Threading/src/System.Threading.csproj +++ b/src/libraries/System.Threading/src/System.Threading.csproj @@ -15,6 +15,8 @@ + diff --git a/src/libraries/System.Threading/src/System/Threading/Barrier.cs b/src/libraries/System.Threading/src/System/Threading/Barrier.cs index 496d3c5e6fdafe..e5633da1ee19aa 100644 --- a/src/libraries/System.Threading/src/System/Threading/Barrier.cs +++ b/src/libraries/System.Threading/src/System/Threading/Barrier.cs @@ -10,6 +10,7 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.ComponentModel; using System.Diagnostics; using System.Runtime.Serialization; using System.Runtime.Versioning; @@ -65,6 +66,8 @@ public BarrierPostPhaseException(string? message, Exception? innerException) /// /// The object that holds the serialized object data. /// The contextual information about the source or destination. + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected BarrierPostPhaseException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs b/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs index 49a092ceed5332..3248f45eb505e7 100644 --- a/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs +++ b/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs @@ -1134,6 +1134,7 @@ public ReaderWriterLockApplicationException(int errorHResult, string message) HResult = errorHResult; } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] public ReaderWriterLockApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs index 99e82f525ee689..1bd231a8bbbb9b 100644 --- a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs +++ b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs @@ -144,6 +144,8 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TransactionAbortedException : System.Transactions.TransactionException { public TransactionAbortedException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionAbortedException(string? message) { } public TransactionAbortedException(string? message, System.Exception? innerException) { } @@ -157,6 +159,8 @@ public TransactionEventArgs() { } public partial class TransactionException : System.SystemException { public TransactionException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionException(string? message) { } public TransactionException(string? message, System.Exception? innerException) { } @@ -164,6 +168,8 @@ public TransactionException(string? message, System.Exception? innerException) { public partial class TransactionInDoubtException : System.Transactions.TransactionException { public TransactionInDoubtException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionInDoubtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionInDoubtException(string? message) { } public TransactionInDoubtException(string? message, System.Exception? innerException) { } @@ -201,6 +207,8 @@ public static void RecoveryComplete(System.Guid resourceManagerIdentifier) { } public partial class TransactionManagerCommunicationException : System.Transactions.TransactionException { public TransactionManagerCommunicationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionManagerCommunicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionManagerCommunicationException(string? message) { } public TransactionManagerCommunicationException(string? message, System.Exception? innerException) { } @@ -219,6 +227,8 @@ public partial struct TransactionOptions : System.IEquatable + diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionException.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionException.cs index 1e5b49146b1963..cb850655b69b04 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionException.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionException.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.Runtime.Serialization; using System.Transactions.Configuration; @@ -88,6 +89,8 @@ public TransactionException(string? message, Exception? innerException) : base(m /// /// /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TransactionException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -211,6 +214,8 @@ internal TransactionAbortedException(Exception? innerException, Guid distributed /// /// /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TransactionAbortedException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -272,6 +277,8 @@ public TransactionInDoubtException(string? message, Exception? innerException) : /// /// /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TransactionInDoubtException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -332,6 +339,8 @@ public TransactionManagerCommunicationException( /// /// /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TransactionManagerCommunicationException(SerializationInfo info, StreamingContext context) : base(info, context) { } @@ -370,6 +379,8 @@ public TransactionPromotionException(string? message, Exception? innerException) /// /// /// + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] protected TransactionPromotionException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs b/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs index c1f732f2baad40..b5f5dee6993db6 100644 --- a/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs +++ b/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs @@ -11,6 +11,10 @@ public partial class SoundPlayer : System.ComponentModel.Component, System.Runti { public SoundPlayer() { } public SoundPlayer(System.IO.Stream? stream) { } +#if NET8_0_OR_GREATER + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] +#endif protected SoundPlayer(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) { } public SoundPlayer(string soundLocation) { } public bool IsLoadCompleted { get { throw null; } } diff --git a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj index c2c574b9edda6d..d976d96e14caac 100644 --- a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj +++ b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj @@ -83,6 +83,8 @@ System.Security.Cryptography.X509Certificates.X509SelectionFlag + diff --git a/src/libraries/System.Windows.Extensions/src/System/Media/SoundPlayer.cs b/src/libraries/System.Windows.Extensions/src/System/Media/SoundPlayer.cs index 3d5b536895c1e1..6e39549fd0d604 100644 --- a/src/libraries/System.Windows.Extensions/src/System/Media/SoundPlayer.cs +++ b/src/libraries/System.Windows.Extensions/src/System/Media/SoundPlayer.cs @@ -61,6 +61,10 @@ public SoundPlayer(Stream? stream) : this() _stream = stream; } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif protected SoundPlayer(SerializationInfo serializationInfo, StreamingContext context) { throw new PlatformNotSupportedException(); 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 126e319d3d446d..d5ac9b2bbbcbe2 100644 --- a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -471,6 +471,8 @@ public override void WriteTo(System.Xml.XmlWriter w) { } public partial class XmlException : System.SystemException { public XmlException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlException(string? message) { } public XmlException(string? message, System.Exception? innerException) { } @@ -479,6 +481,8 @@ public XmlException(string? message, System.Exception? innerException, int lineN public int LinePosition { get { throw null; } } public override string Message { get { throw null; } } public string? SourceUri { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class XmlImplementation @@ -1869,6 +1873,8 @@ public XmlSchemaEnumerationFacet() { } public partial class XmlSchemaException : System.SystemException { public XmlSchemaException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaException(string? message) { } public XmlSchemaException(string? message, System.Exception? innerException) { } @@ -1878,6 +1884,8 @@ public XmlSchemaException(string? message, System.Exception? innerException, int public override string Message { get { throw null; } } public System.Xml.Schema.XmlSchemaObject? SourceSchemaObject { get { throw null; } } public string? SourceUri { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class XmlSchemaExternal : System.Xml.Schema.XmlSchemaObject @@ -1982,10 +1990,14 @@ public enum InferenceOption public partial class XmlSchemaInferenceException : System.Xml.Schema.XmlSchemaException { public XmlSchemaInferenceException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaInferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaInferenceException(string message) { } public XmlSchemaInferenceException(string message, System.Exception? innerException) { } public XmlSchemaInferenceException(string message, System.Exception? innerException, int lineNumber, int linePosition) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class XmlSchemaInfo : System.Xml.Schema.IXmlSchemaInfo @@ -2322,11 +2334,15 @@ public enum XmlSchemaUse public partial class XmlSchemaValidationException : System.Xml.Schema.XmlSchemaException { public XmlSchemaValidationException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaValidationException(string? message) { } public XmlSchemaValidationException(string? message, System.Exception? innerException) { } public XmlSchemaValidationException(string? message, System.Exception? innerException, int lineNumber, int linePosition) { } public object? SourceObject { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected internal void SetSourceObject(object? sourceObject) { } } @@ -2841,9 +2857,13 @@ public partial class XsltCompileException : System.Xml.Xsl.XsltException { public XsltCompileException() { } public XsltCompileException(System.Exception inner, string sourceUri, int lineNumber, int linePosition) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XsltCompileException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XsltCompileException(string message) { } public XsltCompileException(string message, System.Exception innerException) { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class XsltContext : System.Xml.XmlNamespaceManager @@ -2859,6 +2879,8 @@ protected XsltContext(System.Xml.NameTable table) : base (default(System.Xml.Xml public partial class XsltException : System.SystemException { public XsltException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XsltException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XsltException(string message) { } public XsltException(string message, System.Exception? innerException) { } @@ -2866,6 +2888,8 @@ public XsltException(string message, System.Exception? innerException) { } public virtual int LinePosition { get { throw null; } } public override string Message { get { throw null; } } public virtual string? SourceUri { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public abstract partial class XsltMessageEncounteredEventArgs : System.EventArgs diff --git a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs index e36e9430e28e15..777c7ac72a188b 100644 --- a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs +++ b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs @@ -19,10 +19,14 @@ public XPathDocument(System.Xml.XmlReader reader, System.Xml.XmlSpace space) { } public partial class XPathException : System.SystemException { public XPathException() { } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XPathException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XPathException(string? message) { } public XPathException(string? message, System.Exception? innerException) { } public override string Message { get { throw null; } } + [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } } diff --git a/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs index a801b8772ca440..d9f04d3059e51a 100644 --- a/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs +++ b/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.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.Serialization; @@ -24,6 +25,8 @@ protected MulticastDelegate([DynamicallyAccessedMembers(DynamicallyAccessedMembe { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new SerializationException(SR.Serialization_DelegatesNotSupported); diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs index 9b2c1d7bd2e7ab..b28bcb0cf7d916 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs @@ -1,13 +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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; namespace System { - [Serializable] public struct RuntimeFieldHandle : IEquatable, ISerializable { private readonly IntPtr value; @@ -17,11 +17,8 @@ internal RuntimeFieldHandle(IntPtr v) value = v; } - private RuntimeFieldHandle(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs index 4280686a3c4f67..ad6341620d35f8 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.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.Reflection; using System.Runtime.Serialization; using System.Runtime.CompilerServices; @@ -8,7 +9,6 @@ namespace System { - [Serializable] public struct RuntimeMethodHandle : IEquatable, ISerializable { private readonly IntPtr value; @@ -18,13 +18,10 @@ internal RuntimeMethodHandle(IntPtr v) value = v; } - private RuntimeMethodHandle(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - public IntPtr Value => value; + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs index 3e69be66ea9694..6754ba616073aa 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs @@ -31,6 +31,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.Serialization; @@ -39,7 +40,6 @@ namespace System { - [Serializable] public struct RuntimeTypeHandle : IEquatable, ISerializable { private readonly IntPtr value; @@ -54,11 +54,6 @@ internal RuntimeTypeHandle(RuntimeType type) { } - private RuntimeTypeHandle(SerializationInfo info, StreamingContext context) - { - throw new PlatformNotSupportedException(); - } - public IntPtr Value { get @@ -67,6 +62,8 @@ public IntPtr Value } } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); From 13e3ca746a875bf4a495fabdcea1f5ab27f5989d Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Tue, 4 Apr 2023 11:39:48 -0700 Subject: [PATCH 3/7] De-conflict with new JSON obsoletion codes - Also improve obsoletion messages --- Directory.Build.props | 2 +- docs/project/list-of-diagnostics.md | 4 +- .../src/System/Exception.CoreCLR.cs | 4 +- .../Reflection/RuntimeCustomAttributeData.cs | 16 +- .../Runtime/FieldInfos/RuntimeFieldInfo.cs | 4 +- .../Runtime/TypeInfos/RuntimeArrayTypeInfo.cs | 4 +- .../Runtime/TypeInfos/RuntimeNamedTypeInfo.cs | 4 +- .../Common/src/System/Obsoletions.cs | 8 +- src/libraries/Common/tests/System/MockType.cs | 2 +- .../Microsoft.CSharp/ref/Microsoft.CSharp.cs | 4 +- .../ref/Microsoft.VisualBasic.Core.cs | 4 +- .../FileIO/MalformedLineException.vb | 4 +- .../ref/Microsoft.Win32.Primitives.cs | 4 +- .../ref/System.Collections.Specialized.cs | 10 +- .../ref/System.Collections.cs | 14 +- .../ref/System.ComponentModel.Annotations.cs | 2 +- .../ref/System.ComponentModel.Composition.cs | 8 +- .../ref/System.ComponentModel.Primitives.cs | 4 +- .../System.ComponentModel.TypeConverter.cs | 10 +- ...stem.Configuration.ConfigurationManager.cs | 22 +- .../ref/System.Data.Common.cs | 50 ++-- .../src/System/Data/DataSet.cs | 8 +- .../System.Data.Odbc/ref/System.Data.Odbc.cs | 2 +- .../ref/System.Data.OleDb.cs | 2 +- .../ref/System.Diagnostics.EventLog.cs | 12 +- .../ref/System.Diagnostics.Tracing.cs | 2 +- ...tem.DirectoryServices.AccountManagement.cs | 18 +- .../ref/System.DirectoryServices.Protocols.cs | 14 +- .../ref/System.DirectoryServices.cs | 26 +- .../ref/System.Formats.Asn1.cs | 2 +- .../ref/System.Formats.Cbor.cs | 2 +- .../ref/System.IO.FileSystem.DriveInfo.cs | 2 +- .../ref/System.IO.FileSystem.Watcher.cs | 2 +- .../ref/System.IO.IsolatedStorage.cs | 2 +- .../ref/System.IO.Packaging.Serialization.cs | 4 +- .../ref/System.Management.cs | 12 +- .../ref/System.Net.HttpListener.cs | 2 +- .../System.Net.Mail/ref/System.Net.Mail.cs | 12 +- .../ref/System.Net.NetworkInformation.cs | 2 +- .../System.Net.Ping/ref/System.Net.Ping.cs | 2 +- .../ref/System.Net.Primitives.cs | 6 +- .../ref/System.Net.Requests.cs | 8 +- .../ref/System.Net.Security.cs | 6 +- .../ref/System.Net.WebHeaderCollection.cs | 4 +- .../ref/System.Net.WebProxy.cs | 2 +- .../ref/System.Net.WebSockets.cs | 2 +- ....Private.CoreLib.ManualShimTypeForwards.cs | 6 +- .../src/System/DBNull.cs | 4 +- .../src/System/Reflection/ParameterInfo.cs | 4 +- .../Serialization/SerializationInfo.cs | 2 +- .../Runtime/Serialization/StreamingContext.cs | 2 +- .../src/System/Type.Helpers.cs | 4 +- .../Serialization/ClassDataContract.cs | 16 +- .../Serialization/CollectionDataContract.cs | 16 +- .../Runtime/Serialization/DataContract.cs | 8 +- .../Runtime/Serialization/DataContractSet.cs | 4 +- .../Runtime/Serialization/EnumDataContract.cs | 4 +- .../System/Runtime/Serialization/Globals.cs | 4 +- ...lObjectSerializerReadContextComplexJson.cs | 4 +- ...ObjectSerializerWriteContextComplexJson.cs | 8 +- .../Runtime/Serialization/ReflectionReader.cs | 4 +- .../Serialization/XmlObjectSerializer.cs | 4 +- .../XmlObjectSerializerContext.cs | 4 +- .../XmlObjectSerializerReadContext.cs | 8 +- .../XmlObjectSerializerWriteContext.cs | 8 +- .../Context/Delegation/DelegatingType.cs | 2 +- .../ref/System.Reflection.Metadata.Manual.cs | 2 +- .../TypeLoading/Types/RoArrayType.cs | 4 +- .../ref/System.Runtime.InteropServices.cs | 16 +- .../Directory.Build.props | 2 +- ...System.Runtime.Serialization.Formatters.cs | 24 +- ...System.Runtime.Serialization.Primitives.cs | 2 +- .../tests/SerializationTypes.RuntimeOnly.cs | 4 +- .../System.Runtime/ref/System.Runtime.cs | 238 +++++++++--------- .../ref/System.Security.AccessControl.cs | 2 +- .../ref/System.Security.Claims.cs | 6 +- .../ref/System.Security.Cryptography.cs | 6 +- .../ref/System.Security.Permissions.cs | 6 +- .../ref/System.Security.Principal.Windows.cs | 4 +- ...System.ServiceProcess.ServiceController.cs | 2 +- .../src/Result/RecognitionResult.cs | 8 +- .../System.Text.Json/ref/System.Text.Json.cs | 4 +- .../ref/System.Text.RegularExpressions.cs | 6 +- .../System.Threading.Channels.netcoreapp.cs | 2 +- .../ref/System.Threading.Thread.cs | 6 +- .../System.Threading/ref/System.Threading.cs | 14 +- .../ref/System.Transactions.Local.cs | 10 +- .../Transactions/Oletx/OletxTransaction.cs | 8 +- .../ref/System.Windows.Extensions.cs | 2 +- .../ref/System.Xml.ReaderWriter.cs | 24 +- .../System.Xml.XPath/ref/System.Xml.XPath.cs | 4 +- .../src/System/Reflection/CustomAttribute.cs | 16 +- .../Emit/RuntimeFieldBuilder.Mono.cs | 4 +- .../Emit/RuntimeTypeBuilder.Mono.cs | 4 +- .../src/System/Reflection/FieldInfo.Mono.cs | 16 +- 95 files changed, 451 insertions(+), 451 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index d82c6edce3d51d..9eed16db80980e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -442,7 +442,7 @@ - $(NoWarn);SYSLIB0011;SYSLIB0049;SYSLIB0050 + $(NoWarn);SYSLIB0011;SYSLIB0050;SYSLIB0051 $(NoWarn);IL2121 diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index dc804bd629a902..6aa97a59d4fa93 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -104,8 +104,8 @@ The PR that reveals the implementation of the ` CustomAttributes } FieldAttributes attributes = Attributes; -#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete if (0 != (attributes & FieldAttributes.NotSerialized)) { yield return new RuntimePseudoCustomAttributeData(typeof(NonSerializedAttribute), null); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs index e873c11c59196f..0a1c928ebaae2b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs @@ -41,9 +41,9 @@ public sealed override int GetArrayRank() protected sealed override TypeAttributes GetAttributeFlagsImpl() { TypeAttributes attrs = TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed; -#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete attrs |= TypeAttributes.Serializable; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 return attrs; } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs index c3b6fbeabed0e8..988085b047c3fb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs @@ -42,10 +42,10 @@ public sealed override IEnumerable CustomAttributes if (0 != (attributes & TypeAttributes.Import)) yield return new RuntimePseudoCustomAttributeData(typeof(ComImportAttribute), null); -#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete if (0 != (attributes & TypeAttributes.Serializable)) yield return new RuntimePseudoCustomAttributeData(typeof(SerializableAttribute), null); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } } diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index 3c2dbea734e3a8..e079cf164be750 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -160,10 +160,10 @@ internal static class Obsoletions internal const string JsonSerializerOptionsAddContextMessage = "JsonSerializerOptions.AddContext is obsolete. To register a JsonSerializerContext, use either the TypeInfoResolver or TypeInfoResolverChain properties."; internal const string JsonSerializerOptionsAddContextDiagId = "SYSLIB0049"; - internal const string LegacyFormatterMessage = "Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."; - internal const string LegacyFormatterDiagId = "SYSLIB0049"; + internal const string LegacyFormatterMessage = "Legacy formatter-based serialization is obsolete and should not be used."; + internal const string LegacyFormatterDiagId = "SYSLIB0050"; - internal const string LegacyFormatterImplMessage = "Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."; - internal const string LegacyFormatterImplDiagId = "SYSLIB0050"; + internal const string LegacyFormatterImplMessage = "This API supports legacy formatter-based serialization. It should not be called or extended by application code."; + internal const string LegacyFormatterImplDiagId = "SYSLIB0051"; } } diff --git a/src/libraries/Common/tests/System/MockType.cs b/src/libraries/Common/tests/System/MockType.cs index 4a5f04b0777361..dce84eff89c2b8 100644 --- a/src/libraries/Common/tests/System/MockType.cs +++ b/src/libraries/Common/tests/System/MockType.cs @@ -87,7 +87,7 @@ internal class MockType : Type public override bool IsSecuritySafeCritical => throw Unexpected; public override bool IsSecurityTransparent => throw Unexpected; #if NET8_0_OR_GREATER - [Obsolete("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [Obsolete("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public override bool IsSerializable => throw Unexpected; public override bool IsSubclassOf(Type c) => throw Unexpected; diff --git a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs index cec38b6335c2a9..0614a447e3fb0a 100644 --- a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs +++ b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs @@ -68,7 +68,7 @@ public enum CSharpBinderFlags public partial class RuntimeBinderException : System.Exception { public RuntimeBinderException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RuntimeBinderException(string? message) { } @@ -77,7 +77,7 @@ public RuntimeBinderException(string? message, System.Exception? innerException) public partial class RuntimeBinderInternalCompilerException : System.Exception { public RuntimeBinderInternalCompilerException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeBinderInternalCompilerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RuntimeBinderInternalCompilerException(string? message) { } diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index e3fe236484c4f0..99e6a9689236ec 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -1296,7 +1296,7 @@ public static void WriteAllText(string file, string text, bool append, System.Te public partial class MalformedLineException : System.Exception { public MalformedLineException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MalformedLineException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MalformedLineException(string? message) { } @@ -1305,7 +1305,7 @@ public MalformedLineException(string? message, long lineNumber) { } public MalformedLineException(string? message, long lineNumber, System.Exception? innerException) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Always)] public long LineNumber { get { throw null; } set { } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb index c505146937b28a..faba3158df0fd7 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb @@ -74,7 +74,7 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] - + Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) @@ -108,7 +108,7 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] - + Public Overrides Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) If info IsNot Nothing Then ' Fix FxCop violation ValidateArgumentsOfPublicMethods. diff --git a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs index d83e5c1374707b..2e5dad984adc4f 100644 --- a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs +++ b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs @@ -11,13 +11,13 @@ public partial class Win32Exception : System.Runtime.InteropServices.ExternalExc public Win32Exception() { } public Win32Exception(int error) { } public Win32Exception(int error, string? message) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Win32Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Win32Exception(string? message) { } public Win32Exception(string? message, System.Exception? innerException) { } public int NativeErrorCode { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } diff --git a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs index 1d03416e5fc839..e7434e5a361440 100644 --- a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs +++ b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs @@ -96,7 +96,7 @@ protected NameObjectCollectionBase(int capacity) { } protected NameObjectCollectionBase(int capacity, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use NameObjectCollectionBase(Int32, IEqualityComparer) instead.")] protected NameObjectCollectionBase(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameObjectCollectionBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual int Count { get { throw null; } } @@ -118,7 +118,7 @@ protected void BaseRemoveAt(int index) { } protected void BaseSet(int index, object? value) { } protected void BaseSet(string? name, object? value) { } public virtual System.Collections.IEnumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -147,7 +147,7 @@ public NameValueCollection(int capacity, System.Collections.IEqualityComparer? e [System.ObsoleteAttribute("This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.")] public NameValueCollection(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } public NameValueCollection(int capacity, System.Collections.Specialized.NameValueCollection col) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual string?[] AllKeys { get { throw null; } } @@ -173,7 +173,7 @@ public OrderedDictionary() { } public OrderedDictionary(System.Collections.IEqualityComparer? comparer) { } public OrderedDictionary(int capacity) { } public OrderedDictionary(int capacity, System.Collections.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OrderedDictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } @@ -191,7 +191,7 @@ public void Clear() { } public bool Contains(object key) { throw null; } public void CopyTo(System.Array array, int index) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Insert(int index, object key, object? value) { } diff --git a/src/libraries/System.Collections/ref/System.Collections.cs b/src/libraries/System.Collections/ref/System.Collections.cs index 20c1bb23cd7f4d..bbaf50bfac0eb2 100644 --- a/src/libraries/System.Collections/ref/System.Collections.cs +++ b/src/libraries/System.Collections/ref/System.Collections.cs @@ -57,7 +57,7 @@ public partial class LinkedList : System.Collections.Generic.ICollection, { public LinkedList() { } public LinkedList(System.Collections.Generic.IEnumerable collection) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } @@ -80,7 +80,7 @@ public void CopyTo(T[] array, int index) { } public System.Collections.Generic.LinkedListNode? Find(T value) { throw null; } public System.Collections.Generic.LinkedListNode? FindLast(T value) { throw null; } public System.Collections.Generic.LinkedList.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -317,7 +317,7 @@ public SortedSet() { } public SortedSet(System.Collections.Generic.IComparer? comparer) { } public SortedSet(System.Collections.Generic.IEnumerable collection) { } public SortedSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IComparer Comparer { get { throw null; } } @@ -441,7 +441,7 @@ public Dictionary(System.Collections.Generic.IEnumerable? comparer) { } public Dictionary(int capacity) { } public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } @@ -467,7 +467,7 @@ public void Clear() { } public bool ContainsValue(TValue value) { throw null; } public int EnsureCapacity(int capacity) { throw null; } public System.Collections.Generic.Dictionary.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -576,7 +576,7 @@ public HashSet(System.Collections.Generic.IEnumerable collection, System.Coll public HashSet(System.Collections.Generic.IEqualityComparer? comparer) { } public HashSet(int capacity) { } public HashSet(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } @@ -592,7 +592,7 @@ public void CopyTo(T[] array, int arrayIndex, int count) { } public int EnsureCapacity(int capacity) { throw null; } public void ExceptWith(System.Collections.Generic.IEnumerable other) { } public System.Collections.Generic.HashSet.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void IntersectWith(System.Collections.Generic.IEnumerable other) { } diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index a1fb41bf584e85..f8fdfda390c220 100644 --- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -360,7 +360,7 @@ public partial class ValidationException : System.Exception { public ValidationException() { } public ValidationException(System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute? validatingAttribute, object? value) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ValidationException(string? message) { } diff --git a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs index 51b7bb732b4c7c..8cc1d010219d74 100644 --- a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs +++ b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs @@ -56,7 +56,7 @@ public partial class CompositionContractMismatchException : System.Exception { public CompositionContractMismatchException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected CompositionContractMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -146,7 +146,7 @@ public partial class ImportCardinalityMismatchException : System.Exception { public ImportCardinalityMismatchException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ImportCardinalityMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -544,7 +544,7 @@ public partial class ComposablePartException : System.Exception { public ComposablePartException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ComposablePartException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -554,7 +554,7 @@ public ComposablePartException(string? message, System.ComponentModel.Compositio public ComposablePartException(string? message, System.Exception? innerException) { } public System.ComponentModel.Composition.Primitives.ICompositionElement? Element { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs index babb2efda26ef1..031f558ab0e9a9 100644 --- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs +++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs @@ -221,7 +221,7 @@ public InitializationEventAttribute(string eventName) { } public partial class InvalidAsynchronousStateException : System.ArgumentException { public InvalidAsynchronousStateException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidAsynchronousStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidAsynchronousStateException(string? message) { } @@ -230,7 +230,7 @@ public InvalidAsynchronousStateException(string? message, System.Exception? inne public partial class InvalidEnumArgumentException : System.ArgumentException { public InvalidEnumArgumentException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidEnumArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidEnumArgumentException(string? message) { } 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 78c4aebd94e472..c95e8743ef05d0 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -721,7 +721,7 @@ public virtual void SetSavedLicenseKey(System.Type type, string key) { } } public partial class LicenseException : System.SystemException { - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LicenseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LicenseException(System.Type? type) { } @@ -729,7 +729,7 @@ public LicenseException(System.Type? type, object? instance) { } public LicenseException(System.Type? type, object? instance, string? message) { } public LicenseException(System.Type? type, object? instance, string? message, System.Exception? innerException) { } public System.Type? LicensedType { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1585,7 +1585,7 @@ public VersionConverter() { } public partial class WarningException : System.SystemException { public WarningException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WarningException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WarningException(string? message) { } @@ -1594,7 +1594,7 @@ public WarningException(string? message, string? helpUrl) { } public WarningException(string? message, string? helpUrl, string? helpTopic) { } public string? HelpTopic { get { throw null; } } public string? HelpUrl { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1612,7 +1612,7 @@ public partial class CheckoutException : System.Runtime.InteropServices.External { public static readonly System.ComponentModel.Design.CheckoutException Canceled; public CheckoutException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CheckoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CheckoutException(string? message) { } diff --git a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs index d04341b7261add..f4fb98eff74358 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs @@ -269,7 +269,7 @@ public partial class ConfigurationErrorsException : System.Configuration.Configu { public ConfigurationErrorsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ConfigurationErrorsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -291,7 +291,7 @@ public ConfigurationErrorsException(string message, System.Xml.XmlReader reader) public static int GetLineNumber(System.Xml.XmlNode node) { throw null; } public static int GetLineNumber(System.Xml.XmlReader reader) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -301,7 +301,7 @@ public partial class ConfigurationException : System.SystemException [System.ObsoleteAttribute("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException instead.")] public ConfigurationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -322,7 +322,7 @@ public ConfigurationException(string message, System.Xml.XmlNode node) { } public virtual int Line { get { throw null; } } public override string Message { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -472,7 +472,7 @@ public void CopyTo(System.Configuration.ConfigurationSection[] array, int index) public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -508,7 +508,7 @@ public void CopyTo(System.Configuration.ConfigurationSectionGroup[] array, int i public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -889,7 +889,7 @@ internal PropertyInformationCollection() { } public void CopyTo(System.Configuration.PropertyInformation[] array, int index) { } public override System.Collections.IEnumerator GetEnumerator() { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1175,7 +1175,7 @@ public partial class SettingsPropertyIsReadOnlyException : System.Exception { public SettingsPropertyIsReadOnlyException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyIsReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1186,7 +1186,7 @@ public partial class SettingsPropertyNotFoundException : System.Exception { public SettingsPropertyNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1223,7 +1223,7 @@ public partial class SettingsPropertyWrongTypeException : System.Exception { public SettingsPropertyWrongTypeException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyWrongTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1612,7 +1612,7 @@ public partial class ProviderException : System.Exception { public ProviderException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ProviderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs index e8da2f171b2e20..df2e40a3628976 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -88,7 +88,7 @@ public void RemoveAt(int index) { } public partial class ConstraintException : System.Data.DataException { public ConstraintException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ConstraintException(string? s) { } @@ -196,7 +196,7 @@ public void RemoveAt(int index) { } public partial class DataException : System.SystemException { public DataException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataException(string? s) { } @@ -498,12 +498,12 @@ public partial class DataSet : System.ComponentModel.MarshalByValueComponent, Sy public DataSet() { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, bool ConstructSchema) { } public DataSet(string dataSetName) { } @@ -556,7 +556,7 @@ public void EndInit() { } public System.Data.DataSet? GetChanges() { throw null; } public System.Data.DataSet? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Xml.Schema.XmlSchema? GetSchemaSerializable() { throw null; } @@ -690,7 +690,7 @@ public partial class DataTable : System.ComponentModel.MarshalByValueComponent, protected internal bool fInitInProgress; public DataTable() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataTable(string? tableName) { } @@ -766,7 +766,7 @@ public void EndLoadData() { } public System.Data.DataTable? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataTableSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } public System.Data.DataRow[] GetErrors() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Type GetRowType() { throw null; } @@ -1180,7 +1180,7 @@ public DBConcurrencyException(string? message, System.Exception? inner, System.D public int RowCount { get { throw null; } } public void CopyToRows(System.Data.DataRow[] array) { } public void CopyToRows(System.Data.DataRow[] array, int arrayIndex) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1217,7 +1217,7 @@ public enum DbType public partial class DeletedRowInaccessibleException : System.Data.DataException { public DeletedRowInaccessibleException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DeletedRowInaccessibleException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DeletedRowInaccessibleException(string? s) { } @@ -1226,7 +1226,7 @@ public DeletedRowInaccessibleException(string? message, System.Exception? innerE public partial class DuplicateNameException : System.Data.DataException { public DuplicateNameException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateNameException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateNameException(string? s) { } @@ -1260,7 +1260,7 @@ internal EnumerableRowCollection() { } public partial class EvaluateException : System.Data.InvalidExpressionException { public EvaluateException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EvaluateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EvaluateException(string? s) { } @@ -1443,7 +1443,7 @@ public partial interface IDbTransaction : System.IDisposable public partial class InRowChangingEventException : System.Data.DataException { public InRowChangingEventException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InRowChangingEventException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InRowChangingEventException(string? s) { } @@ -1467,7 +1467,7 @@ public virtual void CopyTo(System.Array ar, int index) { } public partial class InvalidConstraintException : System.Data.DataException { public InvalidConstraintException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidConstraintException(string? s) { } @@ -1476,7 +1476,7 @@ public InvalidConstraintException(string? message, System.Exception? innerExcept public partial class InvalidExpressionException : System.Data.DataException { public InvalidExpressionException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidExpressionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidExpressionException(string? s) { } @@ -1541,7 +1541,7 @@ public enum MissingMappingAction public partial class MissingPrimaryKeyException : System.Data.DataException { public MissingPrimaryKeyException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingPrimaryKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingPrimaryKeyException(string? s) { } @@ -1557,7 +1557,7 @@ public enum MissingSchemaAction public partial class NoNullAllowedException : System.Data.DataException { public NoNullAllowedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NoNullAllowedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NoNullAllowedException(string? s) { } @@ -1577,7 +1577,7 @@ public enum ParameterDirection public partial class PropertyCollection : System.Collections.Hashtable, System.ICloneable { public PropertyCollection() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override object Clone() { throw null; } @@ -1585,7 +1585,7 @@ protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info public partial class ReadOnlyException : System.Data.DataException { public ReadOnlyException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ReadOnlyException(string? s) { } @@ -1594,7 +1594,7 @@ public ReadOnlyException(string? message, System.Exception? innerException) { } public partial class RowNotInTableException : System.Data.DataException { public RowNotInTableException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RowNotInTableException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RowNotInTableException(string? s) { } @@ -1681,7 +1681,7 @@ public enum StatementType public partial class StrongTypingException : System.Data.DataException { public StrongTypingException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongTypingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongTypingException(string? message) { } @@ -1690,7 +1690,7 @@ public StrongTypingException(string? s, System.Exception? innerException) { } public partial class SyntaxErrorException : System.Data.InvalidExpressionException { public SyntaxErrorException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SyntaxErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SyntaxErrorException(string? s) { } @@ -1711,7 +1711,7 @@ public abstract partial class TypedTableBase : System.Data.DataTable, System. { protected TypedTableBase() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Data.EnumerableRowCollection Cast() { throw null; } @@ -1757,7 +1757,7 @@ public enum UpdateStatus public partial class VersionNotFoundException : System.Data.DataException { public VersionNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VersionNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VersionNotFoundException(string? s) { } @@ -2496,7 +2496,7 @@ public void Reset() { } public abstract partial class DbException : System.Runtime.InteropServices.ExternalException { protected DbException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DbException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected DbException(string? message) { } @@ -3779,7 +3779,7 @@ public SqlTruncateException(string? message, System.Exception? e) { } public partial class SqlTypeException : System.SystemException { public SqlTypeException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SqlTypeException(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext sc) { } public SqlTypeException(string? message) { } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs index effbbd5268fcdc..50759ea83a9616 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -346,10 +346,10 @@ private void SerializeDataSet(SerializationInfo info, StreamingContext context, { MemoryStream memStream = new MemoryStream(); #pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter -#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete +#pragma warning disable SYSLIB0050 // StreamingContext ctor is obsolete BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); bf.Serialize(memStream, Tables[i]); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 #pragma warning restore SYSLIB0011 memStream.Position = 0; info.AddValue(string.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", i), memStream.GetBuffer()); @@ -430,10 +430,10 @@ private void DeserializeDataSetSchema(SerializationInfo info, StreamingContext c MemoryStream memStream = new MemoryStream(buffer); memStream.Position = 0; #pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter -#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete +#pragma warning disable SYSLIB0050 // StreamingContext ctor is obsolete BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false)); DataTable dt = (DataTable)bf.Deserialize(memStream); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 #pragma warning restore SYSLIB0011 Tables.Add(dt); } diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs index e40a7d7a73d255..a58ceb180e3bd6 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs @@ -222,7 +222,7 @@ internal OdbcException() { } public System.Data.Odbc.OdbcErrorCollection Errors { get { throw null; } } public override string Source { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } 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 63ff8a4b8bf9ba..95e9dfcc662a9b 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -260,7 +260,7 @@ internal OleDbException() { } [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)] public System.Data.OleDb.OleDbErrorCollection Errors { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs index 3593b77ffef9c8..a35f0f8314ecee 100644 --- a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs +++ b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs @@ -228,7 +228,7 @@ public partial class EventLogException : System.Exception public EventLogException() { } protected EventLogException(int errorCode) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -236,7 +236,7 @@ public EventLogException(string message) { } public EventLogException(string message, System.Exception innerException) { } public override string Message { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -257,7 +257,7 @@ public partial class EventLogInvalidDataException : System.Diagnostics.Eventing. { public EventLogInvalidDataException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogInvalidDataException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -287,7 +287,7 @@ public partial class EventLogNotFoundException : System.Diagnostics.Eventing.Rea { public EventLogNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogNotFoundException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -304,7 +304,7 @@ public partial class EventLogProviderDisabledException : System.Diagnostics.Even { public EventLogProviderDisabledException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogProviderDisabledException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -340,7 +340,7 @@ public partial class EventLogReadingException : System.Diagnostics.Eventing.Read { public EventLogReadingException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogReadingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs index 5815a29e1ce9d2..88f6c7565f21f2 100644 --- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs +++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs @@ -239,7 +239,7 @@ public EventSourceCreatedEventArgs() { } public partial class EventSourceException : System.Exception { public EventSourceException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EventSourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EventSourceException(string? message) { } 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 07b59f7cfe1377..93a46965d882a5 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs @@ -152,7 +152,7 @@ public partial class MultipleMatchesException : System.DirectoryServices.Account { public MultipleMatchesException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected MultipleMatchesException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -163,7 +163,7 @@ public partial class NoMatchingPrincipalException : System.DirectoryServices.Acc { public NoMatchingPrincipalException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected NoMatchingPrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -174,7 +174,7 @@ public partial class PasswordException : System.DirectoryServices.AccountManagem { public PasswordException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PasswordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -277,7 +277,7 @@ public abstract partial class PrincipalException : System.SystemException { private protected PrincipalException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -286,7 +286,7 @@ public partial class PrincipalExistsException : System.DirectoryServices.Account { public PrincipalExistsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context){ } @@ -297,7 +297,7 @@ public partial class PrincipalOperationException : System.DirectoryServices.Acco { public PrincipalOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -307,7 +307,7 @@ public PrincipalOperationException(string message, System.Exception innerExcepti public PrincipalOperationException(string message, int errorCode) { } public int ErrorCode { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -335,7 +335,7 @@ public partial class PrincipalServerDownException : System.DirectoryServices.Acc { public PrincipalServerDownException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } @@ -345,7 +345,7 @@ public PrincipalServerDownException(string message, System.Exception innerExcept public PrincipalServerDownException(string message, System.Exception innerException, int errorCode, string serverName) { } public PrincipalServerDownException(string message, int errorCode) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs index 54fc132396a063..e56aef2cdfb279 100644 --- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs +++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs @@ -47,7 +47,7 @@ public partial class BerConversionException : System.DirectoryServices.Protocols { public BerConversionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected BerConversionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -195,7 +195,7 @@ public partial class DirectoryException : System.Exception { public DirectoryException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -221,7 +221,7 @@ public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryR public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -229,7 +229,7 @@ public DirectoryOperationException(string message) { } public DirectoryOperationException(string message, System.Exception inner) { } public System.DirectoryServices.Protocols.DirectoryResponse Response { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -362,7 +362,7 @@ public LdapException(int errorCode, string message) { } public LdapException(int errorCode, string message, System.Exception inner) { } public LdapException(int errorCode, string message, string serverErrorMessage) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected LdapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -372,7 +372,7 @@ public LdapException(string message, System.Exception inner) { } public System.DirectoryServices.Protocols.PartialResultsCollection PartialResults { get { throw null; } } public string ServerErrorMessage { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -710,7 +710,7 @@ public TlsOperationException(System.DirectoryServices.Protocols.DirectoryRespons public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected TlsOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs index 2cbebbdc0a68a9..9fa9c578479677 100644 --- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs +++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs @@ -256,7 +256,7 @@ public partial class DirectoryServicesCOMException : System.Runtime.InteropServi { public DirectoryServicesCOMException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryServicesCOMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -265,7 +265,7 @@ public DirectoryServicesCOMException(string? message, System.Exception? inner) { public int ExtendedError { get { throw null; } } public string? ExtendedErrorMessage { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -540,7 +540,7 @@ public partial class ActiveDirectoryObjectExistsException : System.Exception { public ActiveDirectoryObjectExistsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryObjectExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -551,7 +551,7 @@ public partial class ActiveDirectoryObjectNotFoundException : System.Exception, { public ActiveDirectoryObjectNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryObjectNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -561,7 +561,7 @@ public ActiveDirectoryObjectNotFoundException(string? message, System.Type? type public string? Name { get { throw null; } } public System.Type? Type { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -570,7 +570,7 @@ public partial class ActiveDirectoryOperationException : System.Exception, Syste { public ActiveDirectoryOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -580,7 +580,7 @@ public ActiveDirectoryOperationException(string? message, System.Exception? inne public ActiveDirectoryOperationException(string? message, int errorCode) { } public int ErrorCode { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -744,7 +744,7 @@ public partial class ActiveDirectoryServerDownException : System.Exception, Syst { public ActiveDirectoryServerDownException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -756,7 +756,7 @@ public ActiveDirectoryServerDownException(string? message, int errorCode, string public override string Message { get { throw null; } } public string? Name { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -1312,7 +1312,7 @@ public partial class ForestTrustCollisionException : System.DirectoryServices.Ac { public ForestTrustCollisionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ForestTrustCollisionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1321,7 +1321,7 @@ public ForestTrustCollisionException(string? message, System.Exception? inner) { public ForestTrustCollisionException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? collisions) { } public System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? Collisions { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -1704,7 +1704,7 @@ public partial class SyncFromAllServersOperationException : System.DirectoryServ { public SyncFromAllServersOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SyncFromAllServersOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1713,7 +1713,7 @@ public SyncFromAllServersOperationException(string? message, System.Exception? i public SyncFromAllServersOperationException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[]? errors) { } public System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[] ErrorInformation { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs index 210d6635195cad..aec28e3a510f64 100644 --- a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs +++ b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs @@ -46,7 +46,7 @@ public partial class AsnContentException : System.Exception { public AsnContentException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected AsnContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs index b44d7aad9b700a..4218d52d773a88 100644 --- a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs +++ b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs @@ -16,7 +16,7 @@ public enum CborConformanceMode public partial class CborContentException : System.Exception { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected CborContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs index cf81b1a5f319c3..f46b20b48cd894 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs @@ -26,7 +26,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class DriveNotFoundException : System.IO.IOException { public DriveNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DriveNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DriveNotFoundException(string? message) { } diff --git a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs index 1824df48ab4026..74dbe9cb0da011 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs @@ -55,7 +55,7 @@ protected void OnRenamed(System.IO.RenamedEventArgs e) { } public partial class InternalBufferOverflowException : System.SystemException { public InternalBufferOverflowException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InternalBufferOverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InternalBufferOverflowException(string? message) { } diff --git a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs index 8740aafe07ed83..32aad838e3de3f 100644 --- a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs +++ b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs @@ -36,7 +36,7 @@ protected void InitStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, S public partial class IsolatedStorageException : System.Exception { public IsolatedStorageException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected IsolatedStorageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public IsolatedStorageException(string? message) { } diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs index 4680e78033e25c..653fffa33320ce 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs @@ -9,12 +9,12 @@ namespace System.IO public partial class FileFormatException : System.FormatException { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected FileFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Management/ref/System.Management.cs b/src/libraries/System.Management/ref/System.Management.cs index a6e92b38fe3ad7..4125691110d33e 100644 --- a/src/libraries/System.Management/ref/System.Management.cs +++ b/src/libraries/System.Management/ref/System.Management.cs @@ -137,7 +137,7 @@ public partial class ManagementBaseObject : System.ComponentModel.Component, Sys { private protected ManagementBaseObject() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementBaseObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -169,7 +169,7 @@ public ManagementClass(System.Management.ManagementPath path) { } public ManagementClass(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } public ManagementClass(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementClass(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -243,7 +243,7 @@ public partial class ManagementException : System.SystemException { public ManagementException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -252,7 +252,7 @@ public ManagementException(string message, System.Exception innerException) { } public System.Management.ManagementStatus ErrorCode { get { throw null; } } public System.Management.ManagementBaseObject ErrorInformation { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -261,7 +261,7 @@ public partial class ManagementNamedValueCollection : System.Collections.Special { public ManagementNamedValueCollection() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementNamedValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -278,7 +278,7 @@ public ManagementObject(System.Management.ManagementPath path) { } public ManagementObject(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } public ManagementObject(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } 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 6e99a7558089cb..3fcd77824a2fdb 100644 --- a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs +++ b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs @@ -55,7 +55,7 @@ public partial class HttpListenerException : System.ComponentModel.Win32Exceptio public HttpListenerException() { } public HttpListenerException(int errorCode) { } public HttpListenerException(int errorCode, string message) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HttpListenerException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } diff --git a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs index f2e8b8439f3c47..b36772c0e68956 100644 --- a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs +++ b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs @@ -214,13 +214,13 @@ public partial class SmtpException : System.Exception public SmtpException() { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode) { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode, string? message) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public SmtpException(string? message) { } public SmtpException(string? message, System.Exception? innerException) { } public System.Net.Mail.SmtpStatusCode StatusCode { get { throw null; } set { } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -229,28 +229,28 @@ public partial class SmtpFailedRecipientException : System.Net.Mail.SmtpExceptio public SmtpFailedRecipientException() { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient) { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient, string? serverResponse) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientException(string? message) { } public SmtpFailedRecipientException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientException(string? message, string? failedRecipient, System.Exception? innerException) { } public string? FailedRecipient { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class SmtpFailedRecipientsException : System.Net.Mail.SmtpFailedRecipientException { public SmtpFailedRecipientsException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientsException(string? message) { } public SmtpFailedRecipientsException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientsException(string? message, System.Net.Mail.SmtpFailedRecipientException[] innerExceptions) { } public System.Net.Mail.SmtpFailedRecipientException[] InnerExceptions { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } diff --git a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs index 7d234b8db0e7ca..9b6429128bf998 100644 --- a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs +++ b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs @@ -413,7 +413,7 @@ public partial class NetworkInformationException : System.ComponentModel.Win32Ex { public NetworkInformationException() { } public NetworkInformationException(int errorCode) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NetworkInformationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } diff --git a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs index cd0d091d9cd18f..52afbbd6997a6d 100644 --- a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs +++ b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs @@ -77,7 +77,7 @@ public partial class PingCompletedEventArgs : System.ComponentModel.AsyncComplet public delegate void PingCompletedEventHandler(object sender, System.Net.NetworkInformation.PingCompletedEventArgs e); public partial class PingException : System.InvalidOperationException { - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public PingException(string? message) { } diff --git a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs index b9cc5da0919e29..b1841b8e482725 100644 --- a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -89,10 +89,10 @@ public void SetCookies(System.Uri uri, string cookieHeader) { } public partial class CookieException : System.FormatException, System.Runtime.Serialization.ISerializable { public CookieException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -508,7 +508,7 @@ public partial class SocketException : System.ComponentModel.Win32Exception public SocketException() { } public SocketException(int errorCode) { } public SocketException(int errorCode, string? message) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } 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 8c4f7a4064a0d1..d001a673e07a6c 100644 --- a/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs +++ b/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs @@ -299,11 +299,11 @@ public partial interface IWebRequestCreate public partial class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public ProtocolViolationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ProtocolViolationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public ProtocolViolationException(string? message) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -311,7 +311,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class WebException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public WebException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebException(string? message) { } @@ -320,7 +320,7 @@ public WebException(string? message, System.Exception? innerException, System.Ne public WebException(string? message, System.Net.WebExceptionStatus status) { } public System.Net.WebResponse? Response { get { throw null; } } public System.Net.WebExceptionStatus Status { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Net.Security/ref/System.Net.Security.cs b/src/libraries/System.Net.Security/ref/System.Net.Security.cs index 41c3b13f1765e2..a0e2f011ea5527 100644 --- a/src/libraries/System.Net.Security/ref/System.Net.Security.cs +++ b/src/libraries/System.Net.Security/ref/System.Net.Security.cs @@ -674,7 +674,7 @@ namespace System.Security.Authentication public partial class AuthenticationException : System.SystemException { public AuthenticationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AuthenticationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public AuthenticationException(string? message) { } @@ -683,7 +683,7 @@ public AuthenticationException(string? message, System.Exception? innerException public partial class InvalidCredentialException : System.Security.Authentication.AuthenticationException { public InvalidCredentialException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCredentialException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public InvalidCredentialException(string? message) { } @@ -694,7 +694,7 @@ namespace System.Security.Authentication.ExtendedProtection { public partial class ExtendedProtectionPolicy : System.Runtime.Serialization.ISerializable { - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement) { } diff --git a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs index 028be87df1fecb..002b2c2bf522ef 100644 --- a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs +++ b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs @@ -86,7 +86,7 @@ public enum HttpResponseHeader public partial class WebHeaderCollection : System.Collections.Specialized.NameValueCollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable { public WebHeaderCollection() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[] AllKeys { get { throw null; } } @@ -104,7 +104,7 @@ public override void Clear() { } public override string? Get(string? name) { throw null; } public override System.Collections.IEnumerator GetEnumerator() { throw null; } public override string GetKey(int index) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[]? GetValues(int index) { throw null; } diff --git a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs index a681a7b309f455..634590620d4ee0 100644 --- a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs +++ b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs @@ -15,7 +15,7 @@ public partial interface IWebProxyScript public partial class WebProxy : System.Net.IWebProxy, System.Runtime.Serialization.ISerializable { public WebProxy() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebProxy(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebProxy(string? Address) { } diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs index 4c46e51dd299a3..58b25571e49972 100644 --- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs +++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs @@ -106,7 +106,7 @@ public WebSocketException(string? message) { } public WebSocketException(string? message, System.Exception? innerException) { } public override int ErrorCode { get { throw null; } } public System.Net.WebSockets.WebSocketError WebSocketErrorCode { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs index afb422f0b9d0fe..d2e003ecb78ccc 100644 --- a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs +++ b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs @@ -25,7 +25,7 @@ internal OrdinalComparer() { } public override int GetHashCode() { throw null; } public override int GetHashCode(string obj) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class UnitySerializationHolder : System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable { public UnitySerializationHolder(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -91,7 +91,7 @@ public GenericEqualityComparer() { } } public partial class NonRandomizedStringEqualityComparer : System.Collections.Generic.IEqualityComparer, System.Runtime.Serialization.ISerializable { - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NonRandomizedStringEqualityComparer(System.Runtime.Serialization.SerializationInfo information, System.Runtime.Serialization.StreamingContext context) { } public virtual bool Equals(string? x, string? y) { throw null; } @@ -142,7 +142,7 @@ public ContractException(System.Diagnostics.Contracts.ContractFailureKind kind, public string Failure { get { throw null; } } public System.Diagnostics.Contracts.ContractFailureKind Kind { get { throw null; } } public string? UserMessage { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs b/src/libraries/System.Private.CoreLib/src/System/DBNull.cs index f3691b4343a21a..efed247d28c7c8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DBNull.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DBNull.cs @@ -19,9 +19,9 @@ private DBNull() [EditorBrowsable(EditorBrowsableState.Never)] public void GetObjectData(SerializationInfo info, StreamingContext context) { -#pragma warning disable SYSLIB0049 // UnitySerializationHolder is obsolete +#pragma warning disable SYSLIB0050 // UnitySerializationHolder is obsolete UnitySerializationHolder.GetUnitySerializationInfo(info, UnitySerializationHolder.NullUnity); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } public override string ToString() diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs index fe72911e7c2635..6c93d8b7d01dc7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs @@ -8,11 +8,11 @@ namespace System.Reflection { public class ParameterInfo : ICustomAttributeProvider -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete #pragma warning disable SA1001 // CommasMustBeSpacedCorrectly , IObjectReference #pragma warning restore SA1001 -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { protected ParameterInfo() { } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs index c6cc0bbf433472..1be37a3474115d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; -#pragma warning disable SYSLIB0049 // The SerializationInfo type is part of the obsolete legacy serialization framework +#pragma warning disable SYSLIB0050 // The SerializationInfo type is part of the obsolete legacy serialization framework namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs index b8783c2c5a02b6..81c9f675bd1e93 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/StreamingContext.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; #pragma warning disable CA1066 // Implement IEquatable when overriding Object.Equals -#pragma warning disable SYSLIB0049 // The StreamingContext type is part of the obsolete legacy serialization framework +#pragma warning disable SYSLIB0050 // The StreamingContext type is part of the obsolete legacy serialization framework namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs b/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs index 69ebba18c9c8a8..0e435d60718a63 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs @@ -473,10 +473,10 @@ private static bool FilterAttributeImpl(MemberInfo m, object filterCriteria) return false; if (((criteria & FieldAttributes.Literal) != 0) && (attr & FieldAttributes.Literal) == 0) return false; -#pragma warning disable SYSLIB0049 // Legacy serialization infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete if (((criteria & FieldAttributes.NotSerialized) != 0) && (attr & FieldAttributes.NotSerialized) == 0) return false; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (((criteria & FieldAttributes.PinvokeImpl) != 0) && (attr & FieldAttributes.PinvokeImpl) == 0) return false; return true; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs index 922fb69663d416..aae72d1f3e1177 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs @@ -328,10 +328,10 @@ internal static bool IsNonAttributedTypeValidForSerialization( } } -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (type.IsSerializable) return false; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (Globals.TypeOfISerializable.IsAssignableFrom(type)) return false; @@ -637,10 +637,10 @@ internal ClassDataContractCriticalHelper([DynamicallyAccessedMembers(DataContrac { if (HasDataContract) throw new InvalidDataContractException(SR.Format(SR.ISerializableCannotHaveDataContract, DataContract.GetClrTypeFullName(type))); -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (baseType != null && !(baseType.IsSerializable && Globals.TypeOfISerializable.IsAssignableFrom(baseType))) baseType = null; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } IsValueType = type.IsValueType; if (baseType != null && baseType != Globals.TypeOfObject && baseType != Globals.TypeOfValueType && baseType != Globals.TypeOfUri) @@ -923,9 +923,9 @@ private void ImportDataMembers() { FieldInfo? field = member as FieldInfo; -#pragma warning disable SYSLIB0049 // Field.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // Field.IsNotSerialized is obsolete if (field != null && !field.IsNotSerialized) -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { DataMember memberContract = new DataMember(member); @@ -1050,9 +1050,9 @@ private void SetIsNonAttributedType( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.Interfaces)] Type type) { -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete _isNonAttributedType = !type.IsSerializable && !_hasDataContract && IsNonAttributedTypeValidForSerialization(type); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } private static bool IsMethodOverriding(MethodInfo method) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs index 049c3cabab9fe5..a9b1042a26d118 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs @@ -913,12 +913,12 @@ private static CreateGenericDictionaryEnumeratorDelegate BuildCreateGenericDicti { return this; } -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (type.IsSerializable || type.IsDefined(Globals.TypeOfDataContractAttribute, false)) { return new ClassDataContract(type); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 return null; } @@ -1025,9 +1025,9 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC && baseType != Globals.TypeOfValueType && baseType != Globals.TypeOfUri) ? IsCollection(baseType) : false; // Avoid creating an invalid collection contract for Serializable types since we can create a ClassDataContract instead -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete bool createContractWithException = isBaseTypeCollection && !type.IsSerializable; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (type.IsDefined(Globals.TypeOfDataContractAttribute, false)) { @@ -1109,13 +1109,13 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC // All collection types could be considered read-only collections except collection types that are marked [Serializable]. // Collection types marked [Serializable] cannot be read-only collections for backward compatibility reasons. // DataContract types and POCO types cannot be collection types, so they don't need to be factored in -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (type.IsSerializable) { return HandleIfInvalidCollection(type, tryCreate, hasCollectionDataContract, createContractWithException, SR.CollectionTypeDoesNotHaveDefaultCtor, null, ref dataContract); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 else { isReadOnlyContract = true; @@ -1173,13 +1173,13 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC // All collection types could be considered read-only collections except collection types that are marked [Serializable]. // Collection types marked [Serializable] cannot be read-only collections for backward compatibility reasons. // DataContract types and POCO types cannot be collection types, so they don't need to be factored in. -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (type.IsSerializable || skipIfReadOnlyContract) { return HandleIfInvalidCollection(type, tryCreate, hasCollectionDataContract, createContractWithException && !skipIfReadOnlyContract, SR.CollectionTypeDoesNotHaveAddMethod, DataContract.GetClrTypeFullName(itemType), ref dataContract); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 else { isReadOnlyContract = true; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs index f8e7fb4f02ceea..01a3a96eee7b78 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @@ -480,12 +480,12 @@ private static DataContract CreateDataContract(Type type) if (!CollectionDataContract.TryCreate(type, out dataContract)) { -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete if (!type.IsSerializable && !type.IsDefined(Globals.TypeOfDataContractAttribute, false) && !ClassDataContract.IsNonAttributedTypeValidForSerialization(type)) { ThrowInvalidDataContractException(SR.Format(SR.TypeNotSerializable, type), type); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 dataContract = new ClassDataContract(type); if (type != originalType) { @@ -1144,9 +1144,9 @@ internal static bool IsTypeSerializable(Type type) private static bool IsTypeSerializable(Type type, HashSet? previousCollectionTypes) { if ( -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete type.IsSerializable || -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 type.IsEnum || type.IsDefined(Globals.TypeOfDataContractAttribute, false) || type.IsInterface || diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs index 1c4f778c468198..58176b6dc52ccd 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs @@ -410,9 +410,9 @@ private static bool IsTypeReferenceable(Type type) try { return ( -#pragma warning disable SYSLIB0049 // Type.IsSerializable is obsolete +#pragma warning disable SYSLIB0050 // Type.IsSerializable is obsolete type.IsSerializable || -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 type.IsDefined(Globals.TypeOfDataContractAttribute, false) || (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) && !type.IsGenericTypeDefinition) || CollectionDataContract.IsCollection(type, out _) || diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs index 067ac54615583a..e8e6c3a6df94dd 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs @@ -253,7 +253,7 @@ private void ImportDataMembers() } else { -#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldInfo.IsNotSerialized is obsolete if (!field.IsNotSerialized) { DataMember memberContract = new DataMember(field) { Name = field.Name }; @@ -261,7 +261,7 @@ private void ImportDataMembers() ClassDataContract.CheckAndAddMember(tempMembers, memberContract, memberValuesTable); enumMemberValid = true; } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } if (enumMemberValid) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs index 5ef1c19a2e6ef1..7c1c65e2d97967 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs @@ -107,11 +107,11 @@ internal static partial class Globals internal static Type TypeOfIDeserializationCallback => s_typeOfIDeserializationCallback ??= typeof(IDeserializationCallback); -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete private static Type? s_typeOfIObjectReference; internal static Type TypeOfIObjectReference => s_typeOfIObjectReference ??= typeof(IObjectReference); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 private static Type? s_typeOfXmlFormatClassWriterDelegate; internal static Type TypeOfXmlFormatClassWriterDelegate => diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs index 6ddc0ba28c9bed..188c016fa81da0 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs @@ -19,9 +19,9 @@ internal sealed class XmlObjectSerializerReadContextComplexJson : XmlObjectSeria private readonly bool _useSimpleDictionaryFormat; internal XmlObjectSerializerReadContextComplexJson(DataContractJsonSerializer serializer, DataContract rootTypeDataContract) -#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete +#pragma warning disable SYSLIB0050 // StreamingContext ctor is obsolete : base(serializer, serializer.MaxItemsInObjectGraph, new StreamingContext(StreamingContextStates.All), serializer.IgnoreExtensionDataObject) -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { this.rootTypeDataContract = rootTypeDataContract; this.serializerKnownTypeList = serializer.knownTypeList; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs index 96a84fa410a07f..4f4b011193157f 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs @@ -25,9 +25,9 @@ internal static XmlObjectSerializerWriteContextComplexJson CreateContext(DataCon } internal XmlObjectSerializerWriteContextComplexJson(DataContractJsonSerializer serializer, DataContract rootTypeDataContract) -#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete +#pragma warning disable SYSLIB0050 // StreamingContext ctor is obsolete : base(serializer, serializer.MaxItemsInObjectGraph, new StreamingContext(StreamingContextStates.All), serializer.IgnoreExtensionDataObject) -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { _emitXsiType = serializer.EmitTypeInformation; this.rootTypeDataContract = rootTypeDataContract; @@ -331,7 +331,7 @@ internal static void VerifyObjectCompatibilityWithInterface(DataContract contrac } } -#pragma warning disable SYSLIB0049 // The legacy serialization infrastructure (including ISerializable & friends) is obsolete +#pragma warning disable SYSLIB0050 // The legacy serialization infrastructure (including ISerializable & friends) is obsolete [RequiresDynamicCode(DataContract.SerializerAOTWarning)] [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] internal void WriteJsonISerializable(XmlWriterDelegator xmlWriter, ISerializable obj) @@ -348,7 +348,7 @@ internal void WriteJsonISerializable(XmlWriterDelegator xmlWriter, ISerializable base.WriteSerializationInfo(xmlWriter, objType, serInfo); } } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 [return: NotNullIfNotNull(nameof(oldItemContract))] [RequiresDynamicCode(DataContract.SerializerAOTWarning)] diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs index dd9b5149a60ae4..f457a078c8c282 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs @@ -50,12 +50,12 @@ public object ReflectionReadClass(XmlReaderDelegator xmlReader, XmlObjectSeriali ReflectionReadMembers(xmlReader, context, memberNames, memberNamespaces, classContract, ref obj); } -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete if (obj is IObjectReference objectReference) { obj = context.GetRealObject(objectReference, context.GetObjectId()); } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 obj = ResolveAdapterObject(obj); InvokeDeserializationCallback(obj); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs index 4980d266cf6f63..778191ff35e67e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializer.cs @@ -470,9 +470,9 @@ internal static string GetTypeInfoError(string errorMessage, Type? type, Excepti return null; } -#pragma warning disable SYSLIB0049 // IFormatterConverter is obsolete +#pragma warning disable SYSLIB0050 // IFormatterConverter is obsolete private static IFormatterConverter? s_formatterConverter; internal static IFormatterConverter FormatterConverter => s_formatterConverter ??= new FormatterConverter(); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } } diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs index b7cd94e4033072..93c2c91e74d62e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs @@ -48,9 +48,9 @@ internal XmlObjectSerializerContext(XmlObjectSerializer serializer, int maxItems internal XmlObjectSerializerContext(DataContractSerializer serializer, DataContract rootTypeDataContract, DataContractResolver? dataContractResolver) : this(serializer, serializer.MaxItemsInObjectGraph, -#pragma warning disable SYSLIB0049 // StreamingContext ctor is obsolete +#pragma warning disable SYSLIB0050 // StreamingContext ctor is obsolete new StreamingContext(StreamingContextStates.All), -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 serializer.IgnoreExtensionDataObject, dataContractResolver ) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs index 1093433fe4f119..c8ff3273077f86 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs @@ -402,7 +402,7 @@ private object GetExistingObjectOrExtensionData(string id) return retObj; } -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete public object GetRealObject(IObjectReference obj, string id) { object? realObj = obj.GetRealObject(this.GetStreamingContext()); @@ -417,7 +417,7 @@ public object GetRealObject(IObjectReference obj, string id) ReplaceDeserializedObject(id, obj, realObj); return realObj; } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 [RequiresDynamicCode(DataContract.SerializerAOTWarning)] [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] @@ -542,9 +542,9 @@ internal void CheckEndOfArray(XmlReaderDelegator xmlReader, int arraySize, XmlDi [RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)] public SerializationInfo ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type) { -#pragma warning disable SYSLIB0049 // SerializationInfo ctor is obsolete +#pragma warning disable SYSLIB0050 // SerializationInfo ctor is obsolete var serInfo = new SerializationInfo(type, XmlObjectSerializer.FormatterConverter); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 XmlNodeType nodeType; while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs index d7d404737a7411..150209bfba79b4 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs @@ -505,9 +505,9 @@ private static void WriteIXmlSerializable(XmlWriterDelegator xmlWriter, object o [MethodImpl(MethodImplOptions.NoInlining)] internal static void GetObjectData(ISerializable obj, SerializationInfo serInfo, StreamingContext context) { -#pragma warning disable SYSLIB0049 // ISerializable.GetObjectData is obsolete +#pragma warning disable SYSLIB0050 // ISerializable.GetObjectData is obsolete obj.GetObjectData(serInfo, context); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 } [RequiresDynamicCode(DataContract.SerializerAOTWarning)] @@ -515,9 +515,9 @@ internal static void GetObjectData(ISerializable obj, SerializationInfo serInfo, public void WriteISerializable(XmlWriterDelegator xmlWriter, ISerializable obj) { Type objType = obj.GetType(); -#pragma warning disable SYSLIB0049 // SerializationInfo ctor is obsolete +#pragma warning disable SYSLIB0050 // SerializationInfo ctor is obsolete var serInfo = new SerializationInfo(objType, XmlObjectSerializer.FormatterConverter /*!UnsafeTypeForwardingEnabled is always false*/); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 GetObjectData(obj, serInfo, GetStreamingContext()); // (!UnsafeTypeForwardingEnabled) is always false diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs index 36cb18605b17c2..199be6227ddd52 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs @@ -110,7 +110,7 @@ public override bool IsSecurityTransparent } #if NET8_0_OR_GREATER - [Obsolete("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [Obsolete("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public override bool IsSerializable { diff --git a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs index 0f1aac7055dabc..d690057f4e5870 100644 --- a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs +++ b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs @@ -17,7 +17,7 @@ public readonly partial struct AssemblyReference public partial class ImageFormatLimitationException : System.Exception { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs index 76ee4027ecb90f..41de20bdda87b8 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoArrayType.cs @@ -66,9 +66,9 @@ internal sealed override IEnumerable ComputeDirectlyImplementedInterface CoreType.IReadOnlyListT, }; -#pragma warning disable SYSLIB0049 // TypeAttributes.Serialized flag is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serialized flag is obsolete protected sealed override TypeAttributes ComputeAttributeFlags() => TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 internal sealed override IEnumerable GetConstructorsCore(NameFilter? filter) { diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index d5ee8c8c8dffc8..c94f59d597dada 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -345,7 +345,7 @@ public DataMisalignedException(string? message, System.Exception? innerException public partial class DllNotFoundException : System.TypeLoadException { public DllNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DllNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DllNotFoundException(string? message) { } @@ -512,7 +512,7 @@ public static void Combine(object rcw, System.Guid iid, int dispid, System.Deleg public partial class COMException : System.Runtime.InteropServices.ExternalException { public COMException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected COMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public COMException(string? message) { } @@ -752,7 +752,7 @@ public InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType in public partial class InvalidComObjectException : System.SystemException { public InvalidComObjectException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidComObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidComObjectException(string? message) { } @@ -761,7 +761,7 @@ public InvalidComObjectException(string? message, System.Exception? inner) { } public partial class InvalidOleVariantTypeException : System.SystemException { public InvalidOleVariantTypeException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOleVariantTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOleVariantTypeException(string? message) { } @@ -1062,7 +1062,7 @@ public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanaged public partial class MarshalDirectiveException : System.SystemException { public MarshalDirectiveException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MarshalDirectiveException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MarshalDirectiveException(string? message) { } @@ -1403,7 +1403,7 @@ public ProgIdAttribute(string progId) { } public partial class SafeArrayRankMismatchException : System.SystemException { public SafeArrayRankMismatchException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayRankMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayRankMismatchException(string? message) { } @@ -1412,7 +1412,7 @@ public SafeArrayRankMismatchException(string? message, System.Exception? inner) public partial class SafeArrayTypeMismatchException : System.SystemException { public SafeArrayTypeMismatchException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayTypeMismatchException(string? message) { } @@ -1421,7 +1421,7 @@ public SafeArrayTypeMismatchException(string? message, System.Exception? inner) public partial class SEHException : System.Runtime.InteropServices.ExternalException { public SEHException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SEHException(string? message) { } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props index 6f77d0b27c47b4..96cb8776f64218 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props +++ b/src/libraries/System.Runtime.Serialization.Formatters/Directory.Build.props @@ -3,6 +3,6 @@ Microsoft - $(NoWarn);SYSLIB0011;SYSLIB0049;SYSLIB0050 + $(NoWarn);SYSLIB0011;SYSLIB0050;SYSLIB0051 \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs index 58a8938c47b335..fdbc190e50fb11 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs @@ -47,7 +47,7 @@ protected virtual void WriteMember(string memberName, object? data) { } protected abstract void WriteUInt64(ulong val, string name); protected abstract void WriteValueType(object obj, string name, System.Type memberType); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class FormatterConverter : System.Runtime.Serialization.IFormatterConverter { public FormatterConverter() { } @@ -73,7 +73,7 @@ public FormatterConverter() { } [System.CLSCompliantAttribute(false)] public ulong ToUInt64(object value) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static partial class FormatterServices { public static void CheckTypeSecurity(System.Type t, System.Runtime.Serialization.Formatters.TypeFilterLevel securityLevel) { } @@ -99,27 +99,27 @@ public partial interface IFormatter [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] void Serialize(System.IO.Stream serializationStream, object graph); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISerializationSurrogate { void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector? selector); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISurrogateSelector { void ChainSelector(System.Runtime.Serialization.ISurrogateSelector selector); System.Runtime.Serialization.ISurrogateSelector? GetNextSelector(); System.Runtime.Serialization.ISerializationSurrogate? GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectIDGenerator { public ObjectIDGenerator() { } public virtual long GetId(object obj, out bool firstTime) { throw null; } public virtual long HasId(object obj, out bool firstTime) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectManager { public ObjectManager(System.Runtime.Serialization.ISurrogateSelector? selector, System.Runtime.Serialization.StreamingContext context) { } @@ -148,7 +148,7 @@ protected SerializationBinder() { } public virtual void BindToName(System.Type serializedType, out string? assemblyName, out string? typeName) { throw null; } public abstract System.Type? BindToType(string assemblyName, string typeName); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SerializationObjectManager { public SerializationObjectManager(System.Runtime.Serialization.StreamingContext context) { } @@ -156,7 +156,7 @@ public void RaiseOnSerializedEvent() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("SerializationObjectManager is not trim compatible because the type of objects being managed cannot be statically discovered.")] public void RegisterObject(object obj) { } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector { public SurrogateSelector() { } @@ -169,26 +169,26 @@ public virtual void RemoveSurrogate(System.Type type, System.Runtime.Serializati } namespace System.Runtime.Serialization.Formatters { - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterAssemblyStyle { Simple = 0, Full = 1, } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterTypeStyle { TypesWhenNeeded = 0, TypesAlways = 1, XsdString = 2, } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFieldInfo { string[]? FieldNames { get; set; } System.Type[]? FieldTypes { get; set; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum TypeFilterLevel { Low = 2, diff --git a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs index 755409e61870db..c893e21b3b5da7 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs +++ b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs @@ -66,7 +66,7 @@ public IgnoreDataMemberAttribute() { } public partial class InvalidDataContractException : System.Exception { public InvalidDataContractException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidDataContractException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidDataContractException(string? message) { } diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs index f93692bac327ae..a62636e16d9879 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs @@ -4146,7 +4146,7 @@ public MyArgumentException(string message, string paramName) : base(message) } #if NET8_0_OR_GREATER - [Obsolete("Exception..ctor(SerializationInfo, StreamingContext) is obsolete.", DiagnosticId = "SYSLIB0050")] + [Obsolete("Exception..ctor(SerializationInfo, StreamingContext) is obsolete.", DiagnosticId = "SYSLIB0051")] #endif protected MyArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { _paramName = info.GetString("ParamName"); @@ -4165,7 +4165,7 @@ internal set } #if NET8_0_OR_GREATER - [Obsolete("Exception.GetObjectData is obsolete.", DiagnosticId = "SYSLIB0050")] + [Obsolete("Exception.GetObjectData is obsolete.", DiagnosticId = "SYSLIB0051")] #endif public override void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index c5b2c18b1f06e6..819f7d47c6fc04 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -46,7 +46,7 @@ namespace System public partial class AccessViolationException : System.SystemException { public AccessViolationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AccessViolationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AccessViolationException(string? message) { } @@ -96,7 +96,7 @@ public partial class AggregateException : System.Exception public AggregateException() { } public AggregateException(System.Collections.Generic.IEnumerable innerExceptions) { } public AggregateException(params System.Exception[] innerExceptions) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AggregateException(string? message) { } @@ -107,7 +107,7 @@ public AggregateException(string? message, params System.Exception[] innerExcept public override string Message { get { throw null; } } public System.AggregateException Flatten() { throw null; } public override System.Exception GetBaseException() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Handle(System.Func predicate) { } @@ -232,7 +232,7 @@ internal AppDomainSetup() { } public partial class AppDomainUnloadedException : System.SystemException { public AppDomainUnloadedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AppDomainUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AppDomainUnloadedException(string? message) { } @@ -241,7 +241,7 @@ public AppDomainUnloadedException(string? message, System.Exception? innerExcept public partial class ApplicationException : System.Exception { public ApplicationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ApplicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ApplicationException(string? message) { } @@ -279,7 +279,7 @@ public void End() { } public partial class ArgumentException : System.SystemException { public ArgumentException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentException(string? message) { } @@ -288,7 +288,7 @@ public ArgumentException(string? message, string? paramName) { } public ArgumentException(string? message, string? paramName, System.Exception? innerException) { } public override string Message { get { throw null; } } public virtual string? ParamName { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfNullOrEmpty([System.Diagnostics.CodeAnalysis.NotNullAttribute] string? argument, [System.Runtime.CompilerServices.CallerArgumentExpression("argument")] string? paramName = null) { throw null; } @@ -296,7 +296,7 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public partial class ArgumentNullException : System.ArgumentException { public ArgumentNullException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentNullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentNullException(string? paramName) { } @@ -309,7 +309,7 @@ public ArgumentNullException(string? paramName, string? message) { } public partial class ArgumentOutOfRangeException : System.ArgumentException { public ArgumentOutOfRangeException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentOutOfRangeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentOutOfRangeException(string? paramName) { } @@ -318,7 +318,7 @@ public ArgumentOutOfRangeException(string? paramName, object? actualValue, strin public ArgumentOutOfRangeException(string? paramName, string? message) { } public virtual object? ActualValue { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfZero(T value, [System.Runtime.CompilerServices.CallerArgumentExpressionAttribute(nameof(value))] string? paramName = null) where T : System.Numerics.INumberBase { throw null; } @@ -332,7 +332,7 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public partial class ArithmeticException : System.SystemException { public ArithmeticException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArithmeticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArithmeticException(string? message) { } @@ -515,7 +515,7 @@ void System.Collections.IEnumerator.Reset() { } public partial class ArrayTypeMismatchException : System.SystemException { public ArrayTypeMismatchException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArrayTypeMismatchException(string? message) { } @@ -601,7 +601,7 @@ public AttributeUsageAttribute(System.AttributeTargets validOn) { } public partial class BadImageFormatException : System.SystemException { public BadImageFormatException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BadImageFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BadImageFormatException(string? message) { } @@ -611,7 +611,7 @@ public BadImageFormatException(string? message, string? fileName, System.Excepti public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -887,7 +887,7 @@ public static void SetByte(System.Array array, int index, byte value) { } public partial class CannotUnloadAppDomainException : System.SystemException { public CannotUnloadAppDomainException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CannotUnloadAppDomainException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CannotUnloadAppDomainException(string? message) { } @@ -1089,7 +1089,7 @@ protected ContextBoundObject() { } public partial class ContextMarshalException : System.SystemException { public ContextMarshalException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ContextMarshalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ContextMarshalException(string? message) { } @@ -1898,7 +1898,7 @@ public sealed partial class DBNull : System.IConvertible, System.Runtime.Seriali { internal DBNull() { } public static readonly System.DBNull Value; - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.TypeCode GetTypeCode() { throw null; } @@ -2154,7 +2154,7 @@ protected Delegate([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAt public override int GetHashCode() { throw null; } public virtual System.Delegate[] GetInvocationList() { throw null; } protected virtual System.Reflection.MethodInfo GetMethodImpl() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.Delegate? d1, System.Delegate? d2) { throw null; } @@ -2166,7 +2166,7 @@ public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo public partial class DivideByZeroException : System.ArithmeticException { public DivideByZeroException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DivideByZeroException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DivideByZeroException(string? message) { } @@ -2366,7 +2366,7 @@ public DivideByZeroException(string? message, System.Exception? innerException) public partial class DuplicateWaitObjectException : System.ArgumentException { public DuplicateWaitObjectException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateWaitObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateWaitObjectException(string? parameterName) { } @@ -2376,7 +2376,7 @@ public DuplicateWaitObjectException(string? parameterName, string? message) { } public partial class EntryPointNotFoundException : System.TypeLoadException { public EntryPointNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EntryPointNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EntryPointNotFoundException(string? message) { } @@ -2572,7 +2572,7 @@ public EventArgs() { } public partial class Exception : System.Runtime.Serialization.ISerializable { public Exception() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Exception(string? message) { } @@ -2588,7 +2588,7 @@ public Exception(string? message, System.Exception? innerException) { } [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected event System.EventHandler? SerializeObjectState { add { } remove { } } public virtual System.Exception GetBaseException() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public new System.Type GetType() { throw null; } @@ -2604,7 +2604,7 @@ public ExecutionEngineException(string? message, System.Exception? innerExceptio public partial class FieldAccessException : System.MemberAccessException { public FieldAccessException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FieldAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FieldAccessException(string? message) { } @@ -2618,7 +2618,7 @@ public FlagsAttribute() { } public partial class FormatException : System.SystemException { public FormatException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FormatException(string? message) { } @@ -3860,7 +3860,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class InvalidCastException : System.SystemException { public InvalidCastException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCastException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidCastException(string? message) { } @@ -3870,7 +3870,7 @@ public InvalidCastException(string? message, int errorCode) { } public partial class InvalidOperationException : System.SystemException { public InvalidOperationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOperationException(string? message) { } @@ -3885,7 +3885,7 @@ public InvalidProgramException(string? message, System.Exception? inner) { } public partial class InvalidTimeZoneException : System.Exception { public InvalidTimeZoneException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidTimeZoneException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidTimeZoneException(string? message) { } @@ -4168,7 +4168,7 @@ public static partial class MathF public partial class MemberAccessException : System.SystemException { public MemberAccessException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MemberAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MemberAccessException(string? message) { } @@ -4203,7 +4203,7 @@ public void CopyTo(System.Memory destination) { } public partial class MethodAccessException : System.MemberAccessException { public MethodAccessException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MethodAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MethodAccessException(string? message) { } @@ -4220,7 +4220,7 @@ public enum MidpointRounding public partial class MissingFieldException : System.MissingMemberException { public MissingFieldException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingFieldException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingFieldException(string? message) { } @@ -4234,21 +4234,21 @@ public partial class MissingMemberException : System.MemberAccessException protected string? MemberName; protected byte[]? Signature; public MissingMemberException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMemberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMemberException(string? message) { } public MissingMemberException(string? message, System.Exception? inner) { } public MissingMemberException(string? className, string? memberName) { } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class MissingMethodException : System.MissingMemberException { public MissingMethodException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMethodException(string? message) { } @@ -4301,7 +4301,7 @@ public abstract partial class MulticastDelegate : System.Delegate public sealed override int GetHashCode() { throw null; } public sealed override System.Delegate[] GetInvocationList() { throw null; } protected override System.Reflection.MethodInfo GetMethodImpl() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.MulticastDelegate? d1, System.MulticastDelegate? d2) { throw null; } @@ -4324,7 +4324,7 @@ public partial class NotFiniteNumberException : System.ArithmeticException { public NotFiniteNumberException() { } public NotFiniteNumberException(double offendingNumber) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotFiniteNumberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotFiniteNumberException(string? message) { } @@ -4332,14 +4332,14 @@ public NotFiniteNumberException(string? message, double offendingNumber) { } public NotFiniteNumberException(string? message, double offendingNumber, System.Exception? innerException) { } public NotFiniteNumberException(string? message, System.Exception? innerException) { } public double OffendingNumber { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class NotImplementedException : System.SystemException { public NotImplementedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotImplementedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotImplementedException(string? message) { } @@ -4348,7 +4348,7 @@ public NotImplementedException(string? message, System.Exception? inner) { } public partial class NotSupportedException : System.SystemException { public NotSupportedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotSupportedException(string? message) { } @@ -4379,7 +4379,7 @@ public partial struct Nullable where T : struct public partial class NullReferenceException : System.SystemException { public NullReferenceException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NullReferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NullReferenceException(string? message) { } @@ -4399,7 +4399,7 @@ public Object() { } } public partial class ObjectDisposedException : System.InvalidOperationException { - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectDisposedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ObjectDisposedException(string? objectName) { } @@ -4407,7 +4407,7 @@ public ObjectDisposedException(string? message, System.Exception? innerException public ObjectDisposedException(string? objectName, string? message) { } public override string Message { get { throw null; } } public string ObjectName { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIf([System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)] bool condition, object instance) => throw null; @@ -4432,7 +4432,7 @@ public OperatingSystem(System.PlatformID platform, System.Version version) { } public System.Version Version { get { throw null; } } public string VersionString { get { throw null; } } public object Clone() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsAndroid() { throw null; } @@ -4463,7 +4463,7 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S public partial class OperationCanceledException : System.SystemException { public OperationCanceledException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OperationCanceledException(string? message) { } @@ -4476,7 +4476,7 @@ public OperationCanceledException(System.Threading.CancellationToken token) { } public partial class OutOfMemoryException : System.SystemException { public OutOfMemoryException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OutOfMemoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OutOfMemoryException(string? message) { } @@ -4485,7 +4485,7 @@ public OutOfMemoryException(string? message, System.Exception? innerException) { public partial class OverflowException : System.ArithmeticException { public OverflowException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OverflowException(string? message) { } @@ -4515,7 +4515,7 @@ public enum PlatformID public partial class PlatformNotSupportedException : System.NotSupportedException { public PlatformNotSupportedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PlatformNotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PlatformNotSupportedException(string? message) { } @@ -4570,7 +4570,7 @@ public void Shuffle(T[] values) { } public partial class RankException : System.SystemException { public RankException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RankException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RankException(string? message) { } @@ -4662,7 +4662,7 @@ public partial struct RuntimeFieldHandle : System.IEquatable : System.Runtime.Serialization.ISer public WeakReference(T target) { } public WeakReference(T target, bool trackResurrection) { } ~WeakReference() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void SetTarget(T target) { } @@ -7444,7 +7444,7 @@ public sealed partial class Comparer : System.Collections.IComparer, System.Runt public static readonly System.Collections.Comparer DefaultInvariant; public Comparer(System.Globalization.CultureInfo culture) { } public int Compare(object? a, object? b) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -7480,7 +7480,7 @@ public Hashtable(int capacity, float loadFactor) { } public Hashtable(int capacity, float loadFactor, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(int, float, IEqualityComparer) instead.")] public Hashtable(int capacity, float loadFactor, System.Collections.IHashCodeProvider? hcp, System.Collections.IComparer? comparer) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Hashtable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.ObsoleteAttribute("Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.")] @@ -7505,7 +7505,7 @@ public virtual void Clear() { } public virtual void CopyTo(System.Array array, int arrayIndex) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } protected virtual int GetHash(object key) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual bool KeyEquals(object? item, object key) { throw null; } @@ -7687,7 +7687,7 @@ public partial interface ISet : System.Collections.Generic.ICollection, Sy public partial class KeyNotFoundException : System.SystemException { public KeyNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected KeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public KeyNotFoundException(string? message) { } @@ -8583,7 +8583,7 @@ public void ClearCachedData() { } public partial class CultureNotFoundException : System.ArgumentException { public CultureNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CultureNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CultureNotFoundException(string? message) { } @@ -8596,7 +8596,7 @@ public CultureNotFoundException(string? paramName, string? invalidCultureName, s public virtual int? InvalidCultureId { get { throw null; } } public virtual string? InvalidCultureName { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -9463,7 +9463,7 @@ public void MoveTo(string destDirName) { } public partial class DirectoryNotFoundException : System.IO.IOException { public DirectoryNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DirectoryNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryNotFoundException(string? message) { } @@ -9472,7 +9472,7 @@ public DirectoryNotFoundException(string? message, System.Exception? innerExcept public partial class EndOfStreamException : System.IO.IOException { public EndOfStreamException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EndOfStreamException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EndOfStreamException(string? message) { } @@ -9651,7 +9651,7 @@ public void MoveTo(string destFileName, bool overwrite) { } public partial class FileLoadException : System.IO.IOException { public FileLoadException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileLoadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileLoadException(string? message) { } @@ -9661,7 +9661,7 @@ public FileLoadException(string? message, string? fileName, System.Exception? in public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -9678,7 +9678,7 @@ public enum FileMode public partial class FileNotFoundException : System.IO.IOException { public FileNotFoundException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileNotFoundException(string? message) { } @@ -9688,7 +9688,7 @@ public FileNotFoundException(string? message, string? fileName, System.Exception public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -9798,7 +9798,7 @@ public abstract partial class FileSystemInfo : System.MarshalByRefObject, System protected string FullPath; protected string OriginalPath; protected FileSystemInfo() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.IO.FileAttributes Attributes { get { throw null; } set { } } @@ -9816,7 +9816,7 @@ protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, Sy public System.IO.UnixFileMode UnixFileMode { get { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("windows")] set { } } public void CreateAsSymbolicLink(string pathToTarget) { } public abstract void Delete(); - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Refresh() { } @@ -9837,7 +9837,7 @@ public InvalidDataException(string? message, System.Exception? innerException) { public partial class IOException : System.SystemException { public IOException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected IOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public IOException(string? message) { } @@ -9955,7 +9955,7 @@ public static partial class Path public partial class PathTooLongException : System.IO.IOException { public PathTooLongException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PathTooLongException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PathTooLongException(string? message) { } @@ -10866,7 +10866,7 @@ public virtual event System.Reflection.ModuleResolveEventHandler? ModuleResolve public virtual System.Reflection.Module[] GetModules(bool getResourceModules) { throw null; } public virtual System.Reflection.AssemblyName GetName() { throw null; } public virtual System.Reflection.AssemblyName GetName(bool copiedName) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Assembly references might be removed")] @@ -11042,7 +11042,7 @@ public AssemblyName(string assemblyName) { } public System.Configuration.Assemblies.AssemblyVersionCompatibility VersionCompatibility { get { throw null; } set { } } public object Clone() { throw null; } public static System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public byte[]? GetPublicKey() { throw null; } @@ -11212,7 +11212,7 @@ public static partial class CustomAttributeExtensions public partial class CustomAttributeFormatException : System.FormatException { public CustomAttributeFormatException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CustomAttributeFormatException(string? message) { } @@ -11324,7 +11324,7 @@ public enum FieldAttributes Static = 16, InitOnly = 32, Literal = 64, - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] NotSerialized = 128, HasFieldRVA = 256, SpecialName = 512, @@ -11346,7 +11346,7 @@ protected FieldInfo() { } public bool IsFamilyOrAssembly { get { throw null; } } public bool IsInitOnly { get { throw null; } } public bool IsLiteral { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public bool IsNotSerialized { get { throw null; } } public bool IsPinvokeImpl { get { throw null; } } public bool IsPrivate { get { throw null; } } @@ -11414,7 +11414,7 @@ public static partial class IntrospectionExtensions public partial class InvalidFilterCriteriaException : System.ApplicationException { public InvalidFilterCriteriaException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidFilterCriteriaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidFilterCriteriaException(string? message) { } @@ -11672,7 +11672,7 @@ protected Module() { } public System.Reflection.MethodInfo[] GetMethods() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Methods might be removed")] public virtual System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void GetPEKind(out System.Reflection.PortableExecutableKinds peKind, out System.Reflection.ImageFileMachine machine) { throw null; } @@ -11766,9 +11766,9 @@ public enum ParameterAttributes ReservedMask = 61440, } public partial class ParameterInfo : System.Reflection.ICustomAttributeProvider -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete , System.Runtime.Serialization.IObjectReference -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { protected System.Reflection.ParameterAttributes AttrsImpl; protected System.Type? ClassImpl; @@ -11797,7 +11797,7 @@ protected ParameterInfo() { } public virtual System.Collections.Generic.IList GetCustomAttributesData() { throw null; } public virtual System.Type GetModifiedParameterType() { throw null; } public virtual System.Type[] GetOptionalCustomModifiers() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { throw null; } public virtual System.Type[] GetRequiredCustomModifiers() { throw null; } @@ -11900,7 +11900,7 @@ public ReflectionTypeLoadException(System.Type?[]? classes, System.Exception?[]? public System.Exception?[] LoaderExceptions { get { throw null; } } public override string Message { get { throw null; } } public System.Type?[] Types { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -11937,7 +11937,7 @@ public partial class StrongNameKeyPair : System.Runtime.Serialization.IDeseriali { public StrongNameKeyPair(byte[] keyPairArray) { } public StrongNameKeyPair(System.IO.FileStream keyPairFile) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongNameKeyPair(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongNameKeyPair(string keyPairContainer) { } @@ -11948,7 +11948,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TargetException : System.ApplicationException { public TargetException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TargetException(string? message) { } @@ -11990,7 +11990,7 @@ public enum TypeAttributes SpecialName = 1024, RTSpecialName = 2048, Import = 4096, - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] Serializable = 8192, WindowsRuntime = 16384, UnicodeClass = 65536, @@ -12126,7 +12126,7 @@ public partial interface IResourceReader : System.Collections.IEnumerable, Syste public partial class MissingManifestResourceException : System.SystemException { public MissingManifestResourceException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected MissingManifestResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingManifestResourceException(string? message) { } public MissingManifestResourceException(string? message, System.Exception? inner) { } @@ -12134,7 +12134,7 @@ public MissingManifestResourceException(string? message, System.Exception? inner public partial class MissingSatelliteAssemblyException : System.SystemException { public MissingSatelliteAssemblyException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingSatelliteAssemblyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingSatelliteAssemblyException(string? message) { } @@ -12890,7 +12890,7 @@ public sealed partial class RuntimeWrappedException : System.Exception { public RuntimeWrappedException(object thrownObject) { } public object WrappedException { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -12938,7 +12938,7 @@ public SwitchExpressionException(string? message) { } public SwitchExpressionException(string? message, System.Exception? innerException) { } public override string Message { get { throw null; } } public object? UnmatchedValue { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -13190,7 +13190,7 @@ public void SetHandleAsInvalid() { } public partial class ExternalException : System.SystemException { public ExternalException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExternalException(string? message) { } @@ -13501,7 +13501,7 @@ public partial interface IDeserializationCallback void OnDeserialization(object? sender); } [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFormatterConverter { object Convert(object value, System.Type type); @@ -13522,19 +13522,19 @@ public partial interface IFormatterConverter uint ToUInt32(object value); ulong ToUInt64(object value); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IObjectReference { object GetRealObject(System.Runtime.Serialization.StreamingContext context); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISafeSerializationData { void CompleteDeserialization(object deserialized); } public partial interface ISerializable { - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); } [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)] @@ -13563,7 +13563,7 @@ public sealed partial class OptionalFieldAttribute : System.Attribute public OptionalFieldAttribute() { } public int VersionAdded { get { throw null; } set { } } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SafeSerializationEventArgs : System.EventArgs { internal SafeSerializationEventArgs() { } @@ -13581,7 +13581,7 @@ public readonly partial struct SerializationEntry public partial class SerializationException : System.SystemException { public SerializationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SerializationException(string? message) { } @@ -13590,10 +13590,10 @@ public SerializationException(string? message, System.Exception? innerException) public sealed partial class SerializationInfo { [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter) { } [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust) { } public string AssemblyName { get { throw null; } set { } } public string FullTypeName { get { throw null; } set { } } @@ -13659,18 +13659,18 @@ public readonly partial struct StreamingContext { private readonly object _dummy; private readonly int _dummyPrimitive; - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state, object? additional) { throw null; } public object? Context { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public System.Runtime.Serialization.StreamingContextStates State { get { throw null; } } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } } [System.FlagsAttribute] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0049", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum StreamingContextStates { CrossProcess = 1, @@ -13922,7 +13922,7 @@ public void AddChild(System.Security.SecurityElement child) { } public partial class SecurityException : System.SystemException { public SecurityException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SecurityException(string? message) { } @@ -13939,7 +13939,7 @@ public SecurityException(string? message, System.Type? type, string? state) { } public object? PermitOnlySetInstance { get { throw null; } set { } } public string? RefusedSet { get { throw null; } set { } } public string? Url { get { throw null; } set { } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -13986,7 +13986,7 @@ public UnverifiableCodeAttribute() { } public partial class VerificationException : System.SystemException { public VerificationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VerificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VerificationException(string? message) { } @@ -13999,7 +13999,7 @@ public partial class CryptographicException : System.SystemException { public CryptographicException() { } public CryptographicException(int hr) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicException(string? message) { } @@ -14925,7 +14925,7 @@ public static partial class TaskAsyncEnumerableExtensions public partial class TaskCanceledException : System.OperationCanceledException { public TaskCanceledException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskCanceledException(string? message) { } @@ -15153,7 +15153,7 @@ public partial class TaskSchedulerException : System.Exception { public TaskSchedulerException() { } public TaskSchedulerException(System.Exception? innerException) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskSchedulerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskSchedulerException(string? message) { } @@ -15395,7 +15395,7 @@ public partial class Uri : System.Runtime.Serialization.ISerializable public static readonly string UriSchemeTelnet; public static readonly string UriSchemeWs; public static readonly string UriSchemeWss; - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uriString) { } @@ -15543,7 +15543,7 @@ public enum UriFormat public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable { public UriFormatException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public UriFormatException(string? textString) { } diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs index 28d127fe1f1869..766bdbe7c75ed8 100644 --- a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs +++ b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs @@ -444,7 +444,7 @@ public PrivilegeNotHeldException() { } public PrivilegeNotHeldException(string? privilege) { } public PrivilegeNotHeldException(string? privilege, System.Exception? inner) { } public string? PrivilegeName { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs index ed5bb8e5ac1a2a..dccfc7dcc50405 100644 --- a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs +++ b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs @@ -41,10 +41,10 @@ public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType) { } public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType, string? nameType, string? roleType) { } public ClaimsIdentity(System.IO.BinaryReader reader) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected ClaimsIdentity(System.Security.Claims.ClaimsIdentity other) { } @@ -84,7 +84,7 @@ public partial class ClaimsPrincipal : System.Security.Principal.IPrincipal public ClaimsPrincipal() { } public ClaimsPrincipal(System.Collections.Generic.IEnumerable identities) { } public ClaimsPrincipal(System.IO.BinaryReader reader) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsPrincipal(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ClaimsPrincipal(System.Security.Principal.IIdentity identity) { } 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 5f48790a3d29dd..d2c8bbc0dbea0f 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs @@ -542,7 +542,7 @@ public static void ZeroMemory(System.Span buffer) { } public partial class CryptographicUnexpectedOperationException : System.Security.Cryptography.CryptographicException { public CryptographicUnexpectedOperationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicUnexpectedOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicUnexpectedOperationException(string? message) { } @@ -2751,7 +2751,7 @@ public X509Certificate(byte[] rawData, string? password) { } public X509Certificate(byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate(System.IntPtr handle) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public X509Certificate(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] @@ -2850,7 +2850,7 @@ public X509Certificate2(System.IntPtr handle) { } public X509Certificate2(System.ReadOnlySpan rawData) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate2(System.ReadOnlySpan rawData, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected X509Certificate2(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] 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 e9d86a2085d97c..7b60fb6268f49f 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -677,7 +677,7 @@ public partial class HostProtectionException : System.SystemException { public HostProtectionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected HostProtectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -2062,7 +2062,7 @@ public Hash(System.Reflection.Assembly assembly) { } public static System.Security.Policy.Hash CreateSHA256(byte[] sha256) { throw null; } public byte[] GenerateHash(System.Security.Cryptography.HashAlgorithm hashAlg) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -2132,7 +2132,7 @@ public partial class PolicyException : System.SystemException { public PolicyException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PolicyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs index e12c56007ee583..17fbd72071fe4a 100644 --- a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs +++ b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs @@ -23,7 +23,7 @@ public IdentityNotMappedException() { } public IdentityNotMappedException(string? message) { } public IdentityNotMappedException(string? message, System.Exception? inner) { } public System.Security.Principal.IdentityReferenceCollection UnmappedIdentities { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -238,7 +238,7 @@ public WindowsIdentity(System.IntPtr userToken) { } public WindowsIdentity(System.IntPtr userToken, string type) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public WindowsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected WindowsIdentity(System.Security.Principal.WindowsIdentity identity) { } diff --git a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs index f7823187072fb0..2748cc1217b6fa 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs @@ -153,7 +153,7 @@ public partial class TimeoutException : System.SystemException { public TimeoutException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected TimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Speech/src/Result/RecognitionResult.cs b/src/libraries/System.Speech/src/Result/RecognitionResult.cs index 83753768af51df..9f09e7c7d7661c 100644 --- a/src/libraries/System.Speech/src/Result/RecognitionResult.cs +++ b/src/libraries/System.Speech/src/Result/RecognitionResult.cs @@ -31,7 +31,7 @@ internal RecognitionResult() { } -#pragma warning disable SYSLIB0049 // Legacy formatter infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy formatter infrastructure is obsolete private RecognitionResult(SerializationInfo info, StreamingContext context) { // Get the set of serializable members for our class and base classes @@ -55,7 +55,7 @@ private RecognitionResult(SerializationInfo info, StreamingContext context) } } } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 #endregion @@ -68,7 +68,7 @@ public RecognizedAudio GetAudioForWordRange(RecognizedWordUnit firstWord, Recogn return Audio.GetRange(firstWord._audioPosition, lastWord._audioPosition + lastWord._audioDuration - firstWord._audioPosition); } -#pragma warning disable SYSLIB0049 // Legacy formatter infrastructure is obsolete +#pragma warning disable SYSLIB0050 // Legacy formatter infrastructure is obsolete void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { Helpers.ThrowIfNull(info, nameof(info)); @@ -111,7 +111,7 @@ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext contex } } } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 internal bool SetTextFeedback(string text, bool isSuccessfulAction) { 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 b7920a677193c8..872b3ab0f1cab9 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -143,7 +143,7 @@ public partial class JsonException : System.Exception { public JsonException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -156,7 +156,7 @@ public JsonException(string? message, string? path, long? lineNumber, long? byte public override string Message { get { throw null; } } public string? Path { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs index f0762289ca5339..5abebffe44771c 100644 --- a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs +++ b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs @@ -142,7 +142,7 @@ public partial class Regex : System.Runtime.Serialization.ISerializable protected internal string? pattern; protected internal System.Text.RegularExpressions.RegexOptions roptions; protected Regex() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Regex(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Regex([System.Diagnostics.CodeAnalysis.StringSyntax(System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex)] string pattern) { } @@ -266,7 +266,7 @@ public GeneratedRegexAttribute([System.Diagnostics.CodeAnalysis.StringSyntax(Sys public partial class RegexMatchTimeoutException : System.TimeoutException, System.Runtime.Serialization.ISerializable { public RegexMatchTimeoutException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RegexMatchTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RegexMatchTimeoutException(string message) { } @@ -332,7 +332,7 @@ public sealed partial class RegexParseException : System.ArgumentException private RegexParseException() { } public System.Text.RegularExpressions.RegexParseError Error { get { throw null; } } public int Offset { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs index 0cee3ad97ad542..c4435d186d0809 100644 --- a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs @@ -9,7 +9,7 @@ namespace System.Threading.Channels public partial class ChannelClosedException : System.InvalidOperationException { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ChannelClosedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs index 567abdfa135805..e7a57e6f49590c 100644 --- a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs +++ b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs @@ -26,7 +26,7 @@ internal CompressedStack() { } public static System.Threading.CompressedStack Capture() { throw null; } public System.Threading.CompressedStack CreateCopy() { throw null; } public static System.Threading.CompressedStack GetCompressedStack() { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void Run(System.Threading.CompressedStack compressedStack, System.Threading.ContextCallback callback, object? state) { } @@ -163,7 +163,7 @@ public ThreadExceptionEventArgs(System.Exception t) { } public partial class ThreadInterruptedException : System.SystemException { public ThreadInterruptedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadInterruptedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadInterruptedException(string? message) { } @@ -199,7 +199,7 @@ public enum ThreadState public partial class ThreadStateException : System.SystemException { public ThreadStateException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadStateException(string? message) { } diff --git a/src/libraries/System.Threading/ref/System.Threading.cs b/src/libraries/System.Threading/ref/System.Threading.cs index 7421be76c7db64..d09ccf2c132699 100644 --- a/src/libraries/System.Threading/ref/System.Threading.cs +++ b/src/libraries/System.Threading/ref/System.Threading.cs @@ -39,7 +39,7 @@ public partial class BarrierPostPhaseException : System.Exception { public BarrierPostPhaseException() { } public BarrierPostPhaseException(System.Exception? innerException) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BarrierPostPhaseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BarrierPostPhaseException(string? message) { } @@ -132,7 +132,7 @@ public partial class AbandonedMutexException : System.SystemException { public AbandonedMutexException() { } public AbandonedMutexException(int location, System.Threading.WaitHandle? handle) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AbandonedMutexException(string? message) { } @@ -198,7 +198,7 @@ internal ExecutionContext() { } public static System.Threading.ExecutionContext? Capture() { throw null; } public System.Threading.ExecutionContext CreateCopy() { throw null; } public void Dispose() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsFlowSuppressed() { throw null; } @@ -286,7 +286,7 @@ public static partial class LazyInitializer public partial class LockRecursionException : System.Exception { public LockRecursionException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LockRecursionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LockRecursionException(string? message) { } @@ -406,7 +406,7 @@ public Semaphore(int initialCount, int maximumCount, string? name) { } public partial class SemaphoreFullException : System.SystemException { public SemaphoreFullException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SemaphoreFullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SemaphoreFullException(string? message) { } @@ -488,7 +488,7 @@ protected void SetWaitNotificationRequired() { } public partial class SynchronizationLockException : System.SystemException { public SynchronizationLockException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SynchronizationLockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SynchronizationLockException(string? message) { } @@ -554,7 +554,7 @@ public static void Write([System.Diagnostics.CodeAnalysis.NotNullIfNotNullAtt public partial class WaitHandleCannotBeOpenedException : System.ApplicationException { public WaitHandleCannotBeOpenedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WaitHandleCannotBeOpenedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WaitHandleCannotBeOpenedException(string? message) { } diff --git a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs index 1bd231a8bbbb9b..c15a50c7c19a32 100644 --- a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs +++ b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs @@ -144,7 +144,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TransactionAbortedException : System.Transactions.TransactionException { public TransactionAbortedException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionAbortedException(string? message) { } @@ -159,7 +159,7 @@ public TransactionEventArgs() { } public partial class TransactionException : System.SystemException { public TransactionException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionException(string? message) { } @@ -168,7 +168,7 @@ public TransactionException(string? message, System.Exception? innerException) { public partial class TransactionInDoubtException : System.Transactions.TransactionException { public TransactionInDoubtException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionInDoubtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionInDoubtException(string? message) { } @@ -207,7 +207,7 @@ public static void RecoveryComplete(System.Guid resourceManagerIdentifier) { } public partial class TransactionManagerCommunicationException : System.Transactions.TransactionException { public TransactionManagerCommunicationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionManagerCommunicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionManagerCommunicationException(string? message) { } @@ -227,7 +227,7 @@ public partial struct TransactionOptions : System.IEquatable [Serializable] internal class OletxTransaction : ISerializable -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete #pragma warning disable SA1001 // CommasMustBeSpacedCorrectly , IObjectReference #pragma warning restore SA1001 -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 { // We have a strong reference on realOletxTransaction which does the real work internal RealOletxTransaction RealOletxTransaction; @@ -140,7 +140,7 @@ protected OletxTransaction(SerializationInfo? serializationInfo, StreamingContex RealOletxTransaction = null!; } -#pragma warning disable SYSLIB0049 // IObjectReference is obsolete +#pragma warning disable SYSLIB0050 // IObjectReference is obsolete public object GetRealObject(StreamingContext context) { TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log; @@ -187,7 +187,7 @@ public object GetRealObject(StreamingContext context) return returnValue; } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 /// /// Implementation of IDisposable.Dispose. Releases managed, and unmanaged resources diff --git a/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs b/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs index b5f5dee6993db6..2302f9bb9ad07e 100644 --- a/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs +++ b/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.cs @@ -12,7 +12,7 @@ public partial class SoundPlayer : System.ComponentModel.Component, System.Runti public SoundPlayer() { } public SoundPlayer(System.IO.Stream? stream) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SoundPlayer(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) { } 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 d5ac9b2bbbcbe2..92127fdfbb9602 100644 --- a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -471,7 +471,7 @@ public override void WriteTo(System.Xml.XmlWriter w) { } public partial class XmlException : System.SystemException { public XmlException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlException(string? message) { } @@ -481,7 +481,7 @@ public XmlException(string? message, System.Exception? innerException, int lineN public int LinePosition { get { throw null; } } public override string Message { get { throw null; } } public string? SourceUri { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1873,7 +1873,7 @@ public XmlSchemaEnumerationFacet() { } public partial class XmlSchemaException : System.SystemException { public XmlSchemaException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaException(string? message) { } @@ -1884,7 +1884,7 @@ public XmlSchemaException(string? message, System.Exception? innerException, int public override string Message { get { throw null; } } public System.Xml.Schema.XmlSchemaObject? SourceSchemaObject { get { throw null; } } public string? SourceUri { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1990,13 +1990,13 @@ public enum InferenceOption public partial class XmlSchemaInferenceException : System.Xml.Schema.XmlSchemaException { public XmlSchemaInferenceException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaInferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaInferenceException(string message) { } public XmlSchemaInferenceException(string message, System.Exception? innerException) { } public XmlSchemaInferenceException(string message, System.Exception? innerException, int lineNumber, int linePosition) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -2334,14 +2334,14 @@ public enum XmlSchemaUse public partial class XmlSchemaValidationException : System.Xml.Schema.XmlSchemaException { public XmlSchemaValidationException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XmlSchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XmlSchemaValidationException(string? message) { } public XmlSchemaValidationException(string? message, System.Exception? innerException) { } public XmlSchemaValidationException(string? message, System.Exception? innerException, int lineNumber, int linePosition) { } public object? SourceObject { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected internal void SetSourceObject(object? sourceObject) { } @@ -2857,12 +2857,12 @@ public partial class XsltCompileException : System.Xml.Xsl.XsltException { public XsltCompileException() { } public XsltCompileException(System.Exception inner, string sourceUri, int lineNumber, int linePosition) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XsltCompileException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XsltCompileException(string message) { } public XsltCompileException(string message, System.Exception innerException) { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -2879,7 +2879,7 @@ protected XsltContext(System.Xml.NameTable table) : base (default(System.Xml.Xml public partial class XsltException : System.SystemException { public XsltException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XsltException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XsltException(string message) { } @@ -2888,7 +2888,7 @@ public XsltException(string message, System.Exception? innerException) { } public virtual int LinePosition { get { throw null; } } public override string Message { get { throw null; } } public virtual string? SourceUri { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs index 777c7ac72a188b..dd452ba6e0a47d 100644 --- a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs +++ b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.cs @@ -19,13 +19,13 @@ public XPathDocument(System.Xml.XmlReader reader, System.Xml.XmlSpace space) { } public partial class XPathException : System.SystemException { public XPathException() { } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected XPathException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public XPathException(string? message) { } public XPathException(string? message, System.Exception? innerException) { } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization (IMPL) is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs index 66fa2c3ce7829f..add2c153f66f1f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -88,11 +88,11 @@ private static bool IsUserCattrProvider(object obj) int count = 0; TypeAttributes Attributes = type.Attributes; -#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete /* IsSerializable returns true for delegates/enums as well */ if ((Attributes & TypeAttributes.Serializable) != 0) count++; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if ((Attributes & TypeAttributes.Import) != 0) count++; @@ -101,10 +101,10 @@ private static bool IsUserCattrProvider(object obj) object[] attrs = new object[count]; count = 0; -#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete if ((Attributes & TypeAttributes.Serializable) != 0) attrs[count++] = new SerializableAttribute(); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if ((Attributes & TypeAttributes.Import) != 0) attrs[count++] = new ComImportAttribute(); @@ -532,11 +532,11 @@ internal static IList GetCustomAttributesDataBase(ICustomAt int count = 0; TypeAttributes Attributes = type.Attributes; -#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete /* IsSerializable returns true for delegates/enums as well */ if ((Attributes & TypeAttributes.Serializable) != 0) count++; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if ((Attributes & TypeAttributes.Import) != 0) count++; @@ -545,10 +545,10 @@ internal static IList GetCustomAttributesDataBase(ICustomAt CustomAttributeData[] attrsData = new CustomAttributeData[count]; count = 0; -#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete if ((Attributes & TypeAttributes.Serializable) != 0) attrsData[count++] = new RuntimeCustomAttributeData((typeof(SerializableAttribute)).GetConstructor(Type.EmptyTypes)!); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if ((Attributes & TypeAttributes.Import) != 0) attrsData[count++] = new RuntimeCustomAttributeData((typeof(ComImportAttribute)).GetConstructor(Type.EmptyTypes)!); diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs index bcc35c6c08f110..db8d805de1646b 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs @@ -188,13 +188,13 @@ protected override void SetCustomAttributeCore(CustomAttributeBuilder customBuil offset |= ((int)data[5]) << 24; return; } -#pragma warning disable SYSLIB0049 // FieldAttributes.NotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldAttributes.NotSerialized is obsolete else if (attrname == "System.NonSerializedAttribute") { attrs |= FieldAttributes.NotSerialized; return; } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 else if (attrname == "System.Runtime.CompilerServices.SpecialNameAttribute") { attrs |= FieldAttributes.SpecialName; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs index d7473ca61857ee..98670c99f16313 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.Mono.cs @@ -1499,13 +1499,13 @@ protected override void SetCustomAttributeCore(CustomAttributeBuilder customBuil attrs |= TypeAttributes.SpecialName; return; } -#pragma warning disable SYSLIB0049 // TypeAttributes.Serializable is obsolete +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete else if (attrname == "System.SerializableAttribute") { attrs |= TypeAttributes.Serializable; return; } -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 else if (attrname == "System.Runtime.InteropServices.ComImportAttribute") { attrs |= TypeAttributes.Import; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs index e1c87e18da2f96..94e81cc4c1f69f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/FieldInfo.Mono.cs @@ -40,10 +40,10 @@ internal virtual int GetFieldOffset() { int count = 0; -#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) count++; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (DeclaringType!.IsExplicitLayout) count++; @@ -57,10 +57,10 @@ internal virtual int GetFieldOffset() object[] attrs = new object[count]; count = 0; -#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) attrs[count++] = new NonSerializedAttribute(); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (DeclaringType.IsExplicitLayout) attrs[count++] = new FieldOffsetAttribute(GetFieldOffset()); if (marshalAs != null) @@ -73,10 +73,10 @@ internal virtual int GetFieldOffset() { int count = 0; -#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) count++; -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (DeclaringType!.IsExplicitLayout) count++; @@ -90,10 +90,10 @@ internal virtual int GetFieldOffset() CustomAttributeData[] attrsData = new CustomAttributeData[count]; count = 0; -#pragma warning disable SYSLIB0049 // FieldInfo.IsNotSerialized is obsolete +#pragma warning disable SYSLIB0050 // FieldInfo.IsNotSerialized is obsolete if (IsNotSerialized) attrsData[count++] = new RuntimeCustomAttributeData((typeof(NonSerializedAttribute)).GetConstructor(Type.EmptyTypes)!); -#pragma warning restore SYSLIB0049 +#pragma warning restore SYSLIB0050 if (DeclaringType.IsExplicitLayout) { var ctorArgs = new CustomAttributeTypedArgument[] { new CustomAttributeTypedArgument(typeof(int), GetFieldOffset()) }; From 26aa7dd4a52e4743a05a6da25aab64197694c8bc Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Tue, 4 Apr 2023 16:51:58 -0700 Subject: [PATCH 4/7] Update unit tests to work with BF killbit --- Directory.Build.props | 3 ++- .../tests/DisableBitTests.cs | 21 +++++++++++++++++++ ...time.Serialization.Formatters.Tests.csproj | 9 ++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9eed16db80980e..d0070eeee71bdb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -441,7 +441,8 @@ - + + true $(NoWarn);SYSLIB0011;SYSLIB0050;SYSLIB0051 $(NoWarn);IL2121 diff --git a/src/libraries/System.Runtime.Serialization.Formatters/tests/DisableBitTests.cs b/src/libraries/System.Runtime.Serialization.Formatters/tests/DisableBitTests.cs index 33119076700342..d74a5089119ce9 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/tests/DisableBitTests.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/tests/DisableBitTests.cs @@ -35,6 +35,27 @@ public static void DisabledAlwaysInBrowser() Assert.Contains(MoreInfoUrl, ex.Message, StringComparison.Ordinal); // error message should link to the more info URL } + [ConditionalFact(nameof(ShouldRunFullFeatureSwitchEnablementChecks))] + public static void EnabledThroughFeatureSwitch() + { + RemoteInvokeOptions options = new RemoteInvokeOptions(); + options.RuntimeConfigurationOptions[EnableBinaryFormatterSwitchName] = bool.TrueString; + + RemoteExecutor.Invoke(() => + { + // Test serialization + + MemoryStream ms = new MemoryStream(); + new BinaryFormatter().Serialize(ms, "A string to serialize."); + + // Test round-trippability + + ms.Position = 0; + object roundTripped = new BinaryFormatter().Deserialize(ms); + Assert.Equal("A string to serialize.", roundTripped); + }, options).Dispose(); + } + [ConditionalFact(nameof(ShouldRunFullFeatureSwitchEnablementChecks))] public static void DisabledThroughFeatureSwitch() { diff --git a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj index d804eb9125d547..bcb55918ae6725 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj +++ b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj @@ -4,6 +4,15 @@ true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;net48 + + + <_ProjectTypeRequiresBinaryFormatter>true + + From 59234de439f3208f0455e295069aea9568f44ecb Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Wed, 5 Apr 2023 14:44:33 -0700 Subject: [PATCH 5/7] Fix whitespace violation --- src/libraries/Common/src/System/Obsoletions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index e079cf164be750..9c77956f0ad6e8 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -159,7 +159,7 @@ internal static class Obsoletions internal const string JsonSerializerOptionsAddContextMessage = "JsonSerializerOptions.AddContext is obsolete. To register a JsonSerializerContext, use either the TypeInfoResolver or TypeInfoResolverChain properties."; internal const string JsonSerializerOptionsAddContextDiagId = "SYSLIB0049"; - + internal const string LegacyFormatterMessage = "Legacy formatter-based serialization is obsolete and should not be used."; internal const string LegacyFormatterDiagId = "SYSLIB0050"; From a902c0258a062b22d95a39022d222e92a7a88247 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Fri, 7 Apr 2023 15:24:06 -0700 Subject: [PATCH 6/7] React to PR feedback --- .../Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs | 6 ++---- .../Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs index 0a1c928ebaae2b..cbaf544c1b696d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs @@ -40,11 +40,9 @@ public sealed override int GetArrayRank() protected sealed override TypeAttributes GetAttributeFlagsImpl() { - TypeAttributes attrs = TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed; -#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete - attrs |= TypeAttributes.Serializable; +#pragma warning disable SYSLIB0050 // TypeAttributes.Serializable is obsolete + return TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; #pragma warning restore SYSLIB0050 - return attrs; } internal sealed override IEnumerable SyntheticConstructors diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs index dd4c102e4f6dc9..ed2859df574455 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HPackDecodingException.cs @@ -22,10 +22,8 @@ public HPackDecodingException(string message, Exception innerException) : base(m { } -#if NET8_0_OR_GREATER [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [EditorBrowsable(EditorBrowsableState.Never)] -#endif public HPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } From 6e74fc2b5dc5cbf1ebbf0ff75f7c1fa12d254bd2 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Fri, 7 Apr 2023 15:39:12 -0700 Subject: [PATCH 7/7] Update diagnostic message text --- docs/project/list-of-diagnostics.md | 4 +- .../Common/src/System/Obsoletions.cs | 4 +- src/libraries/Common/tests/System/MockType.cs | 2 +- .../Microsoft.CSharp/ref/Microsoft.CSharp.cs | 4 +- .../ref/Microsoft.VisualBasic.Core.cs | 4 +- .../FileIO/MalformedLineException.vb | 4 +- .../ref/Microsoft.Win32.Primitives.cs | 4 +- .../ref/System.Collections.Specialized.cs | 10 +- .../ref/System.Collections.cs | 14 +- .../ref/System.ComponentModel.Annotations.cs | 2 +- .../ref/System.ComponentModel.Composition.cs | 8 +- .../ref/System.ComponentModel.Primitives.cs | 4 +- .../System.ComponentModel.TypeConverter.cs | 10 +- ...stem.Configuration.ConfigurationManager.cs | 22 +- .../ref/System.Data.Common.cs | 50 ++-- .../System.Data.Odbc/ref/System.Data.Odbc.cs | 2 +- .../ref/System.Data.OleDb.cs | 2 +- .../ref/System.Diagnostics.EventLog.cs | 12 +- .../ref/System.Diagnostics.Tracing.cs | 2 +- ...tem.DirectoryServices.AccountManagement.cs | 18 +- .../ref/System.DirectoryServices.Protocols.cs | 14 +- .../ref/System.DirectoryServices.cs | 26 +- .../ref/System.Formats.Asn1.cs | 2 +- .../ref/System.Formats.Cbor.cs | 2 +- .../ref/System.IO.FileSystem.DriveInfo.cs | 2 +- .../ref/System.IO.FileSystem.Watcher.cs | 2 +- .../ref/System.IO.IsolatedStorage.cs | 2 +- .../ref/System.IO.Packaging.Serialization.cs | 4 +- .../ref/System.Management.cs | 12 +- .../ref/System.Net.HttpListener.cs | 2 +- .../System.Net.Mail/ref/System.Net.Mail.cs | 12 +- .../ref/System.Net.NetworkInformation.cs | 2 +- .../System.Net.Ping/ref/System.Net.Ping.cs | 2 +- .../ref/System.Net.Primitives.cs | 6 +- .../ref/System.Net.Requests.cs | 8 +- .../ref/System.Net.Security.cs | 6 +- .../ref/System.Net.WebHeaderCollection.cs | 4 +- .../ref/System.Net.WebProxy.cs | 2 +- .../ref/System.Net.WebSockets.cs | 2 +- ....Private.CoreLib.ManualShimTypeForwards.cs | 6 +- .../Context/Delegation/DelegatingType.cs | 2 +- .../ref/System.Reflection.Metadata.Manual.cs | 2 +- .../ref/System.Runtime.InteropServices.cs | 16 +- ...System.Runtime.Serialization.Formatters.cs | 24 +- ...System.Runtime.Serialization.Primitives.cs | 2 +- .../System.Runtime/ref/System.Runtime.cs | 234 +++++++++--------- .../ref/System.Security.AccessControl.cs | 2 +- .../ref/System.Security.Claims.cs | 6 +- .../ref/System.Security.Cryptography.cs | 6 +- .../ref/System.Security.Permissions.cs | 6 +- .../ref/System.Security.Principal.Windows.cs | 4 +- ...System.ServiceProcess.ServiceController.cs | 2 +- .../System.Text.Json/ref/System.Text.Json.cs | 4 +- .../ref/System.Text.RegularExpressions.cs | 6 +- .../System.Threading.Channels.netcoreapp.cs | 2 +- .../ref/System.Threading.Thread.cs | 6 +- .../System.Threading/ref/System.Threading.cs | 14 +- .../ref/System.Transactions.Local.cs | 10 +- .../ref/System.Windows.Extensions.cs | 2 +- .../ref/System.Xml.ReaderWriter.cs | 24 +- .../System.Xml.XPath/ref/System.Xml.XPath.cs | 4 +- 61 files changed, 339 insertions(+), 339 deletions(-) diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 6aa97a59d4fa93..4ed4d318fd746a 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -104,8 +104,8 @@ The PR that reveals the implementation of the ` throw Unexpected; public override bool IsSecurityTransparent => throw Unexpected; #if NET8_0_OR_GREATER - [Obsolete("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public override bool IsSerializable => throw Unexpected; public override bool IsSubclassOf(Type c) => throw Unexpected; diff --git a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs index 0614a447e3fb0a..619bb40feb9d36 100644 --- a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs +++ b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.cs @@ -68,7 +68,7 @@ public enum CSharpBinderFlags public partial class RuntimeBinderException : System.Exception { public RuntimeBinderException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RuntimeBinderException(string? message) { } @@ -77,7 +77,7 @@ public RuntimeBinderException(string? message, System.Exception? innerException) public partial class RuntimeBinderInternalCompilerException : System.Exception { public RuntimeBinderInternalCompilerException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeBinderInternalCompilerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RuntimeBinderInternalCompilerException(string? message) { } diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 99e6a9689236ec..b9f446cabedd5c 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -1296,7 +1296,7 @@ public static void WriteAllText(string file, string text, bool append, System.Te public partial class MalformedLineException : System.Exception { public MalformedLineException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MalformedLineException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MalformedLineException(string? message) { } @@ -1305,7 +1305,7 @@ public MalformedLineException(string? message, long lineNumber) { } public MalformedLineException(string? message, long lineNumber, System.Exception? innerException) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Always)] public long LineNumber { get { throw null; } set { } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb index faba3158df0fd7..396397b615ec1d 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/MalformedLineException.vb @@ -74,7 +74,7 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] - + Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) @@ -108,7 +108,7 @@ Namespace Microsoft.VisualBasic.FileIO ''' ''' ' [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] - + Public Overrides Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) If info IsNot Nothing Then ' Fix FxCop violation ValidateArgumentsOfPublicMethods. diff --git a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs index 2e5dad984adc4f..042ad4bbf0de6f 100644 --- a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs +++ b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.cs @@ -11,13 +11,13 @@ public partial class Win32Exception : System.Runtime.InteropServices.ExternalExc public Win32Exception() { } public Win32Exception(int error) { } public Win32Exception(int error, string? message) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Win32Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Win32Exception(string? message) { } public Win32Exception(string? message, System.Exception? innerException) { } public int NativeErrorCode { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } diff --git a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs index e7434e5a361440..b91fe8eb10820d 100644 --- a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs +++ b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs @@ -96,7 +96,7 @@ protected NameObjectCollectionBase(int capacity) { } protected NameObjectCollectionBase(int capacity, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use NameObjectCollectionBase(Int32, IEqualityComparer) instead.")] protected NameObjectCollectionBase(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameObjectCollectionBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual int Count { get { throw null; } } @@ -118,7 +118,7 @@ protected void BaseRemoveAt(int index) { } protected void BaseSet(int index, object? value) { } protected void BaseSet(string? name, object? value) { } public virtual System.Collections.IEnumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -147,7 +147,7 @@ public NameValueCollection(int capacity, System.Collections.IEqualityComparer? e [System.ObsoleteAttribute("This constructor has been deprecated. Use NameValueCollection(Int32, IEqualityComparer) instead.")] public NameValueCollection(int capacity, System.Collections.IHashCodeProvider? hashProvider, System.Collections.IComparer? comparer) { } public NameValueCollection(int capacity, System.Collections.Specialized.NameValueCollection col) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NameValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual string?[] AllKeys { get { throw null; } } @@ -173,7 +173,7 @@ public OrderedDictionary() { } public OrderedDictionary(System.Collections.IEqualityComparer? comparer) { } public OrderedDictionary(int capacity) { } public OrderedDictionary(int capacity, System.Collections.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OrderedDictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } @@ -191,7 +191,7 @@ public void Clear() { } public bool Contains(object key) { throw null; } public void CopyTo(System.Array array, int index) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Insert(int index, object key, object? value) { } diff --git a/src/libraries/System.Collections/ref/System.Collections.cs b/src/libraries/System.Collections/ref/System.Collections.cs index bbaf50bfac0eb2..b0272046b38412 100644 --- a/src/libraries/System.Collections/ref/System.Collections.cs +++ b/src/libraries/System.Collections/ref/System.Collections.cs @@ -57,7 +57,7 @@ public partial class LinkedList : System.Collections.Generic.ICollection, { public LinkedList() { } public LinkedList(System.Collections.Generic.IEnumerable collection) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int Count { get { throw null; } } @@ -80,7 +80,7 @@ public void CopyTo(T[] array, int index) { } public System.Collections.Generic.LinkedListNode? Find(T value) { throw null; } public System.Collections.Generic.LinkedListNode? FindLast(T value) { throw null; } public System.Collections.Generic.LinkedList.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -317,7 +317,7 @@ public SortedSet() { } public SortedSet(System.Collections.Generic.IComparer? comparer) { } public SortedSet(System.Collections.Generic.IEnumerable collection) { } public SortedSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IComparer Comparer { get { throw null; } } @@ -441,7 +441,7 @@ public Dictionary(System.Collections.Generic.IEnumerable? comparer) { } public Dictionary(int capacity) { } public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } @@ -467,7 +467,7 @@ public void Clear() { } public bool ContainsValue(TValue value) { throw null; } public int EnsureCapacity(int capacity) { throw null; } public System.Collections.Generic.Dictionary.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void OnDeserialization(object? sender) { } @@ -576,7 +576,7 @@ public HashSet(System.Collections.Generic.IEnumerable collection, System.Coll public HashSet(System.Collections.Generic.IEqualityComparer? comparer) { } public HashSet(int capacity) { } public HashSet(int capacity, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Collections.Generic.IEqualityComparer Comparer { get { throw null; } } @@ -592,7 +592,7 @@ public void CopyTo(T[] array, int arrayIndex, int count) { } public int EnsureCapacity(int capacity) { throw null; } public void ExceptWith(System.Collections.Generic.IEnumerable other) { } public System.Collections.Generic.HashSet.Enumerator GetEnumerator() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void IntersectWith(System.Collections.Generic.IEnumerable other) { } diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index b4ce293bacbac4..a46192e9dd95b6 100644 --- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -360,7 +360,7 @@ public partial class ValidationException : System.Exception { public ValidationException() { } public ValidationException(System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute? validatingAttribute, object? value) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ValidationException(string? message) { } diff --git a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs index 8cc1d010219d74..b9528f89e7a02b 100644 --- a/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs +++ b/src/libraries/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs @@ -56,7 +56,7 @@ public partial class CompositionContractMismatchException : System.Exception { public CompositionContractMismatchException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected CompositionContractMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -146,7 +146,7 @@ public partial class ImportCardinalityMismatchException : System.Exception { public ImportCardinalityMismatchException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ImportCardinalityMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -544,7 +544,7 @@ public partial class ComposablePartException : System.Exception { public ComposablePartException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ComposablePartException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -554,7 +554,7 @@ public ComposablePartException(string? message, System.ComponentModel.Compositio public ComposablePartException(string? message, System.Exception? innerException) { } public System.ComponentModel.Composition.Primitives.ICompositionElement? Element { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs index 031f558ab0e9a9..cb865483618587 100644 --- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs +++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs @@ -221,7 +221,7 @@ public InitializationEventAttribute(string eventName) { } public partial class InvalidAsynchronousStateException : System.ArgumentException { public InvalidAsynchronousStateException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidAsynchronousStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidAsynchronousStateException(string? message) { } @@ -230,7 +230,7 @@ public InvalidAsynchronousStateException(string? message, System.Exception? inne public partial class InvalidEnumArgumentException : System.ArgumentException { public InvalidEnumArgumentException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidEnumArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidEnumArgumentException(string? message) { } 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 c95e8743ef05d0..a558073df75981 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -721,7 +721,7 @@ public virtual void SetSavedLicenseKey(System.Type type, string key) { } } public partial class LicenseException : System.SystemException { - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LicenseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LicenseException(System.Type? type) { } @@ -729,7 +729,7 @@ public LicenseException(System.Type? type, object? instance) { } public LicenseException(System.Type? type, object? instance, string? message) { } public LicenseException(System.Type? type, object? instance, string? message, System.Exception? innerException) { } public System.Type? LicensedType { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1585,7 +1585,7 @@ public VersionConverter() { } public partial class WarningException : System.SystemException { public WarningException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WarningException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WarningException(string? message) { } @@ -1594,7 +1594,7 @@ public WarningException(string? message, string? helpUrl) { } public WarningException(string? message, string? helpUrl, string? helpTopic) { } public string? HelpTopic { get { throw null; } } public string? HelpUrl { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1612,7 +1612,7 @@ public partial class CheckoutException : System.Runtime.InteropServices.External { public static readonly System.ComponentModel.Design.CheckoutException Canceled; public CheckoutException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CheckoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CheckoutException(string? message) { } diff --git a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs index f4fb98eff74358..a3121e8525d77d 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs @@ -269,7 +269,7 @@ public partial class ConfigurationErrorsException : System.Configuration.Configu { public ConfigurationErrorsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ConfigurationErrorsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -291,7 +291,7 @@ public ConfigurationErrorsException(string message, System.Xml.XmlReader reader) public static int GetLineNumber(System.Xml.XmlNode node) { throw null; } public static int GetLineNumber(System.Xml.XmlReader reader) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -301,7 +301,7 @@ public partial class ConfigurationException : System.SystemException [System.ObsoleteAttribute("ConfigurationException has been deprecated. Use System.Configuration.ConfigurationErrorsException instead.")] public ConfigurationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -322,7 +322,7 @@ public ConfigurationException(string message, System.Xml.XmlNode node) { } public virtual int Line { get { throw null; } } public override string Message { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -472,7 +472,7 @@ public void CopyTo(System.Configuration.ConfigurationSection[] array, int index) public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -508,7 +508,7 @@ public void CopyTo(System.Configuration.ConfigurationSectionGroup[] array, int i public override System.Collections.IEnumerator GetEnumerator() { throw null; } public string GetKey(int index) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -889,7 +889,7 @@ internal PropertyInformationCollection() { } public void CopyTo(System.Configuration.PropertyInformation[] array, int index) { } public override System.Collections.IEnumerator GetEnumerator() { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1175,7 +1175,7 @@ public partial class SettingsPropertyIsReadOnlyException : System.Exception { public SettingsPropertyIsReadOnlyException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyIsReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1186,7 +1186,7 @@ public partial class SettingsPropertyNotFoundException : System.Exception { public SettingsPropertyNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1223,7 +1223,7 @@ public partial class SettingsPropertyWrongTypeException : System.Exception { public SettingsPropertyWrongTypeException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SettingsPropertyWrongTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1612,7 +1612,7 @@ public partial class ProviderException : System.Exception { public ProviderException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ProviderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs index df2e40a3628976..3cbdeed1263ce9 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -88,7 +88,7 @@ public void RemoveAt(int index) { } public partial class ConstraintException : System.Data.DataException { public ConstraintException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ConstraintException(string? s) { } @@ -196,7 +196,7 @@ public void RemoveAt(int index) { } public partial class DataException : System.SystemException { public DataException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataException(string? s) { } @@ -498,12 +498,12 @@ public partial class DataSet : System.ComponentModel.MarshalByValueComponent, Sy public DataSet() { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Members from serialized types may use dynamic code generation.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, bool ConstructSchema) { } public DataSet(string dataSetName) { } @@ -556,7 +556,7 @@ public void EndInit() { } public System.Data.DataSet? GetChanges() { throw null; } public System.Data.DataSet? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Xml.Schema.XmlSchema? GetSchemaSerializable() { throw null; } @@ -690,7 +690,7 @@ public partial class DataTable : System.ComponentModel.MarshalByValueComponent, protected internal bool fInitInProgress; public DataTable() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DataTable(string? tableName) { } @@ -766,7 +766,7 @@ public void EndLoadData() { } public System.Data.DataTable? GetChanges(System.Data.DataRowState rowStates) { throw null; } public static System.Xml.Schema.XmlSchemaComplexType GetDataTableSchema(System.Xml.Schema.XmlSchemaSet? schemaSet) { throw null; } public System.Data.DataRow[] GetErrors() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Type GetRowType() { throw null; } @@ -1180,7 +1180,7 @@ public DBConcurrencyException(string? message, System.Exception? inner, System.D public int RowCount { get { throw null; } } public void CopyToRows(System.Data.DataRow[] array) { } public void CopyToRows(System.Data.DataRow[] array, int arrayIndex) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -1217,7 +1217,7 @@ public enum DbType public partial class DeletedRowInaccessibleException : System.Data.DataException { public DeletedRowInaccessibleException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DeletedRowInaccessibleException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DeletedRowInaccessibleException(string? s) { } @@ -1226,7 +1226,7 @@ public DeletedRowInaccessibleException(string? message, System.Exception? innerE public partial class DuplicateNameException : System.Data.DataException { public DuplicateNameException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateNameException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateNameException(string? s) { } @@ -1260,7 +1260,7 @@ internal EnumerableRowCollection() { } public partial class EvaluateException : System.Data.InvalidExpressionException { public EvaluateException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EvaluateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EvaluateException(string? s) { } @@ -1443,7 +1443,7 @@ public partial interface IDbTransaction : System.IDisposable public partial class InRowChangingEventException : System.Data.DataException { public InRowChangingEventException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InRowChangingEventException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InRowChangingEventException(string? s) { } @@ -1467,7 +1467,7 @@ public virtual void CopyTo(System.Array ar, int index) { } public partial class InvalidConstraintException : System.Data.DataException { public InvalidConstraintException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidConstraintException(string? s) { } @@ -1476,7 +1476,7 @@ public InvalidConstraintException(string? message, System.Exception? innerExcept public partial class InvalidExpressionException : System.Data.DataException { public InvalidExpressionException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidExpressionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidExpressionException(string? s) { } @@ -1541,7 +1541,7 @@ public enum MissingMappingAction public partial class MissingPrimaryKeyException : System.Data.DataException { public MissingPrimaryKeyException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingPrimaryKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingPrimaryKeyException(string? s) { } @@ -1557,7 +1557,7 @@ public enum MissingSchemaAction public partial class NoNullAllowedException : System.Data.DataException { public NoNullAllowedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NoNullAllowedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NoNullAllowedException(string? s) { } @@ -1577,7 +1577,7 @@ public enum ParameterDirection public partial class PropertyCollection : System.Collections.Hashtable, System.ICloneable { public PropertyCollection() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override object Clone() { throw null; } @@ -1585,7 +1585,7 @@ protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info public partial class ReadOnlyException : System.Data.DataException { public ReadOnlyException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ReadOnlyException(string? s) { } @@ -1594,7 +1594,7 @@ public ReadOnlyException(string? message, System.Exception? innerException) { } public partial class RowNotInTableException : System.Data.DataException { public RowNotInTableException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RowNotInTableException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RowNotInTableException(string? s) { } @@ -1681,7 +1681,7 @@ public enum StatementType public partial class StrongTypingException : System.Data.DataException { public StrongTypingException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongTypingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongTypingException(string? message) { } @@ -1690,7 +1690,7 @@ public StrongTypingException(string? s, System.Exception? innerException) { } public partial class SyntaxErrorException : System.Data.InvalidExpressionException { public SyntaxErrorException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SyntaxErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SyntaxErrorException(string? s) { } @@ -1711,7 +1711,7 @@ public abstract partial class TypedTableBase : System.Data.DataTable, System. { protected TypedTableBase() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Members from serialized types may be trimmed if not referenced directly.")] - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.Data.EnumerableRowCollection Cast() { throw null; } @@ -1757,7 +1757,7 @@ public enum UpdateStatus public partial class VersionNotFoundException : System.Data.DataException { public VersionNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VersionNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VersionNotFoundException(string? s) { } @@ -2496,7 +2496,7 @@ public void Reset() { } public abstract partial class DbException : System.Runtime.InteropServices.ExternalException { protected DbException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DbException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected DbException(string? message) { } @@ -3779,7 +3779,7 @@ public SqlTruncateException(string? message, System.Exception? e) { } public partial class SqlTypeException : System.SystemException { public SqlTypeException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SqlTypeException(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext sc) { } public SqlTypeException(string? message) { } diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs index a58ceb180e3bd6..9eee7e3847b6b6 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs @@ -222,7 +222,7 @@ internal OdbcException() { } public System.Data.Odbc.OdbcErrorCollection Errors { get { throw null; } } public override string Source { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } 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 95e9dfcc662a9b..c5a31a8183cc84 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -260,7 +260,7 @@ internal OleDbException() { } [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)] public System.Data.OleDb.OleDbErrorCollection Errors { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs index a35f0f8314ecee..007bd0b4c2eff9 100644 --- a/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs +++ b/src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs @@ -228,7 +228,7 @@ public partial class EventLogException : System.Exception public EventLogException() { } protected EventLogException(int errorCode) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -236,7 +236,7 @@ public EventLogException(string message) { } public EventLogException(string message, System.Exception innerException) { } public override string Message { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -257,7 +257,7 @@ public partial class EventLogInvalidDataException : System.Diagnostics.Eventing. { public EventLogInvalidDataException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogInvalidDataException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -287,7 +287,7 @@ public partial class EventLogNotFoundException : System.Diagnostics.Eventing.Rea { public EventLogNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogNotFoundException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -304,7 +304,7 @@ public partial class EventLogProviderDisabledException : System.Diagnostics.Even { public EventLogProviderDisabledException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogProviderDisabledException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -340,7 +340,7 @@ public partial class EventLogReadingException : System.Diagnostics.Eventing.Read { public EventLogReadingException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected EventLogReadingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs index 88f6c7565f21f2..dacf67b8841e3b 100644 --- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs +++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs @@ -239,7 +239,7 @@ public EventSourceCreatedEventArgs() { } public partial class EventSourceException : System.Exception { public EventSourceException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EventSourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EventSourceException(string? message) { } 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 93a46965d882a5..4f7382064d92da 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs @@ -152,7 +152,7 @@ public partial class MultipleMatchesException : System.DirectoryServices.Account { public MultipleMatchesException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected MultipleMatchesException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -163,7 +163,7 @@ public partial class NoMatchingPrincipalException : System.DirectoryServices.Acc { public NoMatchingPrincipalException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected NoMatchingPrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -174,7 +174,7 @@ public partial class PasswordException : System.DirectoryServices.AccountManagem { public PasswordException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PasswordException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -277,7 +277,7 @@ public abstract partial class PrincipalException : System.SystemException { private protected PrincipalException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -286,7 +286,7 @@ public partial class PrincipalExistsException : System.DirectoryServices.Account { public PrincipalExistsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context){ } @@ -297,7 +297,7 @@ public partial class PrincipalOperationException : System.DirectoryServices.Acco { public PrincipalOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -307,7 +307,7 @@ public PrincipalOperationException(string message, System.Exception innerExcepti public PrincipalOperationException(string message, int errorCode) { } public int ErrorCode { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -335,7 +335,7 @@ public partial class PrincipalServerDownException : System.DirectoryServices.Acc { public PrincipalServerDownException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PrincipalServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) { } @@ -345,7 +345,7 @@ public PrincipalServerDownException(string message, System.Exception innerExcept public PrincipalServerDownException(string message, System.Exception innerException, int errorCode, string serverName) { } public PrincipalServerDownException(string message, int errorCode) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs index e56aef2cdfb279..32262da81be3e2 100644 --- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs +++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs @@ -47,7 +47,7 @@ public partial class BerConversionException : System.DirectoryServices.Protocols { public BerConversionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected BerConversionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -195,7 +195,7 @@ public partial class DirectoryException : System.Exception { public DirectoryException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -221,7 +221,7 @@ public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryR public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public DirectoryOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -229,7 +229,7 @@ public DirectoryOperationException(string message) { } public DirectoryOperationException(string message, System.Exception inner) { } public System.DirectoryServices.Protocols.DirectoryResponse Response { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -362,7 +362,7 @@ public LdapException(int errorCode, string message) { } public LdapException(int errorCode, string message, System.Exception inner) { } public LdapException(int errorCode, string message, string serverErrorMessage) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected LdapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -372,7 +372,7 @@ public LdapException(string message, System.Exception inner) { } public System.DirectoryServices.Protocols.PartialResultsCollection PartialResults { get { throw null; } } public string ServerErrorMessage { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -710,7 +710,7 @@ public TlsOperationException(System.DirectoryServices.Protocols.DirectoryRespons public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message) { } public TlsOperationException(System.DirectoryServices.Protocols.DirectoryResponse response, string message, System.Exception inner) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected TlsOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs index 9fa9c578479677..718084c2a9d79d 100644 --- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs +++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs @@ -256,7 +256,7 @@ public partial class DirectoryServicesCOMException : System.Runtime.InteropServi { public DirectoryServicesCOMException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected DirectoryServicesCOMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -265,7 +265,7 @@ public DirectoryServicesCOMException(string? message, System.Exception? inner) { public int ExtendedError { get { throw null; } } public string? ExtendedErrorMessage { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -540,7 +540,7 @@ public partial class ActiveDirectoryObjectExistsException : System.Exception { public ActiveDirectoryObjectExistsException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryObjectExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -551,7 +551,7 @@ public partial class ActiveDirectoryObjectNotFoundException : System.Exception, { public ActiveDirectoryObjectNotFoundException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryObjectNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -561,7 +561,7 @@ public ActiveDirectoryObjectNotFoundException(string? message, System.Type? type public string? Name { get { throw null; } } public System.Type? Type { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -570,7 +570,7 @@ public partial class ActiveDirectoryOperationException : System.Exception, Syste { public ActiveDirectoryOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -580,7 +580,7 @@ public ActiveDirectoryOperationException(string? message, System.Exception? inne public ActiveDirectoryOperationException(string? message, int errorCode) { } public int ErrorCode { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -744,7 +744,7 @@ public partial class ActiveDirectoryServerDownException : System.Exception, Syst { public ActiveDirectoryServerDownException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ActiveDirectoryServerDownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -756,7 +756,7 @@ public ActiveDirectoryServerDownException(string? message, int errorCode, string public override string Message { get { throw null; } } public string? Name { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -1312,7 +1312,7 @@ public partial class ForestTrustCollisionException : System.DirectoryServices.Ac { public ForestTrustCollisionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ForestTrustCollisionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1321,7 +1321,7 @@ public ForestTrustCollisionException(string? message, System.Exception? inner) { public ForestTrustCollisionException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? collisions) { } public System.DirectoryServices.ActiveDirectory.ForestTrustRelationshipCollisionCollection? Collisions { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -1704,7 +1704,7 @@ public partial class SyncFromAllServersOperationException : System.DirectoryServ { public SyncFromAllServersOperationException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected SyncFromAllServersOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -1713,7 +1713,7 @@ public SyncFromAllServersOperationException(string? message, System.Exception? i public SyncFromAllServersOperationException(string? message, System.Exception? inner, System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[]? errors) { } public System.DirectoryServices.ActiveDirectory.SyncFromAllServersErrorInformation[] ErrorInformation { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs index aec28e3a510f64..170081a2f3874d 100644 --- a/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs +++ b/src/libraries/System.Formats.Asn1/ref/System.Formats.Asn1.cs @@ -46,7 +46,7 @@ public partial class AsnContentException : System.Exception { public AsnContentException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected AsnContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs index 4218d52d773a88..ba7c538a80f8e8 100644 --- a/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs +++ b/src/libraries/System.Formats.Cbor/ref/System.Formats.Cbor.cs @@ -16,7 +16,7 @@ public enum CborConformanceMode public partial class CborContentException : System.Exception { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected CborContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs index f46b20b48cd894..8f432526a4afbf 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs @@ -26,7 +26,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class DriveNotFoundException : System.IO.IOException { public DriveNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DriveNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DriveNotFoundException(string? message) { } diff --git a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs index 74dbe9cb0da011..631b25d68bc1b6 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs @@ -55,7 +55,7 @@ protected void OnRenamed(System.IO.RenamedEventArgs e) { } public partial class InternalBufferOverflowException : System.SystemException { public InternalBufferOverflowException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InternalBufferOverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InternalBufferOverflowException(string? message) { } diff --git a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs index 32aad838e3de3f..8862726d230569 100644 --- a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs +++ b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs @@ -36,7 +36,7 @@ protected void InitStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, S public partial class IsolatedStorageException : System.Exception { public IsolatedStorageException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected IsolatedStorageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public IsolatedStorageException(string? message) { } diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs index 653fffa33320ce..58a03be2fa2f60 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.Serialization.cs @@ -9,12 +9,12 @@ namespace System.IO public partial class FileFormatException : System.FormatException { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected FileFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Management/ref/System.Management.cs b/src/libraries/System.Management/ref/System.Management.cs index 4125691110d33e..a7c68e9ce52f14 100644 --- a/src/libraries/System.Management/ref/System.Management.cs +++ b/src/libraries/System.Management/ref/System.Management.cs @@ -137,7 +137,7 @@ public partial class ManagementBaseObject : System.ComponentModel.Component, Sys { private protected ManagementBaseObject() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementBaseObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -169,7 +169,7 @@ public ManagementClass(System.Management.ManagementPath path) { } public ManagementClass(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } public ManagementClass(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementClass(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -243,7 +243,7 @@ public partial class ManagementException : System.SystemException { public ManagementException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -252,7 +252,7 @@ public ManagementException(string message, System.Exception innerException) { } public System.Management.ManagementStatus ErrorCode { get { throw null; } } public System.Management.ManagementBaseObject ErrorInformation { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -261,7 +261,7 @@ public partial class ManagementNamedValueCollection : System.Collections.Special { public ManagementNamedValueCollection() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementNamedValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -278,7 +278,7 @@ public ManagementObject(System.Management.ManagementPath path) { } public ManagementObject(System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } public ManagementObject(System.Management.ManagementScope scope, System.Management.ManagementPath path, System.Management.ObjectGetOptions options) { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ManagementObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } 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 3fcd77824a2fdb..361ed351e84084 100644 --- a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs +++ b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.cs @@ -55,7 +55,7 @@ public partial class HttpListenerException : System.ComponentModel.Win32Exceptio public HttpListenerException() { } public HttpListenerException(int errorCode) { } public HttpListenerException(int errorCode, string message) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected HttpListenerException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } diff --git a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs index b36772c0e68956..d35606bfa84304 100644 --- a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs +++ b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs @@ -214,13 +214,13 @@ public partial class SmtpException : System.Exception public SmtpException() { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode) { } public SmtpException(System.Net.Mail.SmtpStatusCode statusCode, string? message) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public SmtpException(string? message) { } public SmtpException(string? message, System.Exception? innerException) { } public System.Net.Mail.SmtpStatusCode StatusCode { get { throw null; } set { } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -229,28 +229,28 @@ public partial class SmtpFailedRecipientException : System.Net.Mail.SmtpExceptio public SmtpFailedRecipientException() { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient) { } public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient, string? serverResponse) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientException(string? message) { } public SmtpFailedRecipientException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientException(string? message, string? failedRecipient, System.Exception? innerException) { } public string? FailedRecipient { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } public partial class SmtpFailedRecipientsException : System.Net.Mail.SmtpFailedRecipientException { public SmtpFailedRecipientsException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SmtpFailedRecipientsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SmtpFailedRecipientsException(string? message) { } public SmtpFailedRecipientsException(string? message, System.Exception? innerException) { } public SmtpFailedRecipientsException(string? message, System.Net.Mail.SmtpFailedRecipientException[] innerExceptions) { } public System.Net.Mail.SmtpFailedRecipientException[] InnerExceptions { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } diff --git a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs index 9b6429128bf998..8824cccc08e929 100644 --- a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs +++ b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs @@ -413,7 +413,7 @@ public partial class NetworkInformationException : System.ComponentModel.Win32Ex { public NetworkInformationException() { } public NetworkInformationException(int errorCode) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NetworkInformationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } diff --git a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs index 52afbbd6997a6d..4b4c048a4aa031 100644 --- a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs +++ b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs @@ -77,7 +77,7 @@ public partial class PingCompletedEventArgs : System.ComponentModel.AsyncComplet public delegate void PingCompletedEventHandler(object sender, System.Net.NetworkInformation.PingCompletedEventArgs e); public partial class PingException : System.InvalidOperationException { - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public PingException(string? message) { } diff --git a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs index b1841b8e482725..895312c029ac25 100644 --- a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -89,10 +89,10 @@ public void SetCookies(System.Uri uri, string cookieHeader) { } public partial class CookieException : System.FormatException, System.Runtime.Serialization.ISerializable { public CookieException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -508,7 +508,7 @@ public partial class SocketException : System.ComponentModel.Win32Exception public SocketException() { } public SocketException(int errorCode) { } public SocketException(int errorCode, string? message) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override int ErrorCode { get { throw null; } } 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 d001a673e07a6c..02c97895e7c4de 100644 --- a/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs +++ b/src/libraries/System.Net.Requests/ref/System.Net.Requests.cs @@ -299,11 +299,11 @@ public partial interface IWebRequestCreate public partial class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public ProtocolViolationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ProtocolViolationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public ProtocolViolationException(string? message) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } @@ -311,7 +311,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class WebException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable { public WebException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebException(string? message) { } @@ -320,7 +320,7 @@ public WebException(string? message, System.Exception? innerException, System.Ne public WebException(string? message, System.Net.WebExceptionStatus status) { } public System.Net.WebResponse? Response { get { throw null; } } public System.Net.WebExceptionStatus Status { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } diff --git a/src/libraries/System.Net.Security/ref/System.Net.Security.cs b/src/libraries/System.Net.Security/ref/System.Net.Security.cs index a0e2f011ea5527..c6b5ad00e1904a 100644 --- a/src/libraries/System.Net.Security/ref/System.Net.Security.cs +++ b/src/libraries/System.Net.Security/ref/System.Net.Security.cs @@ -674,7 +674,7 @@ namespace System.Security.Authentication public partial class AuthenticationException : System.SystemException { public AuthenticationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AuthenticationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public AuthenticationException(string? message) { } @@ -683,7 +683,7 @@ public AuthenticationException(string? message, System.Exception? innerException public partial class InvalidCredentialException : System.Security.Authentication.AuthenticationException { public InvalidCredentialException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCredentialException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public InvalidCredentialException(string? message) { } @@ -694,7 +694,7 @@ namespace System.Security.Authentication.ExtendedProtection { public partial class ExtendedProtectionPolicy : System.Runtime.Serialization.ISerializable { - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement) { } diff --git a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs index 002b2c2bf522ef..7b1dbfc2f878a5 100644 --- a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs +++ b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs @@ -86,7 +86,7 @@ public enum HttpResponseHeader public partial class WebHeaderCollection : System.Collections.Specialized.NameValueCollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable { public WebHeaderCollection() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[] AllKeys { get { throw null; } } @@ -104,7 +104,7 @@ public override void Clear() { } public override string? Get(string? name) { throw null; } public override System.Collections.IEnumerator GetEnumerator() { throw null; } public override string GetKey(int index) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public override string[]? GetValues(int index) { throw null; } diff --git a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs index 634590620d4ee0..73632bfd071161 100644 --- a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs +++ b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.cs @@ -15,7 +15,7 @@ public partial interface IWebProxyScript public partial class WebProxy : System.Net.IWebProxy, System.Runtime.Serialization.ISerializable { public WebProxy() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WebProxy(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public WebProxy(string? Address) { } diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs index 58b25571e49972..e3d230708b3f23 100644 --- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs +++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs @@ -106,7 +106,7 @@ public WebSocketException(string? message) { } public WebSocketException(string? message, System.Exception? innerException) { } public override int ErrorCode { get { throw null; } } public System.Net.WebSockets.WebSocketError WebSocketErrorCode { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs index d2e003ecb78ccc..0a93320ccff1eb 100644 --- a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs +++ b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs @@ -25,7 +25,7 @@ internal OrdinalComparer() { } public override int GetHashCode() { throw null; } public override int GetHashCode(string obj) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class UnitySerializationHolder : System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable { public UnitySerializationHolder(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -91,7 +91,7 @@ public GenericEqualityComparer() { } } public partial class NonRandomizedStringEqualityComparer : System.Collections.Generic.IEqualityComparer, System.Runtime.Serialization.ISerializable { - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NonRandomizedStringEqualityComparer(System.Runtime.Serialization.SerializationInfo information, System.Runtime.Serialization.StreamingContext context) { } public virtual bool Equals(string? x, string? y) { throw null; } @@ -142,7 +142,7 @@ public ContractException(System.Diagnostics.Contracts.ContractFailureKind kind, public string Failure { get { throw null; } } public System.Diagnostics.Contracts.ContractFailureKind Kind { get { throw null; } } public string? UserMessage { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs index 199be6227ddd52..bd7ef3ff90eaeb 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingType.cs @@ -110,7 +110,7 @@ public override bool IsSecurityTransparent } #if NET8_0_OR_GREATER - [Obsolete("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] #endif public override bool IsSerializable { diff --git a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs index d690057f4e5870..17093fb7e92161 100644 --- a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs +++ b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.Manual.cs @@ -17,7 +17,7 @@ public readonly partial struct AssemblyReference public partial class ImageFormatLimitationException : System.Exception { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index c94f59d597dada..78a92c9dbdadb4 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -345,7 +345,7 @@ public DataMisalignedException(string? message, System.Exception? innerException public partial class DllNotFoundException : System.TypeLoadException { public DllNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DllNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DllNotFoundException(string? message) { } @@ -512,7 +512,7 @@ public static void Combine(object rcw, System.Guid iid, int dispid, System.Deleg public partial class COMException : System.Runtime.InteropServices.ExternalException { public COMException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected COMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public COMException(string? message) { } @@ -752,7 +752,7 @@ public InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType in public partial class InvalidComObjectException : System.SystemException { public InvalidComObjectException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidComObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidComObjectException(string? message) { } @@ -761,7 +761,7 @@ public InvalidComObjectException(string? message, System.Exception? inner) { } public partial class InvalidOleVariantTypeException : System.SystemException { public InvalidOleVariantTypeException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOleVariantTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOleVariantTypeException(string? message) { } @@ -1062,7 +1062,7 @@ public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanaged public partial class MarshalDirectiveException : System.SystemException { public MarshalDirectiveException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MarshalDirectiveException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MarshalDirectiveException(string? message) { } @@ -1403,7 +1403,7 @@ public ProgIdAttribute(string progId) { } public partial class SafeArrayRankMismatchException : System.SystemException { public SafeArrayRankMismatchException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayRankMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayRankMismatchException(string? message) { } @@ -1412,7 +1412,7 @@ public SafeArrayRankMismatchException(string? message, System.Exception? inner) public partial class SafeArrayTypeMismatchException : System.SystemException { public SafeArrayTypeMismatchException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SafeArrayTypeMismatchException(string? message) { } @@ -1421,7 +1421,7 @@ public SafeArrayTypeMismatchException(string? message, System.Exception? inner) public partial class SEHException : System.Runtime.InteropServices.ExternalException { public SEHException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SEHException(string? message) { } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs index fdbc190e50fb11..b65239f8e0eb48 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs @@ -47,7 +47,7 @@ protected virtual void WriteMember(string memberName, object? data) { } protected abstract void WriteUInt64(ulong val, string name); protected abstract void WriteValueType(object obj, string name, System.Type memberType); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class FormatterConverter : System.Runtime.Serialization.IFormatterConverter { public FormatterConverter() { } @@ -73,7 +73,7 @@ public FormatterConverter() { } [System.CLSCompliantAttribute(false)] public ulong ToUInt64(object value) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public static partial class FormatterServices { public static void CheckTypeSecurity(System.Type t, System.Runtime.Serialization.Formatters.TypeFilterLevel securityLevel) { } @@ -99,27 +99,27 @@ public partial interface IFormatter [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")] void Serialize(System.IO.Stream serializationStream, object graph); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISerializationSurrogate { void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector? selector); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISurrogateSelector { void ChainSelector(System.Runtime.Serialization.ISurrogateSelector selector); System.Runtime.Serialization.ISurrogateSelector? GetNextSelector(); System.Runtime.Serialization.ISerializationSurrogate? GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectIDGenerator { public ObjectIDGenerator() { } public virtual long GetId(object obj, out bool firstTime) { throw null; } public virtual long HasId(object obj, out bool firstTime) { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class ObjectManager { public ObjectManager(System.Runtime.Serialization.ISurrogateSelector? selector, System.Runtime.Serialization.StreamingContext context) { } @@ -148,7 +148,7 @@ protected SerializationBinder() { } public virtual void BindToName(System.Type serializedType, out string? assemblyName, out string? typeName) { throw null; } public abstract System.Type? BindToType(string assemblyName, string typeName); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SerializationObjectManager { public SerializationObjectManager(System.Runtime.Serialization.StreamingContext context) { } @@ -156,7 +156,7 @@ public void RaiseOnSerializedEvent() { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("SerializationObjectManager is not trim compatible because the type of objects being managed cannot be statically discovered.")] public void RegisterObject(object obj) { } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector { public SurrogateSelector() { } @@ -169,26 +169,26 @@ public virtual void RemoveSurrogate(System.Type type, System.Runtime.Serializati } namespace System.Runtime.Serialization.Formatters { - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterAssemblyStyle { Simple = 0, Full = 1, } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum FormatterTypeStyle { TypesWhenNeeded = 0, TypesAlways = 1, XsdString = 2, } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFieldInfo { string[]? FieldNames { get; set; } System.Type[]? FieldTypes { get; set; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum TypeFilterLevel { Low = 2, diff --git a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs index c893e21b3b5da7..0ae13fef85681f 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs +++ b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.cs @@ -66,7 +66,7 @@ public IgnoreDataMemberAttribute() { } public partial class InvalidDataContractException : System.Exception { public InvalidDataContractException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidDataContractException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidDataContractException(string? message) { } diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index b9ff5e52dd7ab5..853ee0518aa4a8 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -46,7 +46,7 @@ namespace System public partial class AccessViolationException : System.SystemException { public AccessViolationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AccessViolationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AccessViolationException(string? message) { } @@ -96,7 +96,7 @@ public partial class AggregateException : System.Exception public AggregateException() { } public AggregateException(System.Collections.Generic.IEnumerable innerExceptions) { } public AggregateException(params System.Exception[] innerExceptions) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AggregateException(string? message) { } @@ -107,7 +107,7 @@ public AggregateException(string? message, params System.Exception[] innerExcept public override string Message { get { throw null; } } public System.AggregateException Flatten() { throw null; } public override System.Exception GetBaseException() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Handle(System.Func predicate) { } @@ -232,7 +232,7 @@ internal AppDomainSetup() { } public partial class AppDomainUnloadedException : System.SystemException { public AppDomainUnloadedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AppDomainUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AppDomainUnloadedException(string? message) { } @@ -241,7 +241,7 @@ public AppDomainUnloadedException(string? message, System.Exception? innerExcept public partial class ApplicationException : System.Exception { public ApplicationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ApplicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ApplicationException(string? message) { } @@ -279,7 +279,7 @@ public void End() { } public partial class ArgumentException : System.SystemException { public ArgumentException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentException(string? message) { } @@ -288,7 +288,7 @@ public ArgumentException(string? message, string? paramName) { } public ArgumentException(string? message, string? paramName, System.Exception? innerException) { } public override string Message { get { throw null; } } public virtual string? ParamName { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfNullOrEmpty([System.Diagnostics.CodeAnalysis.NotNullAttribute] string? argument, [System.Runtime.CompilerServices.CallerArgumentExpression("argument")] string? paramName = null) { throw null; } @@ -296,7 +296,7 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public partial class ArgumentNullException : System.ArgumentException { public ArgumentNullException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentNullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentNullException(string? paramName) { } @@ -309,7 +309,7 @@ public ArgumentNullException(string? paramName, string? message) { } public partial class ArgumentOutOfRangeException : System.ArgumentException { public ArgumentOutOfRangeException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArgumentOutOfRangeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArgumentOutOfRangeException(string? paramName) { } @@ -318,7 +318,7 @@ public ArgumentOutOfRangeException(string? paramName, object? actualValue, strin public ArgumentOutOfRangeException(string? paramName, string? message) { } public virtual object? ActualValue { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIfEqual(T value, T other, [System.Runtime.CompilerServices.CallerArgumentExpression(nameof(value))] string? paramName = null) where T : System.IEquatable? { throw null; } @@ -334,7 +334,7 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public partial class ArithmeticException : System.SystemException { public ArithmeticException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArithmeticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArithmeticException(string? message) { } @@ -517,7 +517,7 @@ void System.Collections.IEnumerator.Reset() { } public partial class ArrayTypeMismatchException : System.SystemException { public ArrayTypeMismatchException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ArrayTypeMismatchException(string? message) { } @@ -603,7 +603,7 @@ public AttributeUsageAttribute(System.AttributeTargets validOn) { } public partial class BadImageFormatException : System.SystemException { public BadImageFormatException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BadImageFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BadImageFormatException(string? message) { } @@ -613,7 +613,7 @@ public BadImageFormatException(string? message, string? fileName, System.Excepti public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -889,7 +889,7 @@ public static void SetByte(System.Array array, int index, byte value) { } public partial class CannotUnloadAppDomainException : System.SystemException { public CannotUnloadAppDomainException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CannotUnloadAppDomainException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CannotUnloadAppDomainException(string? message) { } @@ -1091,7 +1091,7 @@ protected ContextBoundObject() { } public partial class ContextMarshalException : System.SystemException { public ContextMarshalException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ContextMarshalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ContextMarshalException(string? message) { } @@ -1900,7 +1900,7 @@ public sealed partial class DBNull : System.IConvertible, System.Runtime.Seriali { internal DBNull() { } public static readonly System.DBNull Value; - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.TypeCode GetTypeCode() { throw null; } @@ -2156,7 +2156,7 @@ protected Delegate([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAt public override int GetHashCode() { throw null; } public virtual System.Delegate[] GetInvocationList() { throw null; } protected virtual System.Reflection.MethodInfo GetMethodImpl() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.Delegate? d1, System.Delegate? d2) { throw null; } @@ -2168,7 +2168,7 @@ public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo public partial class DivideByZeroException : System.ArithmeticException { public DivideByZeroException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DivideByZeroException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DivideByZeroException(string? message) { } @@ -2368,7 +2368,7 @@ public DivideByZeroException(string? message, System.Exception? innerException) public partial class DuplicateWaitObjectException : System.ArgumentException { public DuplicateWaitObjectException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DuplicateWaitObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DuplicateWaitObjectException(string? parameterName) { } @@ -2378,7 +2378,7 @@ public DuplicateWaitObjectException(string? parameterName, string? message) { } public partial class EntryPointNotFoundException : System.TypeLoadException { public EntryPointNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EntryPointNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EntryPointNotFoundException(string? message) { } @@ -2574,7 +2574,7 @@ public EventArgs() { } public partial class Exception : System.Runtime.Serialization.ISerializable { public Exception() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Exception(string? message) { } @@ -2590,7 +2590,7 @@ public Exception(string? message, System.Exception? innerException) { } [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected event System.EventHandler? SerializeObjectState { add { } remove { } } public virtual System.Exception GetBaseException() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public new System.Type GetType() { throw null; } @@ -2606,7 +2606,7 @@ public ExecutionEngineException(string? message, System.Exception? innerExceptio public partial class FieldAccessException : System.MemberAccessException { public FieldAccessException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FieldAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FieldAccessException(string? message) { } @@ -2620,7 +2620,7 @@ public FlagsAttribute() { } public partial class FormatException : System.SystemException { public FormatException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FormatException(string? message) { } @@ -3862,7 +3862,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class InvalidCastException : System.SystemException { public InvalidCastException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidCastException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidCastException(string? message) { } @@ -3872,7 +3872,7 @@ public InvalidCastException(string? message, int errorCode) { } public partial class InvalidOperationException : System.SystemException { public InvalidOperationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidOperationException(string? message) { } @@ -3887,7 +3887,7 @@ public InvalidProgramException(string? message, System.Exception? inner) { } public partial class InvalidTimeZoneException : System.Exception { public InvalidTimeZoneException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidTimeZoneException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidTimeZoneException(string? message) { } @@ -4174,7 +4174,7 @@ public static partial class MathF public partial class MemberAccessException : System.SystemException { public MemberAccessException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MemberAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MemberAccessException(string? message) { } @@ -4209,7 +4209,7 @@ public void CopyTo(System.Memory destination) { } public partial class MethodAccessException : System.MemberAccessException { public MethodAccessException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MethodAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MethodAccessException(string? message) { } @@ -4226,7 +4226,7 @@ public enum MidpointRounding public partial class MissingFieldException : System.MissingMemberException { public MissingFieldException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingFieldException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingFieldException(string? message) { } @@ -4240,21 +4240,21 @@ public partial class MissingMemberException : System.MemberAccessException protected string? MemberName; protected byte[]? Signature; public MissingMemberException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMemberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMemberException(string? message) { } public MissingMemberException(string? message, System.Exception? inner) { } public MissingMemberException(string? className, string? memberName) { } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class MissingMethodException : System.MissingMemberException { public MissingMethodException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingMethodException(string? message) { } @@ -4307,7 +4307,7 @@ public abstract partial class MulticastDelegate : System.Delegate public sealed override int GetHashCode() { throw null; } public sealed override System.Delegate[] GetInvocationList() { throw null; } protected override System.Reflection.MethodInfo GetMethodImpl() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool operator ==(System.MulticastDelegate? d1, System.MulticastDelegate? d2) { throw null; } @@ -4330,7 +4330,7 @@ public partial class NotFiniteNumberException : System.ArithmeticException { public NotFiniteNumberException() { } public NotFiniteNumberException(double offendingNumber) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotFiniteNumberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotFiniteNumberException(string? message) { } @@ -4338,14 +4338,14 @@ public NotFiniteNumberException(string? message, double offendingNumber) { } public NotFiniteNumberException(string? message, double offendingNumber, System.Exception? innerException) { } public NotFiniteNumberException(string? message, System.Exception? innerException) { } public double OffendingNumber { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } public partial class NotImplementedException : System.SystemException { public NotImplementedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotImplementedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotImplementedException(string? message) { } @@ -4354,7 +4354,7 @@ public NotImplementedException(string? message, System.Exception? inner) { } public partial class NotSupportedException : System.SystemException { public NotSupportedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NotSupportedException(string? message) { } @@ -4385,7 +4385,7 @@ public partial struct Nullable where T : struct public partial class NullReferenceException : System.SystemException { public NullReferenceException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected NullReferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public NullReferenceException(string? message) { } @@ -4405,7 +4405,7 @@ public Object() { } } public partial class ObjectDisposedException : System.InvalidOperationException { - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectDisposedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ObjectDisposedException(string? objectName) { } @@ -4413,7 +4413,7 @@ public ObjectDisposedException(string? message, System.Exception? innerException public ObjectDisposedException(string? objectName, string? message) { } public override string Message { get { throw null; } } public string ObjectName { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void ThrowIf([System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)] bool condition, object instance) => throw null; @@ -4438,7 +4438,7 @@ public OperatingSystem(System.PlatformID platform, System.Version version) { } public System.Version Version { get { throw null; } } public string VersionString { get { throw null; } } public object Clone() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsAndroid() { throw null; } @@ -4469,7 +4469,7 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S public partial class OperationCanceledException : System.SystemException { public OperationCanceledException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OperationCanceledException(string? message) { } @@ -4482,7 +4482,7 @@ public OperationCanceledException(System.Threading.CancellationToken token) { } public partial class OutOfMemoryException : System.SystemException { public OutOfMemoryException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OutOfMemoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OutOfMemoryException(string? message) { } @@ -4491,7 +4491,7 @@ public OutOfMemoryException(string? message, System.Exception? innerException) { public partial class OverflowException : System.ArithmeticException { public OverflowException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected OverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public OverflowException(string? message) { } @@ -4521,7 +4521,7 @@ public enum PlatformID public partial class PlatformNotSupportedException : System.NotSupportedException { public PlatformNotSupportedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PlatformNotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PlatformNotSupportedException(string? message) { } @@ -4576,7 +4576,7 @@ public void Shuffle(T[] values) { } public partial class RankException : System.SystemException { public RankException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RankException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RankException(string? message) { } @@ -4668,7 +4668,7 @@ public partial struct RuntimeFieldHandle : System.IEquatable : System.Runtime.Serialization.ISer public WeakReference(T target) { } public WeakReference(T target, bool trackResurrection) { } ~WeakReference() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void SetTarget(T target) { } @@ -7450,7 +7450,7 @@ public sealed partial class Comparer : System.Collections.IComparer, System.Runt public static readonly System.Collections.Comparer DefaultInvariant; public Comparer(System.Globalization.CultureInfo culture) { } public int Compare(object? a, object? b) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -7486,7 +7486,7 @@ public Hashtable(int capacity, float loadFactor) { } public Hashtable(int capacity, float loadFactor, System.Collections.IEqualityComparer? equalityComparer) { } [System.ObsoleteAttribute("This constructor has been deprecated. Use Hashtable(int, float, IEqualityComparer) instead.")] public Hashtable(int capacity, float loadFactor, System.Collections.IHashCodeProvider? hcp, System.Collections.IComparer? comparer) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Hashtable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.ObsoleteAttribute("Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.")] @@ -7511,7 +7511,7 @@ public virtual void Clear() { } public virtual void CopyTo(System.Array array, int arrayIndex) { } public virtual System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } protected virtual int GetHash(object key) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual bool KeyEquals(object? item, object key) { throw null; } @@ -7693,7 +7693,7 @@ public partial interface ISet : System.Collections.Generic.ICollection, Sy public partial class KeyNotFoundException : System.SystemException { public KeyNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected KeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public KeyNotFoundException(string? message) { } @@ -8589,7 +8589,7 @@ public void ClearCachedData() { } public partial class CultureNotFoundException : System.ArgumentException { public CultureNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CultureNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CultureNotFoundException(string? message) { } @@ -8602,7 +8602,7 @@ public CultureNotFoundException(string? paramName, string? invalidCultureName, s public virtual int? InvalidCultureId { get { throw null; } } public virtual string? InvalidCultureName { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -9469,7 +9469,7 @@ public void MoveTo(string destDirName) { } public partial class DirectoryNotFoundException : System.IO.IOException { public DirectoryNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected DirectoryNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public DirectoryNotFoundException(string? message) { } @@ -9478,7 +9478,7 @@ public DirectoryNotFoundException(string? message, System.Exception? innerExcept public partial class EndOfStreamException : System.IO.IOException { public EndOfStreamException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected EndOfStreamException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EndOfStreamException(string? message) { } @@ -9657,7 +9657,7 @@ public void MoveTo(string destFileName, bool overwrite) { } public partial class FileLoadException : System.IO.IOException { public FileLoadException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileLoadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileLoadException(string? message) { } @@ -9667,7 +9667,7 @@ public FileLoadException(string? message, string? fileName, System.Exception? in public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -9684,7 +9684,7 @@ public enum FileMode public partial class FileNotFoundException : System.IO.IOException { public FileNotFoundException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public FileNotFoundException(string? message) { } @@ -9694,7 +9694,7 @@ public FileNotFoundException(string? message, string? fileName, System.Exception public string? FileName { get { throw null; } } public string? FusionLog { get { throw null; } } public override string Message { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -9804,7 +9804,7 @@ public abstract partial class FileSystemInfo : System.MarshalByRefObject, System protected string FullPath; protected string OriginalPath; protected FileSystemInfo() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public System.IO.FileAttributes Attributes { get { throw null; } set { } } @@ -9822,7 +9822,7 @@ protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, Sy public System.IO.UnixFileMode UnixFileMode { get { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("windows")] set { } } public void CreateAsSymbolicLink(string pathToTarget) { } public abstract void Delete(); - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public void Refresh() { } @@ -9843,7 +9843,7 @@ public InvalidDataException(string? message, System.Exception? innerException) { public partial class IOException : System.SystemException { public IOException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected IOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public IOException(string? message) { } @@ -9961,7 +9961,7 @@ public static partial class Path public partial class PathTooLongException : System.IO.IOException { public PathTooLongException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected PathTooLongException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PathTooLongException(string? message) { } @@ -10872,7 +10872,7 @@ public virtual event System.Reflection.ModuleResolveEventHandler? ModuleResolve public virtual System.Reflection.Module[] GetModules(bool getResourceModules) { throw null; } public virtual System.Reflection.AssemblyName GetName() { throw null; } public virtual System.Reflection.AssemblyName GetName(bool copiedName) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Assembly references might be removed")] @@ -11048,7 +11048,7 @@ public AssemblyName(string assemblyName) { } public System.Configuration.Assemblies.AssemblyVersionCompatibility VersionCompatibility { get { throw null; } set { } } public object Clone() { throw null; } public static System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public byte[]? GetPublicKey() { throw null; } @@ -11218,7 +11218,7 @@ public static partial class CustomAttributeExtensions public partial class CustomAttributeFormatException : System.FormatException { public CustomAttributeFormatException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CustomAttributeFormatException(string? message) { } @@ -11330,7 +11330,7 @@ public enum FieldAttributes Static = 16, InitOnly = 32, Literal = 64, - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] NotSerialized = 128, HasFieldRVA = 256, SpecialName = 512, @@ -11352,7 +11352,7 @@ protected FieldInfo() { } public bool IsFamilyOrAssembly { get { throw null; } } public bool IsInitOnly { get { throw null; } } public bool IsLiteral { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public bool IsNotSerialized { get { throw null; } } public bool IsPinvokeImpl { get { throw null; } } public bool IsPrivate { get { throw null; } } @@ -11420,7 +11420,7 @@ public static partial class IntrospectionExtensions public partial class InvalidFilterCriteriaException : System.ApplicationException { public InvalidFilterCriteriaException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected InvalidFilterCriteriaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public InvalidFilterCriteriaException(string? message) { } @@ -11678,7 +11678,7 @@ protected Module() { } public System.Reflection.MethodInfo[] GetMethods() { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Methods might be removed")] public virtual System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags) { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public virtual void GetPEKind(out System.Reflection.PortableExecutableKinds peKind, out System.Reflection.ImageFileMachine machine) { throw null; } @@ -11803,7 +11803,7 @@ protected ParameterInfo() { } public virtual System.Collections.Generic.IList GetCustomAttributesData() { throw null; } public virtual System.Type GetModifiedParameterType() { throw null; } public virtual System.Type[] GetOptionalCustomModifiers() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { throw null; } public virtual System.Type[] GetRequiredCustomModifiers() { throw null; } @@ -11906,7 +11906,7 @@ public ReflectionTypeLoadException(System.Type?[]? classes, System.Exception?[]? public System.Exception?[] LoaderExceptions { get { throw null; } } public override string Message { get { throw null; } } public System.Type?[] Types { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -11943,7 +11943,7 @@ public partial class StrongNameKeyPair : System.Runtime.Serialization.IDeseriali { public StrongNameKeyPair(byte[] keyPairArray) { } public StrongNameKeyPair(System.IO.FileStream keyPairFile) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected StrongNameKeyPair(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public StrongNameKeyPair(string keyPairContainer) { } @@ -11954,7 +11954,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TargetException : System.ApplicationException { public TargetException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TargetException(string? message) { } @@ -11996,7 +11996,7 @@ public enum TypeAttributes SpecialName = 1024, RTSpecialName = 2048, Import = 4096, - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] Serializable = 8192, WindowsRuntime = 16384, UnicodeClass = 65536, @@ -12132,7 +12132,7 @@ public partial interface IResourceReader : System.Collections.IEnumerable, Syste public partial class MissingManifestResourceException : System.SystemException { public MissingManifestResourceException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected MissingManifestResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingManifestResourceException(string? message) { } public MissingManifestResourceException(string? message, System.Exception? inner) { } @@ -12140,7 +12140,7 @@ public MissingManifestResourceException(string? message, System.Exception? inner public partial class MissingSatelliteAssemblyException : System.SystemException { public MissingSatelliteAssemblyException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected MissingSatelliteAssemblyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public MissingSatelliteAssemblyException(string? message) { } @@ -12896,7 +12896,7 @@ public sealed partial class RuntimeWrappedException : System.Exception { public RuntimeWrappedException(object thrownObject) { } public object WrappedException { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -12944,7 +12944,7 @@ public SwitchExpressionException(string? message) { } public SwitchExpressionException(string? message, System.Exception? innerException) { } public override string Message { get { throw null; } } public object? UnmatchedValue { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } @@ -13196,7 +13196,7 @@ public void SetHandleAsInvalid() { } public partial class ExternalException : System.SystemException { public ExternalException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ExternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ExternalException(string? message) { } @@ -13507,7 +13507,7 @@ public partial interface IDeserializationCallback void OnDeserialization(object? sender); } [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IFormatterConverter { object Convert(object value, System.Type type); @@ -13528,19 +13528,19 @@ public partial interface IFormatterConverter uint ToUInt32(object value); ulong ToUInt64(object value); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface IObjectReference { object GetRealObject(System.Runtime.Serialization.StreamingContext context); } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public partial interface ISafeSerializationData { void CompleteDeserialization(object deserialized); } public partial interface ISerializable { - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); } [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)] @@ -13569,7 +13569,7 @@ public sealed partial class OptionalFieldAttribute : System.Attribute public OptionalFieldAttribute() { } public int VersionAdded { get { throw null; } set { } } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SafeSerializationEventArgs : System.EventArgs { internal SafeSerializationEventArgs() { } @@ -13587,7 +13587,7 @@ public readonly partial struct SerializationEntry public partial class SerializationException : System.SystemException { public SerializationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SerializationException(string? message) { } @@ -13596,10 +13596,10 @@ public SerializationException(string? message, System.Exception? innerException) public sealed partial class SerializationInfo { [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter) { } [System.CLSCompliantAttribute(false)] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust) { } public string AssemblyName { get { throw null; } set { } } public string FullTypeName { get { throw null; } set { } } @@ -13665,18 +13665,18 @@ public readonly partial struct StreamingContext { private readonly object _dummy; private readonly int _dummyPrimitive; - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state) { throw null; } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public StreamingContext(System.Runtime.Serialization.StreamingContextStates state, object? additional) { throw null; } public object? Context { get { throw null; } } - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public System.Runtime.Serialization.StreamingContextStates State { get { throw null; } } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } } [System.FlagsAttribute] - [System.ObsoleteAttribute("Legacy formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public enum StreamingContextStates { CrossProcess = 1, @@ -13928,7 +13928,7 @@ public void AddChild(System.Security.SecurityElement child) { } public partial class SecurityException : System.SystemException { public SecurityException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SecurityException(string? message) { } @@ -13945,7 +13945,7 @@ public SecurityException(string? message, System.Type? type, string? state) { } public object? PermitOnlySetInstance { get { throw null; } set { } } public string? RefusedSet { get { throw null; } set { } } public string? Url { get { throw null; } set { } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public override string ToString() { throw null; } @@ -13992,7 +13992,7 @@ public UnverifiableCodeAttribute() { } public partial class VerificationException : System.SystemException { public VerificationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected VerificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public VerificationException(string? message) { } @@ -14005,7 +14005,7 @@ public partial class CryptographicException : System.SystemException { public CryptographicException() { } public CryptographicException(int hr) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicException(string? message) { } @@ -14954,7 +14954,7 @@ public static partial class TaskAsyncEnumerableExtensions public partial class TaskCanceledException : System.OperationCanceledException { public TaskCanceledException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskCanceledException(string? message) { } @@ -15182,7 +15182,7 @@ public partial class TaskSchedulerException : System.Exception { public TaskSchedulerException() { } public TaskSchedulerException(System.Exception? innerException) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TaskSchedulerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TaskSchedulerException(string? message) { } @@ -15424,7 +15424,7 @@ public partial class Uri : System.Runtime.Serialization.ISerializable public static readonly string UriSchemeTelnet; public static readonly string UriSchemeWs; public static readonly string UriSchemeWss; - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uriString) { } @@ -15572,7 +15572,7 @@ public enum UriFormat public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable { public UriFormatException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } public UriFormatException(string? textString) { } diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs index 766bdbe7c75ed8..bd0e0ecbe1bf8c 100644 --- a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs +++ b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs @@ -444,7 +444,7 @@ public PrivilegeNotHeldException() { } public PrivilegeNotHeldException(string? privilege) { } public PrivilegeNotHeldException(string? privilege, System.Exception? inner) { } public string? PrivilegeName { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs index dccfc7dcc50405..4bc8d68fd834a5 100644 --- a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs +++ b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs @@ -41,10 +41,10 @@ public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType) { } public ClaimsIdentity(System.Collections.Generic.IEnumerable? claims, string? authenticationType, string? nameType, string? roleType) { } public ClaimsIdentity(System.IO.BinaryReader reader) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected ClaimsIdentity(System.Security.Claims.ClaimsIdentity other) { } @@ -84,7 +84,7 @@ public partial class ClaimsPrincipal : System.Security.Principal.IPrincipal public ClaimsPrincipal() { } public ClaimsPrincipal(System.Collections.Generic.IEnumerable identities) { } public ClaimsPrincipal(System.IO.BinaryReader reader) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ClaimsPrincipal(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ClaimsPrincipal(System.Security.Principal.IIdentity identity) { } 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 d2c8bbc0dbea0f..5ca913712c4f85 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs @@ -542,7 +542,7 @@ public static void ZeroMemory(System.Span buffer) { } public partial class CryptographicUnexpectedOperationException : System.Security.Cryptography.CryptographicException { public CryptographicUnexpectedOperationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected CryptographicUnexpectedOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public CryptographicUnexpectedOperationException(string? message) { } @@ -2751,7 +2751,7 @@ public X509Certificate(byte[] rawData, string? password) { } public X509Certificate(byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate(System.IntPtr handle) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public X509Certificate(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] @@ -2850,7 +2850,7 @@ public X509Certificate2(System.IntPtr handle) { } public X509Certificate2(System.ReadOnlySpan rawData) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public X509Certificate2(System.ReadOnlySpan rawData, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected X509Certificate2(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] 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 7b60fb6268f49f..512d130416ea6a 100644 --- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -677,7 +677,7 @@ public partial class HostProtectionException : System.SystemException { public HostProtectionException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected HostProtectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -2062,7 +2062,7 @@ public Hash(System.Reflection.Assembly assembly) { } public static System.Security.Policy.Hash CreateSHA256(byte[] sha256) { throw null; } public byte[] GenerateHash(System.Security.Cryptography.HashAlgorithm hashAlg) { throw null; } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -2132,7 +2132,7 @@ public partial class PolicyException : System.SystemException { public PolicyException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected PolicyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs index 17fbd72071fe4a..a2b06618c09730 100644 --- a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs +++ b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs @@ -23,7 +23,7 @@ public IdentityNotMappedException() { } public IdentityNotMappedException(string? message) { } public IdentityNotMappedException(string? message, System.Exception? inner) { } public System.Security.Principal.IdentityReferenceCollection UnmappedIdentities { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { } } @@ -238,7 +238,7 @@ public WindowsIdentity(System.IntPtr userToken) { } public WindowsIdentity(System.IntPtr userToken, string type) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) { } public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public WindowsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected WindowsIdentity(System.Security.Principal.WindowsIdentity identity) { } diff --git a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs index 2748cc1217b6fa..a4223cd161fc17 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs @@ -153,7 +153,7 @@ public partial class TimeoutException : System.SystemException { public TimeoutException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected TimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } 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 c1fd3f6de5c7c6..0e02787a776f2b 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -143,7 +143,7 @@ public partial class JsonException : System.Exception { public JsonException() { } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } @@ -156,7 +156,7 @@ public JsonException(string? message, string? path, long? lineNumber, long? byte public override string Message { get { throw null; } } public string? Path { get { throw null; } } #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs index 5abebffe44771c..4cda09dc0a02c6 100644 --- a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs +++ b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs @@ -142,7 +142,7 @@ public partial class Regex : System.Runtime.Serialization.ISerializable protected internal string? pattern; protected internal System.Text.RegularExpressions.RegexOptions roptions; protected Regex() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected Regex(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public Regex([System.Diagnostics.CodeAnalysis.StringSyntax(System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex)] string pattern) { } @@ -266,7 +266,7 @@ public GeneratedRegexAttribute([System.Diagnostics.CodeAnalysis.StringSyntax(Sys public partial class RegexMatchTimeoutException : System.TimeoutException, System.Runtime.Serialization.ISerializable { public RegexMatchTimeoutException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected RegexMatchTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public RegexMatchTimeoutException(string message) { } @@ -332,7 +332,7 @@ public sealed partial class RegexParseException : System.ArgumentException private RegexParseException() { } public System.Text.RegularExpressions.RegexParseError Error { get { throw null; } } public int Offset { get { throw null; } } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs index c4435d186d0809..617aff6b1bfec0 100644 --- a/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs +++ b/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.netcoreapp.cs @@ -9,7 +9,7 @@ namespace System.Threading.Channels public partial class ChannelClosedException : System.InvalidOperationException { #if NET8_0_OR_GREATER - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] #endif protected ChannelClosedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs index e7a57e6f49590c..6e90254a45f550 100644 --- a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs +++ b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.cs @@ -26,7 +26,7 @@ internal CompressedStack() { } public static System.Threading.CompressedStack Capture() { throw null; } public System.Threading.CompressedStack CreateCopy() { throw null; } public static System.Threading.CompressedStack GetCompressedStack() { throw null; } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static void Run(System.Threading.CompressedStack compressedStack, System.Threading.ContextCallback callback, object? state) { } @@ -163,7 +163,7 @@ public ThreadExceptionEventArgs(System.Exception t) { } public partial class ThreadInterruptedException : System.SystemException { public ThreadInterruptedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadInterruptedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadInterruptedException(string? message) { } @@ -199,7 +199,7 @@ public enum ThreadState public partial class ThreadStateException : System.SystemException { public ThreadStateException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected ThreadStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public ThreadStateException(string? message) { } diff --git a/src/libraries/System.Threading/ref/System.Threading.cs b/src/libraries/System.Threading/ref/System.Threading.cs index d09ccf2c132699..d837e35ad99890 100644 --- a/src/libraries/System.Threading/ref/System.Threading.cs +++ b/src/libraries/System.Threading/ref/System.Threading.cs @@ -39,7 +39,7 @@ public partial class BarrierPostPhaseException : System.Exception { public BarrierPostPhaseException() { } public BarrierPostPhaseException(System.Exception? innerException) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected BarrierPostPhaseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public BarrierPostPhaseException(string? message) { } @@ -132,7 +132,7 @@ public partial class AbandonedMutexException : System.SystemException { public AbandonedMutexException() { } public AbandonedMutexException(int location, System.Threading.WaitHandle? handle) { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public AbandonedMutexException(string? message) { } @@ -198,7 +198,7 @@ internal ExecutionContext() { } public static System.Threading.ExecutionContext? Capture() { throw null; } public System.Threading.ExecutionContext CreateCopy() { throw null; } public void Dispose() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public static bool IsFlowSuppressed() { throw null; } @@ -286,7 +286,7 @@ public static partial class LazyInitializer public partial class LockRecursionException : System.Exception { public LockRecursionException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected LockRecursionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public LockRecursionException(string? message) { } @@ -406,7 +406,7 @@ public Semaphore(int initialCount, int maximumCount, string? name) { } public partial class SemaphoreFullException : System.SystemException { public SemaphoreFullException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SemaphoreFullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SemaphoreFullException(string? message) { } @@ -488,7 +488,7 @@ protected void SetWaitNotificationRequired() { } public partial class SynchronizationLockException : System.SystemException { public SynchronizationLockException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected SynchronizationLockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public SynchronizationLockException(string? message) { } @@ -554,7 +554,7 @@ public static void Write([System.Diagnostics.CodeAnalysis.NotNullIfNotNullAtt public partial class WaitHandleCannotBeOpenedException : System.ApplicationException { public WaitHandleCannotBeOpenedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected WaitHandleCannotBeOpenedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public WaitHandleCannotBeOpenedException(string? message) { } diff --git a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs index c15a50c7c19a32..f3efc656f3c148 100644 --- a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs +++ b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.cs @@ -144,7 +144,7 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser public partial class TransactionAbortedException : System.Transactions.TransactionException { public TransactionAbortedException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionAbortedException(string? message) { } @@ -159,7 +159,7 @@ public TransactionEventArgs() { } public partial class TransactionException : System.SystemException { public TransactionException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionException(string? message) { } @@ -168,7 +168,7 @@ public TransactionException(string? message, System.Exception? innerException) { public partial class TransactionInDoubtException : System.Transactions.TransactionException { public TransactionInDoubtException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionInDoubtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionInDoubtException(string? message) { } @@ -207,7 +207,7 @@ public static void RecoveryComplete(System.Guid resourceManagerIdentifier) { } public partial class TransactionManagerCommunicationException : System.Transactions.TransactionException { public TransactionManagerCommunicationException() { } - [System.ObsoleteAttribute("This API supports legacy formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected TransactionManagerCommunicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public TransactionManagerCommunicationException(string? message) { } @@ -227,7 +227,7 @@ public partial struct TransactionOptions : System.IEquatable