comparison Implab.ServiceHost/Unity/ContainerElement.cs @ 270:ade80d94dfb5 v3

Working on Unity container xml configuration
author cin
date Wed, 25 Apr 2018 04:44:40 +0300
parents ff581cff7003
children d4d437ec4483
comparison
equal deleted inserted replaced
269:ff581cff7003 270:ade80d94dfb5
6 6
7 namespace Implab.ServiceHost.Unity { 7 namespace Implab.ServiceHost.Unity {
8 [XmlRoot("container", Namespace = Schema.ContainerConfigurationNamespace)] 8 [XmlRoot("container", Namespace = Schema.ContainerConfigurationNamespace)]
9 public class ContainerElement : IXmlSerializable { 9 public class ContainerElement : IXmlSerializable {
10 10
11 public List<IConfigurationElement> Registrations {get; set; } = new List<IConfigurationElement>(); 11 public List<IConfigurationElement> Items {get; set; } = new List<IConfigurationElement>();
12 12
13 public XmlSchema GetSchema() { 13 public XmlSchema GetSchema() {
14 return null; 14 return null;
15 } 15 }
16 16
17 public void ReadXml(XmlReader reader) { 17 public void ReadXml(XmlReader reader) {
18 while(reader.Read() && reader.NodeType != XmlNodeType.EndElement) { 18 while(reader.Read() && reader.NodeType != XmlNodeType.EndElement) {
19 var registration = ConfigurationSchema.Default.Deserialize<IConfigurationElement>(reader); 19 var registration = ConfigurationSchema.Default.Deserialize<IConfigurationElement>(reader);
20 Registrations.Add(registration); 20 Items.Add(registration);
21 } 21 }
22 } 22 }
23 23
24 public void WriteXml(XmlWriter writer) { 24 public void WriteXml(XmlWriter writer) {
25 throw new System.NotImplementedException(); 25 throw new System.NotImplementedException();