Input code
https://sharplab.io/#gist:ca290c8cdd39ae90d27894091c5ee33a
Loop over array:
foreach (...) // or for (...)
{
try
{
// Action
}
catch (..)
{
continue;
}
// Action 2
}
Loop over Iterator:
https://github.com/Pryaxis/TSAPI/blob/general-devel/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs#L348
Erroneous output
foreach (...) // or for (...)
{
try
{
// Action
}
catch (..)
{
goto IL_TAG;
}
// Action 2
IL_TAG:
;
}
Details
- Product in use: ILSpy
- Version in use: 8.0.0.7136-preview2
Nothing wrong with the actual behaviour but just improvement.
The loop over iterator example binary is available through NuGet or zip, bin/TerrariaServer.dll. Some continue were recognized but the one within BadImageFormatException was not.
Input code
https://sharplab.io/#gist:ca290c8cdd39ae90d27894091c5ee33a
Loop over array:
Loop over Iterator:
https://github.com/Pryaxis/TSAPI/blob/general-devel/TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs#L348
Erroneous output
Details
Nothing wrong with the actual behaviour but just improvement.
The loop over iterator example binary is available through NuGet or zip,
bin/TerrariaServer.dll. Somecontinuewere recognized but the one withinBadImageFormatExceptionwas not.