Mercurial > pub > ImplabNet
view Implab.ServiceHost/Unity/DependencyParameterElement.cs @ 281:e0916ddc9950 v3 tip
code cleanup and refactoring
author | cin |
---|---|
date | Fri, 01 Jun 2018 21:35:24 +0300 |
parents | 8714471e8d78 |
children |
line wrap: on
line source
using System.Xml.Serialization; namespace Implab.ServiceHost.Unity { public class DependencyParameterElement : AbstractInjectionParameter { [XmlAttribute("name")] public string DependencyName { get; set; } [XmlAttribute("optional")] public bool Optional { get; set; } public override void Visit(InjectionParameterBuilder builder) { var type = builder.ResolveInjectedValueType(TypeName); builder.SetDependency(type, DependencyName, Optional); } } }