view Implab.ServiceHost/Unity/RegisterElement.cs @ 271:d4d437ec4483 v3

Working on Unity xml configuration
author cin
date Wed, 25 Apr 2018 19:23:35 +0300
parents ade80d94dfb5
children 9d1cca834b05
line wrap: on
line source

using System;
using System.Xml.Serialization;
using Unity.Lifetime;
using Unity.Registration;

namespace Implab.ServiceHost.Unity {

    [XmlRoot("register", Namespace = Schema.ContainerConfigurationNamespace)]
    public class RegisterElement : AbstractRegistration  {
        
        /// <summary>
        /// An optional type which is registered as a service in the container, must be assignable to <see cref="ProvidesType">.
        /// </summary>
        [XmlAttribute("type")]
        public string ImplementedType { get; set; }


        [XmlElement("constructor", typeof(ConstructorInjectionElement))]
        [XmlElement("property", typeof(PropertyInjectionElement))]
        [XmlElement("method", typeof(MethodInjectionElement))]
        public AbstractInjectionElement[] Injectors { get; set; }
    }
    
}