Mercurial > pub > ImplabNet
diff Implab.ServiceHost/Unity/ContainerConfigurationSchema.cs @ 277:963b17c275be v3
Refactoring
Added <array> element to injection parameters
Working on registrations of factories
author | cin |
---|---|
date | Sat, 28 Apr 2018 18:48:09 +0300 |
parents | 22629bf26121 |
children | 6691aff01de1 |
line wrap: on
line diff
--- a/Implab.ServiceHost/Unity/ContainerConfigurationSchema.cs Sat Apr 28 00:11:38 2018 +0300 +++ b/Implab.ServiceHost/Unity/ContainerConfigurationSchema.cs Sat Apr 28 18:48:09 2018 +0300 @@ -33,15 +33,15 @@ Safe.ArgumentNotNull(type, nameof(type)); Safe.ArgumentNotEmpty(name, nameof(name)); - if(!type.IsSubclassOf(typeof(ContainerItemElement))) - throw new Exception($"RegisterContainerElement '{name}': {type} must be subclass of {typeof(ContainerItemElement)}"); + if(!type.IsSubclassOf(typeof(AbstractContainerItem))) + throw new Exception($"RegisterContainerElement '{name}': {type} must be subclass of {typeof(AbstractContainerItem)}"); m_containerItems.XmlElements.Add( new XmlElementAttribute(name, type) ); } - public void RegisterContainerElement<T>(string name) where T : ContainerItemElement { + public void RegisterContainerElement<T>(string name) where T : AbstractContainerItem { RegisterContainerElement(typeof(T), name); }