removed syslib003 & syslib0051 obsoleted code dependencies (#18827)

Followed guidance in https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslibxxxx
This commit is contained in:
Sven Geusens
2025-03-27 10:47:07 +01:00
committed by GitHub
parent 26d66a815a
commit 8c5fe3d52b
4 changed files with 0 additions and 157 deletions

View File

@@ -36,7 +36,6 @@ namespace Umbraco.Cms.Core.Semver
#if NETSTANDARD
public sealed class SemVersion : IComparable<SemVersion>, IComparable
#else
[Serializable]
public sealed class SemVersion : IComparable<SemVersion>, IComparable, ISerializable
#endif
{
@@ -53,29 +52,6 @@ namespace Umbraco.Cms.Core.Semver
RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.ExplicitCapture);
#endif
#if !NETSTANDARD
/// <summary>
/// Initializes a new instance of the <see cref="SemVersion" /> class.
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
/// <exception cref="ArgumentNullException"></exception>
private SemVersion(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
SemVersion semVersion = Parse(info.GetString("SemVersion")!);
Major = semVersion.Major;
Minor = semVersion.Minor;
Patch = semVersion.Patch;
Prerelease = semVersion.Prerelease;
Build = semVersion.Build;
}
#endif
/// <summary>
/// Initializes a new instance of the <see cref="SemVersion" /> class.
/// </summary>
@@ -525,7 +501,6 @@ namespace Umbraco.Cms.Core.Semver
}
#if !NETSTANDARD
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)