267
|
1 using Implab.Xml;
|
|
2 using System.Collections.Generic;
|
|
3 using System.Xml;
|
|
4 using System.Xml.Schema;
|
|
5 using System.Xml.Serialization;
|
|
6
|
|
7 namespace Implab.ServiceHost.Unity {
|
|
8 [XmlRoot("container", Namespace = Schema.ContainerConfigurationNamespace)]
|
|
9 public class ContainerElement : IXmlSerializable {
|
|
10
|
|
11 public List<ServiceElement> Registrations {get; set; } = new List<ServiceElement>();
|
|
12
|
|
13 public XmlSchema GetSchema() {
|
|
14 return null;
|
|
15 }
|
|
16
|
|
17 public void ReadXml(XmlReader reader) {
|
|
18 while(reader.Read() && reader.NodeType != XmlNodeType.EndElement) {
|
|
19 var registration = SerializationHelpers.Deserialize<ServiceElement>(reader);
|
|
20 Registrations.Add(registration);
|
|
21 }
|
|
22 }
|
|
23
|
|
24 public void WriteXml(XmlWriter writer) {
|
|
25 throw new System.NotImplementedException();
|
|
26 }
|
|
27 }
|
|
28 } |