Mercurial > pub > ImplabNet
comparison Implab.ServiceHost/Unity/ContainerElement.cs @ 267:6b3e5c48131b v3
Working on Unity xml configuration
author | cin |
---|---|
date | Fri, 20 Apr 2018 19:05:12 +0300 |
parents | |
children | ff581cff7003 |
comparison
equal
deleted
inserted
replaced
266:254d1f255d87 | 267:6b3e5c48131b |
---|---|
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 } |