Mercurial > pub > ImplabNet
annotate Implab.ServiceHost/Unity/SerializedElement.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 | 8714471e8d78 |
rev | line source |
---|---|
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
1 using System; |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
2 using System.Xml; |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
3 using System.Xml.Serialization; |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
4 |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
5 namespace Implab.ServiceHost.Unity |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
6 { |
277 | 7 public class SerializedElement : InstanceAbstractRegistration { |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
8 [XmlAttribute("href")] |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
9 public string Location { get; set; } |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
10 |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
11 [XmlAttribute("serializedType")] |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
12 public string SerializedType { get; set; } |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
13 |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
14 |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
15 [XmlAnyElement] |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
16 public XmlElement[] Content { get; set; } |
274 | 17 |
277 | 18 public override void Visit(InstanceRegistrationBuilder builder) { |
19 base.Visit(builder); | |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
20 |
277 | 21 var parameter = new SerializedParameterElement { |
22 TypeName = SerializedType, | |
23 Location = Location, | |
24 Content = Content | |
25 }; | |
26 parameter.Visit(builder.ValueBuilder); | |
275 | 27 } |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
28 } |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
29 } |