.net - Unity Newbie Question -


I am trying to use unity for the first time and I think that I can chew more than I can . We have an N-level application in which there is a base library with many abstract types and after that many business scenarios are at the top / concrete type of specific libraries. For the East: There are two implementations in the abstract type of lead, within a Motor Vehicle Finance Lead base library in another Automotive Fines library, NewAtomotilide in a neutogy library, we have a set of adapters that argue on a base type like lead Are there.

I am trying to use unity for the first time to return an interface ILeadDuplication, when I put the resolution on ILIDDPPP and either a string value named "new automotive" or "automotive finance" Nautilus, NewAutominal Lead Duplication or Automotive Finance Lead Duplication Example (name mapped on container after typing register) such as: IUnityContainer Container = New Uniti Kantner ()) container. Registrar type elevator; ILDublations, Automotive Finance Liaid Dopplans & gt; ("Automotive Fines"). Registrar type & lt; ILeadDuplication, New Automobile Lead Duplication & gt; ("Newtuutiv"); ILeadDuplication dupe = container.Resolve & lt; ILeadDuplication & gt; ("Automotive Fines"); Console.WriteLine (dupe.Created); }

Note: This is for illustration, because the library does not know anything about the concrete classes for ILeadDuplication, actually registration will need to be done in the config file.

Though all this works very well, I have to take it one step ahead. Upon calling resolution, I need to pass in the type lead argument, which is the base type for the newoutomotolid or motor vehicle finance lead.

I have to know whether it is possible that unity, somehow magically created "Gross Monthly Income" such as automotive finance lead for a property-specific contract institution which is not present on the lead and made it a new one. Motor vehicle allocation for the Lide Discription Instance Property Grossmantile Inkens.

I want to be able to fully demonstrate the general set arguments against the instances of IELDE duplicates in the base library also arose and examples of the qualities that are being generated and the properties being mapped about it Are unfamiliar with

Thank you!

It is not certain what you are doing after this but my guess is that at the time of creation Want to pass the dependency? It can be done in many ways but here is an example. MyOtherClass called "Nominated" for this. [Injecting cursor] Public class MylCass ([Dependent ("Nominated")] MyOther Class Other {}

Dependency must be added in the container either through configuration or through register type method.

Tell me if I stopped the base and maybe I can help you ... I have done a lot of work with Unity in different situations, till I know what you want to achieve I can help you


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -