using System;
using System.Xml.Serialization;
using Unity.Lifetime;
using Unity.Registration;
namespace Implab.ServiceHost.Unity
{
public abstract class AbstractRegistration : IConfigurationElement {
///
/// An optional name for a registration in the container
///
[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;}
///
/// A type specification for the service registration,
///
[XmlAttribute("provides")]
public string ProvidesType { get; set; }
public void Visit(ConfigurationContext context) {
context.Visit(this);
}
}
}