Mercurial > pub > ImplabNet
annotate Implab.ServiceHost/Unity/DependencyParameterElement.cs @ 280:f07be402ab02 v3
Added Trace<T>.Debug(...) method for debug messages
Added ContainerBuilde.LoadConfig(Uri) method
author | cin |
---|---|
date | Fri, 25 May 2018 19:15:26 +0300 |
parents | 8714471e8d78 |
children | e0916ddc9950 |
rev | line source |
---|---|
272 | 1 using System.Xml.Serialization; |
2 | |
3 namespace Implab.ServiceHost.Unity { | |
277 | 4 public class DependencyParameterElement : InjectionParameterElement { |
272 | 5 |
6 [XmlAttribute("name")] | |
7 public string DependencyName { get; set; } | |
8 | |
9 [XmlAttribute("optional")] | |
10 public bool Optional { get; set; } | |
274 | 11 |
278
6691aff01de1
Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
277
diff
changeset
|
12 public override void Visit(InjectionParameterBuilder builder) { |
277 | 13 var type = builder.ResolveInjectedValueType(TypeName); |
279 | 14 builder.SetDependency(type, DependencyName, Optional); |
274 | 15 } |
270 | 16 } |
17 } |