diff --git a/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs b/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs index b0225bb6f9a1..ed2859df5744 100644 --- a/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs +++ b/src/Shared/runtime/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,8 @@ public HPackDecodingException(string message, Exception innerException) : base(m { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public HPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs b/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs index 287497b7ee11..b83ca6502e8c 100644 --- a/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs +++ b/src/Shared/runtime/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/Shared/runtime/Http3/QPack/QPackDecodingException.cs b/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs index 760403267f45..5de0efff935d 100644 --- a/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs +++ b/src/Shared/runtime/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/Shared/runtime/Http3/QPack/QPackEncodingException.cs b/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs index 6b5647e18e2e..7e6eb6f1b792 100644 --- a/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs +++ b/src/Shared/runtime/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) { }