Skip to content

Rewrite all conditional compilation based on the target framework - #291

Closed
0xced wants to merge 3 commits into
MarkPflug:mainfrom
0xced:conditional-compilation-cleanup
Closed

Rewrite all conditional compilation based on the target framework#291
0xced wants to merge 3 commits into
MarkPflug:mainfrom
0xced:conditional-compilation-cleanup

Conversation

@0xced

@0xced 0xced commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

This is future proof. Adding a new target framework will just work, without needing to tweak the DefineConstants property and risking to miss something.

Also, the CsvDataReader.CloseAsync implementation (.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.

0xced added 2 commits March 25, 2026 21:51
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
0xced force-pushed the conditional-compilation-cleanup branch from 56dc8cb to 4ae3390 Compare March 25, 2026 21:18
@MarkPflug

Copy link
Copy Markdown
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.

@MarkPflug MarkPflug closed this Apr 7, 2026
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.

2 participants