unity container - What is equivalent of RegisterInstance<Interface>(new Class()) design time? -


I'm trying to apply (e.g., using app.config) how do I use the section I am struggling with the example of

His sample of run-time configuration is:

  EmailService myEmailService = new EmailService (); MyContainer.RegisterInstance & LT; IMyService & gt; (MyEmailService);  

But no equivalent design-time configuration has been given. If I do:

  & lt; Container & gt; & Lt; Example type = "IMIS service" value = "email service" /> & Lt; / Container & gt;  

Can not naturally get me from the "TypeConverter" system String Exception Do I just make some kind of converter so that I can tell an example? Is there an easier way?


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -