##// END OF EJS Templates
Working on Unity xml configuration: Refactoring in progress
Working on Unity xml configuration: Refactoring in progress

File last commit:

r273:79110a16cab7 v3
r273:79110a16cab7 v3
Show More
AbstractRegistration.cs
34 lines | 1.0 KiB | text/x-csharp | CSharpLexer
cin
Working on Unity container xml configuration
r269 using System;
using System.Xml.Serialization;
using Unity.Lifetime;
using Unity.Registration;
namespace Implab.ServiceHost.Unity
{
cin
Working on Unity xml configuration: Refactoring in progress
r273 public abstract class AbstractRegistration : ContainerItemElement {
cin
Working on Unity container xml configuration
r269
/// <summary>
/// An optional name for a registration in the container
/// </summary>
[XmlAttribute("name")]
public string Name {
get; set;
}
cin
Working on Unity xml configuration
r271 [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>
cin
Working on Unity xml configuration: Refactoring in progress
r273 [XmlAttribute("type")]
public string RegistrationType { get; set; }
cin
Working on Unity xml configuration
r271
cin
Working on Unity xml configuration: Refactoring in progress
r273 public virtual Type ResolveRegistrationType(ContainerContext ctx) {
return ctx.Resolve(RegistrationType);
}
cin
Working on Unity container xml configuration
r269 }
}