Closed linkdotnet closed 5 months ago
I took the liberty to enable C# 13 features for NCronJob. Wanted to get your thoughts on this one @falvarez1
The new params collections are pretty nice. Since you made the method public how does that impact the ability to use NCronJob from a .Net 8, C#12 application? Is it binary/source compatible? If this can be used from a .Net 8 app without needing to support C#13 then keep it as-is, otherwise it'll need the corresponding preprocessor directives.
The class is still internal
. I try to stick to Microsofts coding guidelines, where they make class
es internal
and every function public
instead of internal
as it seems redundant.
The params Span
is a SDK thing. So you need netsdk 9 to compile this, but there is no problem in using in .NET 8.
Otherwise our test suite hopefully wouldn't run!? Well at least that is my way of thinking, but we can easily skip that as this is a microoptimization.
FYI, was curious about the difference in allocations so I ran a benchmark, seems to be negligible with the previous approach.
Interesting - really neglecable. While I am still in favor of Contains
, I am more indifferent about params ReadOnlySpan<char>
.
Small refactoring