VO2X# porter to generate one file per class and not large files with many classe

This forum is meant for questions and discussions about the XSharp Tools libraries, which contain code written by XSharp users that they want to share with others,
The development team is not responsible for this code

Moderator: wriedmann

Post Reply
mk_schmid
Posts: 9
Joined: Wed Jul 06, 2022 1:53 pm
Location: Germany

VO2X# porter to generate one file per class and not large files with many classe

Post by mk_schmid »

Hello all,

I have a question, is there a possibility to let the VO code to X# porter generate one file per class and not one big file with many classes per module? In my experience Visual Studio can handle many small files much better than less big ones.
Christian Schmid
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VO2X# porter to generate one file per class and not large files with many classe

Post by Chris »

Hi Christian,

Actually this is semi-possible already, there's a hidden option for doing exactly that, but it's porting only the code, does not port window, menu etc binaries or resources (which is why the feature is hidden). In case that's what you are after (just the code), then I can send you that special version, but if you need to also edit windows etc after porting (which most likely you do), then I'm afraid this will not work. Unfortunately it would be extremely complicated adding support also for the binaries in this feature.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VO2X# porter to generate one file per class and not large files with many classe

Post by ic2 »

Hello Christiaan,

Unless I misunderstand what you want: can't you just achieve that by creating 1 MEF per class within VO? In VO that is thanks to the repo structure and contrary to VS, extremely easy: create MEF's, sort existing code elsewhere on the class, select all entities of 1 class and drag them to your new empty MEF. Especially in the latest VO version(s) it works without problem I think, to be on the safe side you might want to re-enter VO and/or reindex after some moving.

When ready, the X# VO Porter will create 1 prg from 1 MEF.

Dick
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

VO2X# porter to generate one file per class and not large files with many classe

Post by wriedmann »

Hi Chris, hi Christian,
it would be a nice option to split the code part of the windows.
Personally I have done that manually in one ported project, keeping all the designer modules together and splitting up the handwritten code:
15-12-2022_15-42-32.png
15-12-2022_15-42-32.png (9.05 KiB) Viewed 1677 times
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
mk_schmid
Posts: 9
Joined: Wed Jul 06, 2022 1:53 pm
Location: Germany

VO2X# porter to generate one file per class and not large files with many classe

Post by mk_schmid »

Hello Chris,
I would like to test this special version, could you please provide it to me.
Thanks
Christian Schmid
mk_schmid
Posts: 9
Joined: Wed Jul 06, 2022 1:53 pm
Location: Germany

VO2X# porter to generate one file per class and not large files with many classe

Post by mk_schmid »

Hello Dick,
splitting within VO would probably work but due to the size of the application to be ported probably not practical. Thanks for the tip though.
Christian
Christian Schmid
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VO2X# porter to generate one file per class and not large files with many classe

Post by Chris »

Hi Christian,
mk_schmid post=24790 userid=6786 wrote:Hello Chris,
I would like to test this special version, could you please provide it to me.
Thanks
I have trouble locating your email address, can you please send me (chris at xsharp eu) an email so I can reply to you?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
FFF
Posts: 1521
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

VO2X# porter to generate one file per class and not large files with many classe

Post by FFF »

well, following thebold patter, dividing designrr an code by ineritance, you get that for free...
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
Post Reply