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
|
275
|
12 public override void Visit(InjectionValueBuilder builder) {
|
277
|
13 var type = builder.ResolveInjectedValueType(TypeName);
|
|
14 builder.SetDependencyReference(type, DependencyName, Optional);
|
274
|
15 }
|
270
|
16 }
|
|
17 } |