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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
272
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
1 using System.Xml.Serialization;
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
2
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
3 namespace Implab.ServiceHost.Unity {
277
963b17c275be Refactoring
cin
parents: 275
diff changeset
4 public class DependencyParameterElement : InjectionParameterElement {
272
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
5
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
6 [XmlAttribute("name")]
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
7 public string DependencyName { get; set; }
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
8
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
9 [XmlAttribute("optional")]
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 270
diff changeset
10 public bool Optional { get; set; }
274
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
11
278
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents: 277
diff changeset
12 public override void Visit(InjectionParameterBuilder builder) {
277
963b17c275be Refactoring
cin
parents: 275
diff changeset
13 var type = builder.ResolveInjectedValueType(TypeName);
279
8714471e8d78 Container configuration cleanup, RC2
cin
parents: 278
diff changeset
14 builder.SetDependency(type, DependencyName, Optional);
274
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
15 }
270
ade80d94dfb5 Working on Unity container xml configuration
cin
parents:
diff changeset
16 }
ade80d94dfb5 Working on Unity container xml configuration
cin
parents:
diff changeset
17 }