/// <summary> /// Return handlers for components that implements the specified service. The check is made using IsAssignableFrom /// </summary> /// <param name = "service"> </param> /// <returns> </returns> public virtual IHandler[] GetAssignableHandlers(Type service) { var result = NamingSubSystem.GetAssignableHandlers(service); // If a parent kernel exists, we merge both results var parentResult = Parent?.GetAssignableHandlers(service); if (!(parentResult?.Length > 0)) { return(result); } var newResult = new IHandler[result.Length + parentResult.Length]; result.CopyTo(newResult, 0); parentResult.CopyTo(newResult, result.Length); result = newResult; return(result); }
/// <summary> /// Return handlers for components that /// implements the specified service. /// The check is made using IsAssignableFrom /// </summary> /// <param name="service"></param> /// <returns></returns> public virtual IHandler[] GetAssignableHandlers(Type service) { return(NamingSubSystem.GetAssignableHandlers(service)); }