Skip to content

Move more extensions to new extension format#94

Merged
JeremyKuhne merged 1 commit intomainfrom
extendme
Dec 7, 2025
Merged

Move more extensions to new extension format#94
JeremyKuhne merged 1 commit intomainfrom
extendme

Conversation

@JeremyKuhne
Copy link
Owner

@JeremyKuhne JeremyKuhne commented Dec 7, 2025

Also add workaround in TypeExtensionTests for spurious CS8620 warning


Note

Migrates extension methods to the new scoped extension(...) syntax across multiple areas, removes an unused span split helper, and adds null-forgiving operators in tests to silence CS8620 warnings.

  • Extensions (migrated to scoped extension(...) syntax):
    • System/Globalization/InternalDateTimeExtensions.cs: Wrap GetDate, GetTime, GetTimePrecise under extension(ref readonly DateTime); make InternalDateTime private.
    • Touki/Io/StreamExtensions.cs (both Framework and library): Group Stream, StreamWriter, and TextWriter helpers into respective extension(...) blocks; keep read/write and formatted write APIs.
    • Touki/TypeExtensions.cs: Move IsAssignableTo into extension(Type?).
    • Touki/Buffers/SpanExtensions.cs: Move SliceAtNull and CompareOrdinalAsString into extension(...) blocks; remove SplitToEnumerable.
    • Touki/Buffers/SpanReaderExtensions.cs: Move TryReadPositiveInteger into extension(ref SpanReader<char>).
    • Touki/EnumExtensions.cs: Group flag helpers into extension<T>(T) and extension<T>(ref T) blocks (query and mutating operations).
    • Touki/Text/StringBuilderExtensions.cs: Group append/format helpers into extension(StringBuilder).
  • Tests:
    • TestSupport/TypeExtensionTests.cs: Add null-forgiving (!) on typeof(...) args to work around CS8620 analyzer noise; no behavior changes.

Written by Cursor Bugbot for commit 23f0e7a. This will update automatically on new commits. Configure here.

Also add workaround in TypeExtensionTests for spurious CS8620 warning
@JeremyKuhne JeremyKuhne merged commit bf9788c into main Dec 7, 2025
2 checks passed
@JeremyKuhne JeremyKuhne deleted the extendme branch December 7, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant