view Implab.ServiceHost/Unity/DefaultParameterElement.cs @ 279:8714471e8d78 v3

Container configuration cleanup, RC2
author cin
date Fri, 04 May 2018 18:12:42 +0300
parents 6691aff01de1
children e0916ddc9950
line wrap: on
line source

namespace Implab.ServiceHost.Unity
{
    public class DefaultParameterElement : InjectionParameterElement {
        public string Value {
            get { return null; }
        }

        public override void Visit(InjectionParameterBuilder builder) {
            var type = builder.ResolveInjectedValueType(TypeName);
            builder.SetValue(type, Safe.CreateDefaultValue(type));
        }
    }
}