comparison Implab.ServiceHost/Unity/RegisterElement.cs @ 274:22629bf26121 v3

Unity xml configuration, alpha2
author cin
date Fri, 27 Apr 2018 04:47:52 +0300
parents 79110a16cab7
children 963b17c275be
comparison
equal deleted inserted replaced
273:79110a16cab7 274:22629bf26121
18 [XmlElement("constructor", typeof(ConstructorInjectionElement))] 18 [XmlElement("constructor", typeof(ConstructorInjectionElement))]
19 [XmlElement("property", typeof(PropertyInjectionElement))] 19 [XmlElement("property", typeof(PropertyInjectionElement))]
20 [XmlElement("method", typeof(MethodInjectionElement))] 20 [XmlElement("method", typeof(MethodInjectionElement))]
21 public AbstractInjectionElement[] Injectors { get; set; } 21 public AbstractInjectionElement[] Injectors { get; set; }
22 22
23 public override void Visit(ContainerContext context) { 23 public override void Visit(ContainerBuilder context) {
24 context.Visit(this); 24 context.Visit(this);
25 }
26
27 public virtual Type ResolveImplementationType(ContainerContext ctx) {
28 return string.IsNullOrEmpty(MapToType) ?
29 ResolveRegistrationType(ctx) :
30 ctx.Resolve(MapToType);
31 } 25 }
32 } 26 }
33 27
34 } 28 }