Good to see you picked up the development again! I suggest you to work on the version YOU like. It shouldn't matter if there's already an good emulator for version X. But that's just my opinion.
Now back on your code I do have a few points that should/could be improved.
- You have an asynchronous method in your GameNetworkListener that's no Async postfix. All async methods should've Async as a postfix (there are a few exceptions like events, HTTP controller methods and tests). I also suggest you to add ".ConfigureAwait(false)" on all async-calls too. Here is a nice article about it:
https://docs.microsoft.com/en-us/arc...us-programming.
- In your GameNetworkListener the Start method is async, but your Stop method isn't, why? You do call two async methods in it...
- The main method in Nordlys class runs the Start method, but then waits for it? Why? What's the reason to use async if you're going to block it anyway? If you do async, go async all the way. Tip: the main method can be marked as async too, then just do "await listener.Start'Async'(30000).ConfigureAwait(false);".
- Try to abstract away the use of new. It will make your life easier when unit testing (if you actually do such thing).
- There is a nice extension package that Microsoft provides for configuration purposes, see here:
https://docs.microsoft.com/en-us/asp...ration/options.
- Minor improvement, you can use ".Any()" on arrays (everything that implements IEnumerable) to validate if it has items.
- You catch an exception but are still using "Console.Writeline" to print it on the console. Why not use your logger that you used a few lines above it?
- Isn't it strange you have to give a single class two logger instances? I know the reason, but it weird.
- On the subject of constructor parameters. Having more than 3-4+ dependencies generaly means it does and needs too much. Make the class smaller.
Please read up on task-based async methods and how they work. It'll avoid problems, like deadlocks and other strange behavior, in the late run. Keep also in mind that debugging will and can be a pain in the ass when using async methods, because of jumping from one to the other place.