##// END OF EJS Templates
Working on Unity container xml configuration
Working on Unity container xml configuration

File last commit:

r269:ff581cff7003 v3
r269:ff581cff7003 v3
Show More
ContainerElement.cs
27 lines | 914 B | text/x-csharp | CSharpLexer
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 {
public List<IConfigurationElement> Registrations {get; set; } = new List<IConfigurationElement>();
public XmlSchema GetSchema() {
return null;
}
public void ReadXml(XmlReader reader) {
while(reader.Read() && reader.NodeType != XmlNodeType.EndElement) {
var registration = ConfigurationSchema.Default.Deserialize<IConfigurationElement>(reader);
Registrations.Add(registration);
}
}
public void WriteXml(XmlWriter writer) {
throw new System.NotImplementedException();
}
}
}