ContainerElement.cs
27 lines
| 898 B
| text/x-csharp
|
CSharpLexer
cin
|
r267 | using Implab.Xml; | |
using System.Collections.Generic; | |||
using System.Xml; | |||
using System.Xml.Schema; | |||
using System.Xml.Serialization; | |||
namespace Implab.ServiceHost.Unity { | |||
[XmlRoot("container", Namespace = Schema.ContainerConfigurationNamespace)] | |||
public class ContainerElement : IXmlSerializable { | |||
cin
|
r270 | public List<IConfigurationElement> Items {get; set; } = new List<IConfigurationElement>(); | |
cin
|
r267 | ||
public XmlSchema GetSchema() { | |||
return null; | |||
} | |||
public void ReadXml(XmlReader reader) { | |||
while(reader.Read() && reader.NodeType != XmlNodeType.EndElement) { | |||
cin
|
r269 | var registration = ConfigurationSchema.Default.Deserialize<IConfigurationElement>(reader); | |
cin
|
r270 | Items.Add(registration); | |
cin
|
r267 | } | |
} | |||
public void WriteXml(XmlWriter writer) { | |||
throw new System.NotImplementedException(); | |||
} | |||
} | |||
} |