xsharp.eu • ILspy suggestion: string file paths appear in C# format
Page 1 of 1

ILspy suggestion: string file paths appear in C# format

Posted: Wed Dec 16, 2020 9:04 am
by George
Again in ILSpy 5.02 X# Plug-in:

In the string file paths, the decompiled code shows the syntax for C # ( instead of )

my original code:
 
USING System
USING System.Collections.Generic
USING System.IO
USING ICSharpCode.SharpZipLib.Zip
 
FUNCTION FileList() AS VOID
    VAR cFile := "C:UsersGeorgesourcereposTest ProjectsCheckIntellisensebinDebugSamplesSample.zip"
 
    VAR listFiles := ZipClass.FileList(cFile)
 
    Console.WriteLine("'"+cFile+"' Contains:")
    Console.WriteLine()
 
    FOREACH VAR oFileList IN listFiles
        Console.WriteLine(oFileList:FullPath)
    NEXT
 
    Console.WriteLine()
    Console.WriteLine("Press any key to continue...")
    Console.ReadKey()
RETURN
 
 
ILSpy (X#) decompiled code:
 
// Functions
using System
using System.Collections.Generic
 
public static method FileList() as void
    local cFile as string
    local listFiles as List<FileList>
    //
    cFile := "C:UsersGeorgesourcereposTest ProjectsCheckIntellisensebinDebugSamplesSample.zip"
    listFiles := ZipClass.FileList(cFile)
    Console.WriteLine("'" + cFile + "' Contains:")
    Console.WriteLine()
    foreach oFileList as FileList in listFiles
        Console.WriteLine(oFileList:FullPath)
    next
    Console.WriteLine()
    Console.WriteLine("Press any key to continue...")
    Console.ReadKey()

regards
George

ILspy suggestion: string file paths appear in C# format

Posted: Wed Dec 16, 2020 12:18 pm
by robert
George,
The source to the plugin can be found here:
https://github.com/X-Sharp/ILSpy-Plugin

Why don't you fix it and send Fabrice a pull request ?

Robert

ILspy suggestion: string file paths appear in C# format

Posted: Wed Dec 16, 2020 1:21 pm
by George
Robert,

I would try, but since I have to understand the existing code and the logic of such a plugin code, I do not know how quickly or easily I can help (if I can).

Also, as shown in the attached capture1.png, there are missing references.
I brought the 11 missing NuGet packages to packages folder, then I update the 11 packages, but even after that there are shortcomings (capture2.png).
I imagine the Mono (and obviously not only) should also be installed.

regards
Capture1.PNG
Capture1.PNG (24.99 KiB) Viewed 1977 times
Capture2.PNG
Capture2.PNG (25.44 KiB) Viewed 1977 times
George

ILspy suggestion: string file paths appear in C# format

Posted: Wed Dec 16, 2020 2:24 pm
by Fabrice
Hi George,
;)...Yes, it seems to be more complex than expected !

I will try to have a look at your feedback asap.

Cheers,
Fab

ILspy suggestion: string file paths appear in C# format

Posted: Wed Dec 16, 2020 2:49 pm
by George
Thank you Fabrice

George