annotate Implab.ServiceHost/Unity/ValueElement.cs @ 275:6fefd5811b9b v3

refactoring
author cin
date Fri, 27 Apr 2018 16:57:30 +0300
parents 22629bf26121
children 963b17c275be
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
273
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
1 using System.Xml.Serialization;
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
2
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
3 namespace Implab.ServiceHost.Unity {
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
4 public class ValueElement : AbstractRegistration, ITextValue {
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
5
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
6 [XmlAttribute("value")]
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
7 public string Value { get; set; }
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
8
274
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
9 [XmlText]
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
10 public string Text { get; set; }
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
11
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
12 string ITextValue.Value {
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
13 get {
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
14 return string.IsNullOrEmpty(Value) ? Text : Value;
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
15 }
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
16 }
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
17
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
18 public string TypeName {
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
19 get {
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
20 return RegistrationType;
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
21 }
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
22 }
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
23
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
24 public override void Visit(ContainerBuilder context) {
273
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
25 context.Visit(this);
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
26 }
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
27 }
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents:
diff changeset
28 }