I use Strange IOC in my game, and I am having problems developing how to map views to models.
At the beginning of the game, I create several models of enemies. These models contain various statistics used during operation (for example, the number of injuries, health, etc.). I am working on these statistics using commands. Then I look through all my models in the Start command and create the appropriate views for them. Everyone EnemyViewhas EnemyMediatorthat must run commands to control the AI.
I need to specify the Viewinstance Modelto which they belong. Strange bindings for IOC input usually vary by type or optional alternate identifier. All my enemy models and representations are of the same type, so I have to use this identifier. The problem arises when you try to actually enter instances.
At first I tried to give each of the GUID of my enemy models and pass it Viewand Mediator, but the problem arises when Strange IOC injection uses static insert criteria. Trying to apply my GUID in attributes Injectresults in a compiler error for obvious reasons.
This led me to use InjectionBinder.Injector.Inject()to manually search for bindings at runtime Commandusing the GUID. This works, but now it adds an injector dependency that I don’t need, and I use the injector as a service locator and lose the benefits of injection.
The problem is that I don’t know how to introduce a specific model, which belongs to mine EnemyView, to the commands that I run, and therefore I am stuck in workarounds in Locator style.
For reference: 
is the structure of the application I'm trying to execute.
source
share