IntelliTect / IntelliTect/EssentialCSharp
Improve GetAllValidNETPreprocessorSymbols
- Lingua principale
- C#
- Stelle
- 418
- Fork
- 173
- Merge medio
- 3m
- PR unite (30g)
- 3
Descrizione
This works, but I think it is cleaner, to just write out the individual `yield return` lines.
_Originally posted by @Keboo in https://github.com/IntelliTect/EssentialCSharp/pull/584#discussion_r1383683019_
Maybe something like:
```C#
switch
(
(majorVersion, minorVersion)
)
{
case (5, 0):
yield return "NET5_0_OR_GREATER";
yield return "NET5_0";
goto case (3, 1);
case (3, 1):
yield return "NETCOREAPP3_1_OR_GREATER";
yield return "NETCOREAPP3_1";
goto case (3, 0);
case (3, 0):
yield return "NETCOREAPP3_0_OR_GREATER";
goto case (2, 1);
case (2, 1):
yield return "NETCOREAPP2_1_OR_GREATER";
goto case (2, 0);
case (2, 0):
yield return "NETCOREAPP2_0_OR_GREATER";
goto case (1, 1);
case (1, 1):
yield return "NETCOREAPP1_1_OR_GREATER";
goto case (1, 0);
case (1, 0):
yield return "NETCOREAPP1_0_OR_GREATER";
break;
default:
break;
```
This needs more cleanup and work, but general structure is there
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Locate the GetAllValidNETPreprocessorSymbols entry point and compare its current implementation with the switch structure suggested in the issue. Clean up the implementation while preserving the expected symbols for each supported version, then verify the project still builds and its existing checks pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- build-system
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100