private void RunInjector(IInjector injector) { injector.GetType() .GetRuntimeMethods() .Select(m => new { Method = m, Attributes = m.GetCustomAttributes().OfType <MemberInjectAttribute>() }) .Where(m => m.Attributes.Count() == 1) .ToList() .ForEach(m => RunInjectionMethod(injector, m.Method, m.Attributes.Single())); }
public override string ToString() => $"ConcreteType={ImplementationType.Name} ContractTypes={string.Join(", ", InterfaceTypes)} {Lifetime} {injector.GetType().Name}";
public override string ToString() { var contractTypes = InterfaceTypes != null?string.Join(", ", InterfaceTypes) : ""; return($"InstanceComponentRegistration {instance.GetType()} ContractTypes=[{contractTypes}] {Lifetime} {injector.GetType().Name})]"); }
public override string ToString() { var contractTypes = InterfaceTypes != null?string.Join(", ", InterfaceTypes) : ""; return($"Registration {ImplementationType.Name} ContractTypes=[{contractTypes}] {Lifetime} {injector.GetType().Name}"); }