view Implab.ServiceHost/Unity/AbstractRegistration.cs @ 274:22629bf26121 v3

Unity xml configuration, alpha2
author cin
date Fri, 27 Apr 2018 04:47:52 +0300
parents 79110a16cab7
children 963b17c275be
line wrap: on
line source

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

namespace Implab.ServiceHost.Unity
{
    public abstract class AbstractRegistration : ContainerItemElement {

        /// <summary>
        /// An optional name for a registration in the container
        /// </summary>
        [XmlAttribute("name")]
        public string Name {
            get; set;
        }

        [XmlElement("signleton", typeof(SimgletonLifetimeElement))]
        [XmlElement("context", typeof(ContextLifetimeElement))]
        [XmlElement("container", typeof(ContainerLifetimeElement))]
        [XmlElement("hierarchy", typeof(HierarchicalLifetimeElement))]
        public LifetimeElement Lifetime {get; set;}

        /// <summary>
        /// A type specification for the service registration, 
        /// </summary>
        [XmlAttribute("type")]
        public string RegistrationType { get; set; }

    }
}