示例#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()));
 }
示例#2
0
 public override string ToString() => $"ConcreteType={ImplementationType.Name} ContractTypes={string.Join(", ", InterfaceTypes)} {Lifetime} {injector.GetType().Name}";
示例#3
0
        public override string ToString()
        {
            var contractTypes = InterfaceTypes != null?string.Join(", ", InterfaceTypes) : "";

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

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