Rewrite all conditional compilation based on the target framework - #291
Closed
0xced wants to merge 3 commits into
Closed
Rewrite all conditional compilation based on the target framework#2910xced wants to merge 3 commits into
0xced wants to merge 3 commits into
Conversation
It's .NET Standard 2.1 only and isn't actually asynchronous. Thus, it's exactly equivalent as what the base class does, i.e., calling Close() and returning Task.CompletedTask.
This is future proof. Adding a new target framework will just work, without needing to tweak the `DefineConstants` property and risking to miss something.
0xced
force-pushed
the
conditional-compilation-cleanup
branch
from
March 25, 2026 21:18
56dc8cb to
4ae3390
Compare
Owner
|
I had used the defined constants primarily to remind myself why I had the conditional block. I feel like the framework version doesn't communicate what feature is present/missing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is future proof. Adding a new target framework will just work, without needing to tweak the
DefineConstantsproperty and risking to miss something.Also, the
CsvDataReader.CloseAsyncimplementation (.NET Standard 2.1 only) was removed. Since it's not actually asynchronous, it's exactly equivalent as what the base class does, i.e., calling Close() and returning Task.CompletedTask.