Mercurial > pub > ImplabNet
annotate Implab.ServiceHost/Unity/SerializedElement.cs @ 280:f07be402ab02 v3
Added Trace<T>.Debug(...) method for debug messages
Added ContainerBuilde.LoadConfig(Uri) method
author | cin |
---|---|
date | Fri, 25 May 2018 19:15:26 +0300 |
parents | 8714471e8d78 |
children |
rev | line source |
---|---|
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
1 using System; |
279 | 2 using System.Collections.Generic; |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
3 using System.Xml; |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
4 using System.Xml.Serialization; |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
5 |
279 | 6 namespace Implab.ServiceHost.Unity { |
7 public class SerializedElement : AbstractRegistration, IInstanceRegistration { | |
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 |
279 | 18 public IEnumerable<IInjectionParameter> MemberInjections { |
19 get { | |
20 yield return new SerializedParameterElement { | |
21 TypeName = SerializedType, | |
22 Location = Location, | |
23 Content = Content | |
24 }; | |
25 } | |
26 } | |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
27 |
279 | 28 public override void Visit(ContainerBuilder builder) { |
29 builder.Visit(this); | |
275 | 30 } |
273
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
31 } |
79110a16cab7
Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff
changeset
|
32 } |