Skip to content

Commit f1a4bd8

Browse files
Remove obsolete properties and update project files
Removed obsolete properties from TextExtensions and updated SplitTests to use RegexPatterns. Incremented version to 8.2.1 in Open.Text.csproj. Added .NET 9.0 support in Open.Text.Tests.csproj.
1 parent 058cbc6 commit f1a4bd8

4 files changed

Lines changed: 4 additions & 22 deletions

File tree

Source/Extensions._.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ private static IEnumerable<string> NumberLabels
3030
}
3131
}
3232

33-
/// <inheritdoc cref="RegexPatterns.ValidAlphaNumericOnlyPattern"/>
34-
[Obsolete("Use RegexPatterns.ValidAlphaNumericOnlyPattern.")]
35-
public static Regex ValidAlphaNumericOnlyPattern
36-
=> RegexPatterns.ValidAlphaNumericOnlyPattern;
37-
38-
/// <inheritdoc cref="RegexPatterns.ValidAlphaNumericOnlyUntrimmedPattern"/>
39-
[Obsolete("Use RegexPatterns.ValidAlphaNumericOnlyUntrimmedPattern.")]
40-
public static Regex ValidAlphaNumericOnlyUntrimmedPattern
41-
=> RegexPatterns.ValidAlphaNumericOnlyUntrimmedPattern;
42-
43-
/// <inheritdoc cref="RegexPatterns.WhiteSpacePattern"/>
44-
[Obsolete("Use RegexPatterns.WhiteSpacePattern.")]
45-
public static Regex WhiteSpacePattern
46-
=> RegexPatterns.WhiteSpacePattern;
47-
4833
/// <summary>
4934
/// Converts a string to title-case.
5035
/// </summary>

Source/Open.Text.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<RepositoryUrl>https://github.com/Open-NET-Libraries/Open.Text</RepositoryUrl>
2121
<RepositoryType>git</RepositoryType>
2222
<PackageTags>string, span, enum, readonlyspan, text, format, split, trim, equals, trimmed equals, first, last, preceding, following, stringbuilder, extensions, stringcomparable, spancomparable, stringsegment, splitassegment</PackageTags>
23-
<Version>8.2.0</Version>
23+
<Version>8.2.1</Version>
2424
<PackageReleaseNotes></PackageReleaseNotes>
2525
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2626
<PublishRepositoryUrl>true</PublishRepositoryUrl>

Tests/Open.Text.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net6.0;net8.0;net9.0;</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
77
<LangVersion>latest</LangVersion>

Tests/SplitTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,16 @@ public static void Split(string sequence, StringSplitOptions options = StringSpl
103103
Assert.Equal(sequence.Split("I,", options), span.Split("i,", options, StringComparison.OrdinalIgnoreCase));
104104
#endif
105105

106-
#pragma warning disable CS0618 // Type or member is obsolete
107-
// Use obsolete values to ensure they still work.
108106
Assert.Equal(
109-
TextExtensions
107+
RegexPatterns
110108
.ValidAlphaNumericOnlyPattern
111109
.Matches(sequence)
112110
.Cast<Match>()
113111
.Select(m => m.Value),
114-
TextExtensions
112+
RegexPatterns
115113
.ValidAlphaNumericOnlyPattern
116114
.AsSegments(sequence)
117115
.Select(m => m.Value));
118-
#pragma warning restore CS0618 // Type or member is obsolete
119116

120117
var stringSegment = sequence.AsSegment();
121118
var ss = stringSegment.SplitAsSegments(",", options).Select(s => s.Value).ToArray();

0 commit comments

Comments
 (0)