Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #767 :
Small first step splitting some stuff out of the
IUserMod
to get feedback as to whether the general approach is heading in right direction.The
IUserMod
(TrafficManagerMod.cs
) class is still responsible for the messy wiring and state management. It calls "lifecycle events" in theLifecycle.cs
class, which in turn call methods located elsewhere.The logging is overly verbose and would be trimmed down once stuff gets moved to docs somewhere.
The goal is that we should be able to see at a glance, in the
Lifecycle.cs
what the mod is doing at the various stages, without having to wade through vast reems of boilerplate and other code. With the comments removed, it looks like this: #767 (comment)I've dumped some of the code from
TrafficManagerMod.cs
in to aTemp.cs
which will become obsolete once #699 is done.Next step would be to do similar for
LoadingExtension.cs
- move the meaty bits in to a separate class, and then use the loading extension to trigger a bunch of additional "lifecycle events" in theLifecycle.cs
which in turn will just call methods elswhere.Let me know what you think :)