Dijji / XstReader

Xst Reader is an open source viewer for Microsoft Outlook’s .ost and .pst files, written entirely in C#. To download an executable of the current version, go to the releases tab.
Microsoft Public License
479 stars 70 forks source link

Solution divided into 2 projects: GUI and Core #41

Closed iluvadev closed 3 years ago

iluvadev commented 3 years ago

I have divided the solution into 2 different projects:

In this way, the engine can be used from other .NET projects

I wanted the Core project to use .Net Standard (to be able to convert it to cross-platform), but I had issues with the RTF process (uses FlowDocument). To avoid losing functionality and having to redo the RTF treatment, the Core project uses .Net Framework 4

Dijji commented 3 years ago

Very nice. I agree that this is a good thing to do. I'm going to pull it into a branch called Divided and take a closer look at what you have done. Thanks!

iluvadev commented 3 years ago

This is only a first attempt to have the engine process in a project. Needs a code review to ensure that all responsibilities are well separated

Dijji commented 3 years ago

It's a good start, though. The only thing I disagreed with so far was changes to eliminate unreferenced exception variables by making it a simple catch, which will change the exception semantics. I will re-change these to simply remove the variable.

You are right about the code review. For instance, I think Message needs to be factored into Message in the core, and MessageView in the UI.

iluvadev commented 3 years ago

You're right I've changed the semantics in the exception catching, sorry. I removed it trying to reduce Warnings.

I think the ReadMessages function needs refactoring too, it is called from the UI to get the messages in a folder. Then the UI thread adds these messages inside this folder. I think this could be just one operation: ReadMessages (folder), and then "folder" has all the Messages ... or better: folder.ReadMessages () or folder.GetMessages () ... But it's dangerous: what happens in the UI, and the bindings?

Tomorrow I'll test it

Dijji commented 3 years ago

In the version currently in the Divided branch of the repository, I have restored the exception semantics and removed all warning messages.

I have started blundering around with a MessageView, which is what the UI would bind to. I am keeping file export and decryption in the core, so that they will be available to a command line version, and just focusing on factoring all the UI state into MessageView. Core ReadMessages would return Messages, and for the UI, something would wrap each one in a MessageView. I will find out in the next few days whether this approach comes out at all nicely.

iluvadev commented 3 years ago

OK, perfect, good luck. Let me know if I can help you

Dijji commented 3 years ago

I have pushed the results of my refactoring to the Divided branch. I would much appreciate any code review you can do, particularly in finding any more UI support holdouts in core. And, of course, any testing you can do would also be very welcome. The changes are far-reaching enough to have broken almost anything.

iluvadev commented 3 years ago

Wow, Nice! I have synchronized the code. In a while I try to review it, and make some tests. I keep you informed. 👍