"More code is better" is not always true, unfortunately it is even rarely true. Why? Because:
- Even if the question looks interesting and well-formed, it still causes the TL DR problem (the same applies to text walls as well).
- And if it doesn't make the impression from the title and overall formatting, then it begins to look like a code dump.
That's why good questions should contain only valid and relevant code pieces—a minimal complete verifiable example. And it is not just "only the most important parts."
An MCVE is:
Something that stops any speculations, clarifies your intent, methods and context (at least as much as code can do it).
Something you can easily understand without any need to juggle the enormous amount of pieces in mind:
Who wants to mentally debug some DI traversing through five classes or combine a class from ten pieces?—Very few and not every time.
Something that can be easily set up on the answerer's machine and tested:
Mental debugging is a very powerful tool, but it has its limits. Sometimes you just end up tweaking actual code to solve the issue. And even if our brains are capable of handling incomplete or disordered code, the compilers (or interpreters) aren't so forgiving—pasting multiple code pieces and setting up the entire project to debug an issue could be a frustrating and long process.
Something that forces you to cut to the source of the problem:
It is tempting to just dump the code (I do not say that it is exactly your case - you've obviously spent enough time pasting, formatting and explaining everything). But in the end, can you look into the mirror and say to yourself: "I have tried everything I can to fix it and failed, so I pinpointed the issue and asked the question"?
For me it is usually difficult due to the pinpointed part—if multiple code pieces each of dozens line of code are needed, then I probably haven't removed everything unnecessary or irrelevant.
Divide and Conquer—it is the main principle that allows us to deal with complex systems like programs. If you use it on your program you'll either find the issue or drop the deadweight. But in any case you will win, because creating a clean and short problem demo will improve your own understanding of both the issue and the whole program.
So, what can be done to improve it?
MCVE is your best friend. When you know your enemy, you can face it. Otherwise it will just lurk in the depths of the program draining your resolve and energy.
MVCE will demand a lot of efforts, will break the architecture, use a lot of hard-coded values and look very contrived. But it will deliver what it intended for—the gist of the issue.
- And that's probably all. Personally I do not see any other real issues with your post.
P.S.
Do not take downvotes so personally. As has been said your only problem was in the far too excessive code snippets. And someone, probably in frustration from overall amount of code dumps in new questions, decided to downvote it without giving you a chance to fix the problem.
That's their right, no one can force them to fix and babysit every question they encounter. Just the comment describing the problems(whether with or without the downvote) is usually more useful for OP than just the downvote. And it can prevent further repetitions of the same problems in future posts.
So, do not despair and remake it with an MVCE.
Asking questions is a useful skill, but asking right questions right is an even more highly sought one. Good luck.