Mercurial > pub > ImplabNet
comparison Implab.ServiceHost/Unity/SerializedParameterElement.cs @ 278:6691aff01de1 v3
Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
Implab.ServiceHost: rewritten TypeReference (added support for nested types), stable API
author | cin |
---|---|
date | Thu, 03 May 2018 09:59:44 +0300 |
parents | 963b17c275be |
children | e0916ddc9950 |
comparison
equal
deleted
inserted
replaced
277:963b17c275be | 278:6691aff01de1 |
---|---|
19 return Content[0].CreateNavigator().ReadSubtree(); | 19 return Content[0].CreateNavigator().ReadSubtree(); |
20 | 20 |
21 throw new Exception("No content found, expected XML document"); | 21 throw new Exception("No content found, expected XML document"); |
22 } | 22 } |
23 | 23 |
24 public override void Visit(InjectionValueBuilder builder) { | 24 public override void Visit(InjectionParameterBuilder builder) { |
25 var type = builder.ResolveInjectedValueType(TypeName); | 25 var type = builder.ResolveInjectedValueType(TypeName); |
26 | 26 |
27 var serializer = new XmlSerializer(type); | 27 var serializer = new XmlSerializer(type); |
28 using(var reader = GetReader()) | 28 using(var reader = GetReader()) |
29 builder.SetValue(type, serializer.Deserialize(reader)); | 29 builder.SetValue(type, serializer.Deserialize(reader)); |