Skip to content

Commit

Permalink
Add obsolete attributes to legacy serialization types (#5496)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosavljevic authored and Nigusu-Allehu committed Nov 21, 2023
1 parent 78aa892 commit 565bfa8
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public PackageSourceException(string message)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected PackageSourceException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/NuGet.Core/NuGet.Commands/Common/CommandException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public CommandException(string message, Exception exception)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected CommandException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public NuGetConfigurationException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetConfigurationException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/NuGet.Core/NuGet.Frameworks/FrameworkException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public FrameworkException(string message)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected FrameworkException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public NuGetLicenseExpressionParsingException(string message, Exception innerExc
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetLicenseExpressionParsingException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public FatalProtocolException(string message, Exception innerException) : base(m
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected FatalProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public InvalidCacheProtocolException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected InvalidCacheProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public NuGetProtocolException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public RetriableProtocolException(string message, Exception innerException) : ba
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected RetriableProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/NuGet.Core/NuGet.Protocol/Plugins/PluginException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public PluginException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
private PluginException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
3 changes: 3 additions & 0 deletions src/NuGet.Core/NuGet.Protocol/Plugins/ProtocolException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public ProtocolException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
private ProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public NuGetResolverConstraintException(string message)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetResolverConstraintException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public NuGetResolverException(string message)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetResolverException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public NuGetResolverInputException(string message)
{
}

#if NET8_0_OR_GREATER
[Obsolete(DiagnosticId = "SYSLIB0051")] // https://github.com/dotnet/docs/issues/34893
#endif
protected NuGetResolverInputException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
Expand Down

0 comments on commit 565bfa8

Please sign in to comment.