EliteJournalReader icon indicating copy to clipboard operation
EliteJournalReader copied to clipboard

Add consistency to events that are associated with secondary JSON files

Open barrywimlett opened this issue 4 years ago • 2 comments

Handle the journal event telling us that a new navroute has been written to NavRoute.json

Ideally internally consume the journalevent and then parse the json file and trhow/fire a new event based on the contents.

barrywimlett avatar Mar 20 '21 10:03 barrywimlett

I've renamed the issue there are several events which nowhave associated secondary json files NavRoute,Shipyard,ModuleInfo,Cargo and MarketData.

I have added internal event handlers for these events on the journalWatcher which for 'live' events will read the secondary json file and then raise another event with the full data. I have also added a series of public methods to the journalWatcher to allow access to the secondary json data.

I found the additional methods added to the MarketData event only after I was almost done, I have left them in place. However I personally feel that the Event/EventArgs classes should where possible remain data/property only. So I have not extended the other events likewise.

barrywimlett avatar Apr 10 '21 13:04 barrywimlett

This issue should be associated with PullRequest#21

barrywimlett avatar Apr 10 '21 21:04 barrywimlett