About .NET, ASP.NET, MVC, C#, WPF, WCF and everything related to .NET and more.

Mugen Injection [Resolving components]

Methods to resolve

To resolve components you can use this methods and it overloads:
  • Get, Get<T> - gets an instance of the specified service, in depending on the method takes:
    • Key to resolve keyed instance Get<Alpha>("test")
    • Collection of IInjectionParameters Get<Alpha>(new ConstructorParameter("test", "test"))
    • Dictionary of special parameters Get<Alpha>(new Dictionary<string, object>() "test", "test")
    • Also, there are methods that combine the above options into one.
  • GetInto, GetInto<T> - gets an instance of the specified service, as if this service is requested from outside the other service. Always takes the MemberInfo and the ParameterInfo(optional) parameter, that will receive the injection. In depending on the method takes:
    • Key to resolve keyed instance GetInto<Alpha>("test", typeof (Beta))
    • Collection of IInjectionParameters GetInto<Alpha>(typeof (Beta), null, null, new ConstructorParameter("test", "test"))
    • Dictionary of special parameters GetInto<Alpha>(typeof (Beta), null, new Dictionary<string, object>()"test", "test")
    • Also, there are methods that combine the above options into one.
  • GetAllInCurrent, GetAllInCurrent<T> - gets all available instances of the specified service in the specified IInjectorResolver, returns a series of instances of the service. In depending on the method takes:
    • Key to resolve keyed instance GetAllInCurrent<Alpha>("test")
    • Collection of IInjectionParameters GetAllInCurrent<Alpha>(new ConstructorParameter("test", "test"))
    • Dictionary of special parameters GetAllInCurrent<Alpha>(new Dictionary<string, object>() "test", "test")
    • Also, there are methods that combine the above options into one.
  • GetAllInCurrentInto, GetAllInCurrentInto<T> - gets all available instances of the specified service in the specified IInjectorResolver as if this service is requested from outside the other service, returns a series of instances of the service. Always takes the MemberInfo and the ParameterInfo(optional) parameter, that will receive the injection. In depending on the method takes:
    • Key to resolve keyed instance GetAllInCurrentInto<Alpha>("test", typeof(Beta))
    • Collection of IInjectionParameters GetAllInCurrentInto<Alpha>(typeof (Beta), null, null, new ConstructorParameter("test", "test"))
    • Dictionary of special parameters GetAllInCurrentInto<Alpha>(typeof (Beta), null, new Dictionary<string, object>()"test", "test")
    • Also, there are methods that combine the above options into one.
  • GetAll, GetAll<T> - gets all available instances of the specified service in the specified IInjectorResolver includes all of its parent IInjectorResolver, returns a series of instances of the service. In depending on the method takes:
    • Key to resolve keyed instance GetAll<Alpha>("test")
    • Collection of IInjectionParameters GetAll<Alpha>(new ConstructorParameter("test", "test"))
    • Dictionary of special parameters GetAll<Alpha>(new Dictionary<string, object>() "test", "test")
    • Also, there are methods that combine the above options into one.
  • GetAllInto, GetAllInto<T> - gets all available instances of the specified service in the specified IInjectorResolver includes all of its parent IInjectorResolver as if this service is requested from outside the other service, returns a series of instances of the service. Always takes the MemberInfo and the ParameterInfo(optional) parameter, that will receive the injection. In depending on the method takes:
    • Key to resolve keyed instance GetAllInto<Alpha>("test", typeof(Beta))
    • Collection of IInjectionParameters GetAllInto<Alpha>(typeof (Beta), null, null, new ConstructorParameter("test", "test"))
    • Dictionary of special parameters GetAllInto<Alpha>(typeof (Beta), null, new Dictionary<string, object>()"test", "test")
    • Also, there are methods that combine the above options into one.
  • TryGet, TryGet<T> - tries to get an instance of the specified service, see the Get and Get<T> methods.
  • TryGetInto, TryGetInto<T> - tries to get an instance of the specified service, see the GetInto and GetInto<T> methods.
  • TryGetAllInCurrent, TryGetAllInCurrent<T> - tries to get all available instances of the specified service in the specified IInjectorResolver, see the GetAllInCurrent and GetAllInCurrent<T> methods.
  • TryGetAllInCurrentInto, TryGetAllInCurrentInto<T> - tries to get all available instances of the specified service in the specified IInjectorResolver, see the TryGetAllInCurrentInto and TryGetAllInCurrentInto<T> methods.
  • TryGetAll, TryGetAll<T> - tries to get all available instances of the specified service in the specified IInjectorResolver includes all of its parent IInjectorResolver, see the GetAll and GetAll<T> methods.
  • TryGetAllInto, TryGetAllInto<T> - tries to get all available instances of the specified service in the specified IInjectorResolver includes all of its parent IInjectorResolver, see the GetAllInto and GetAllInto<T> methods.

Comments
Leave a Reply
*bold*
_italics_
+underline+
* Bullet List
** Bullet List 2
# Number List
## Number List 2
{"Do not apply formatting"}
{code:language} code here {code:language}.
Supports: aspx c#, c#, c++, html, sql, xml
[url:http://www.example.com]