/// <inheritdoc /> public ComponentHandle ResolveHandleByComponentId(string componentId) { if (componentId == null) { throw new ArgumentNullException("componentId"); } IComponentDescriptor descriptor = ResolveNonDisabledDescriptorByComponentId(componentId); return(ComponentHandle.CreateInstance(descriptor)); }
/// <inheritdoc /> public IList <ComponentHandle <TService, TTraits> > ResolveAllHandles <TService, TTraits>() where TTraits : Traits { var result = new List <ComponentHandle <TService, TTraits> >(); foreach (IComponentDescriptor descriptor in ResolveAllNonDisabledDescriptors(typeof(TService))) { result.Add(ComponentHandle.CreateInstance <TService, TTraits>(descriptor)); } return(result); }
/// <inheritdoc /> public ComponentHandle ResolveHandle(Type serviceType) { if (serviceType == null) { throw new ArgumentNullException("serviceType"); } IComponentDescriptor descriptor = ResolveNonDisabledDescriptor(serviceType); return(ComponentHandle.CreateInstance(descriptor)); }
/// <inheritdoc /> public IList <ComponentHandle> ResolveAllHandles(Type serviceType) { if (serviceType == null) { throw new ArgumentNullException("serviceType"); } var result = new List <ComponentHandle>(); foreach (IComponentDescriptor descriptor in ResolveAllNonDisabledDescriptors(serviceType)) { result.Add(ComponentHandle.CreateInstance(descriptor)); } return(result); }
/// <inheritdoc /> public ComponentHandle <TService, TTraits> ResolveHandle <TService, TTraits>() where TTraits : Traits { IComponentDescriptor descriptor = ResolveNonDisabledDescriptor(typeof(TService)); return(ComponentHandle.CreateInstance <TService, TTraits>(descriptor)); }