Mercurial > pub > ImplabNet
diff Implab.ServiceHost/Unity/AbstractRegistration.cs @ 273:79110a16cab7 v3
Working on Unity xml configuration: Refactoring in progress
author | cin |
---|---|
date | Thu, 26 Apr 2018 19:35:01 +0300 |
parents | 9d1cca834b05 |
children | 22629bf26121 |
line wrap: on
line diff
--- a/Implab.ServiceHost/Unity/AbstractRegistration.cs Thu Apr 26 03:14:54 2018 +0300 +++ b/Implab.ServiceHost/Unity/AbstractRegistration.cs Thu Apr 26 19:35:01 2018 +0300 @@ -5,7 +5,7 @@ namespace Implab.ServiceHost.Unity { - public abstract class AbstractRegistration : IConfigurationElement { + public abstract class AbstractRegistration : ContainerItemElement { /// <summary> /// An optional name for a registration in the container @@ -24,9 +24,12 @@ /// <summary> /// A type specification for the service registration, /// </summary> - [XmlAttribute("provides")] - public string ProvidesType { get; set; } + [XmlAttribute("type")] + public string RegistrationType { get; set; } - public abstract void Visit(ConfigurationContext context); + public virtual Type ResolveRegistrationType(ContainerContext ctx) { + return ctx.Resolve(RegistrationType); + } + } } \ No newline at end of file