I have to push something from Server to client(I'm using SignalR for this).
Now Lets say I have an interface called IResourceType
, also there are two implementation of this interface called SqlServer
and Oracle
Now whenever I push something to my client(desktop application) I want to execute a specific implementation of this interface.
How I can achieve this...I know by passing some identifier I can create the instance of a specific implementation(by using Dependency Injection)...
But my question is...is passing some identifier(some string) is the only way to identify which implementation is required or is there any more sophisticated way of doing the same thing(more object oriented way..more strongly typed)
Aucun commentaire:
Enregistrer un commentaire