Exemple #1
0
 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}";
Exemple #3
0
        public override string ToString()
        {
            var contractTypes = InterfaceTypes != null?string.Join(", ", InterfaceTypes) : "";

            return($"InstanceComponentRegistration {instance.GetType()} ContractTypes=[{contractTypes}] {Lifetime} {injector.GetType().Name})]");
        }
Exemple #4
0
        public override string ToString()
        {
            var contractTypes = InterfaceTypes != null?string.Join(", ", InterfaceTypes) : "";

            return($"Registration {ImplementationType.Name} ContractTypes=[{contractTypes}] {Lifetime} {injector.GetType().Name}");
        }