Skip to content

Commit 565b6d3

Browse files
Copilotagocke
andauthored
Replace NET8_0_OR_GREATER with NET across all source files (#118363)
Co-authored-by: agocke <[email protected]>
1 parent 1b45b1b commit 565b6d3

File tree

115 files changed

+261
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+261
-261
lines changed

src/libraries/Common/src/Internal/Cryptography/PkcsHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ internal static string GetOidFromHashAlgorithm(HashAlgorithmName algName)
223223
return Oids.Sha384;
224224
if (algName == HashAlgorithmName.SHA512)
225225
return Oids.Sha512;
226-
#if NET8_0_OR_GREATER
226+
#if NET
227227
if (algName == HashAlgorithmName.SHA3_256)
228228
return Oids.Sha3_256;
229229
if (algName == HashAlgorithmName.SHA3_384)

src/libraries/Common/src/System/Net/Http/aspnetcore/Http2/Hpack/HuffmanDecodingException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@ public HuffmanDecodingException(string message)
1919
{
2020
}
2121

22-
#if NET8_0_OR_GREATER
22+
#if NET
2323
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
2424
#endif
2525
private HuffmanDecodingException(SerializationInfo info, StreamingContext context)
2626
: base(info, context)
2727
{
2828
}
2929

30-
#if NET8_0_OR_GREATER
30+
#if NET
3131
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
3232
#endif
3333
void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
3434
{
3535
base.GetObjectData(serializationInfo, streamingContext);
3636
}
3737

38-
#if NET8_0_OR_GREATER
38+
#if NET
3939
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
4040
[EditorBrowsable(EditorBrowsableState.Never)]
4141
#endif

src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackDecodingException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public QPackDecodingException(string message, Exception innerException) : base(m
2121
{
2222
}
2323

24-
#if NET8_0_OR_GREATER
24+
#if NET
2525
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
2626
#endif
2727
private QPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context)

src/libraries/Common/src/System/Net/Http/aspnetcore/Http3/QPack/QPackEncodingException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public QPackEncodingException(string message, Exception innerException)
1818
{
1919
}
2020

21-
#if NET8_0_OR_GREATER
21+
#if NET
2222
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
2323
#endif
2424
private QPackEncodingException(SerializationInfo info, StreamingContext context) : base(info, context)

src/libraries/Common/src/System/Net/NetworkInformation/NetworkInformationException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public NetworkInformationException(int errorCode) : base(errorCode)
3535
{
3636
}
3737

38-
#if NET8_0_OR_GREATER
38+
#if NET
3939
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
4040
[EditorBrowsable(EditorBrowsableState.Never)]
4141
#endif

src/libraries/Common/src/System/Reflection/AssemblyNameParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static bool IsAttribute(string candidate, string attributeKind)
246246

247247
private static bool TryParseVersion(string attributeValue, ref Version? version)
248248
{
249-
#if NET8_0_OR_GREATER
249+
#if NET
250250
ReadOnlySpan<char> attributeValueSpan = attributeValue;
251251
Span<Range> parts = stackalloc Range[5];
252252
parts = parts.Slice(0, attributeValueSpan.Split(parts, '.'));
@@ -262,7 +262,7 @@ private static bool TryParseVersion(string attributeValue, ref Version? version)
262262
for (int i = 0; i < parts.Length; i++)
263263
{
264264
if (!ushort.TryParse(
265-
#if NET8_0_OR_GREATER
265+
#if NET
266266
attributeValueSpan[parts[i]],
267267
#else
268268
parts[i],

src/libraries/Common/src/System/Security/Cryptography/CryptoThrowHelper.Windows.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public WindowsCryptographicException(int hr, string message)
5252
HResult = hr;
5353
}
5454

55-
#if NET8_0_OR_GREATER
55+
#if NET
5656
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
5757
[EditorBrowsable(EditorBrowsableState.Never)]
5858
#endif

src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ private static void CheckHashAlgorithm(HashAlgorithmName hashAlgorithm)
542542
case HashAlgorithmNames.SHA384:
543543
case HashAlgorithmNames.SHA512:
544544
break;
545-
#if NET8_0_OR_GREATER
545+
#if NET
546546
case HashAlgorithmNames.SHA3_256:
547547
if (!HMACSHA3_256.IsSupported)
548548
{

src/libraries/Common/tests/System/MockType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ internal class MockType : Type
8686
public override bool IsSecurityCritical => throw Unexpected;
8787
public override bool IsSecuritySafeCritical => throw Unexpected;
8888
public override bool IsSecurityTransparent => throw Unexpected;
89-
#if NET8_0_OR_GREATER
89+
#if NET
9090
[Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId = "SYSLIB0050", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
9191
#endif
9292
public override bool IsSerializable => throw Unexpected;

src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public void SignPreHash_ThrowsForUnsupportedAlgorithmCombinations(MLDsaAlgorithm
394394

395395
protected static byte[]? CalculateMu(MLDsa mldsa, byte[] data, byte[]? context = null)
396396
{
397-
#if NET8_0_OR_GREATER
397+
#if NET
398398
if (MLDsaTestHelpers.ExternalMuIsSupported)
399399
{
400400
byte[] mu = new byte[mldsa.Algorithm.MuSizeInBytes];

0 commit comments

Comments
 (0)