##// END OF EJS Templates
code cleanup and refactoring
code cleanup and refactoring

File last commit:

r281:e0916ddc9950 v3
r281:e0916ddc9950 v3
Show More
ValueParameterElement.cs
20 lines | 671 B | text/x-csharp | CSharpLexer
cin
Refactoring...
r277 using System.ComponentModel;
cin
preview version of Unity xml configuration
r272 using System.Xml.Serialization;
cin
Unity xml configuration, alpha2
r274 namespace Implab.ServiceHost.Unity {
cin
code cleanup and refactoring
r281 public class ValueParameterElement : AbstractInjectionParameter {
cin
Working on Unity xml configuration: Refactoring in progress
r273 [XmlAttribute("value")]
cin
preview version of Unity xml configuration
r272 public string Value { get; set; }
cin
Refactoring...
r277 [XmlText]
public string Text { get; set; }
string GetTextValue() {
return string.IsNullOrEmpty(Value) ? Text : Value;
}
cin
Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)...
r278 public override void Visit(InjectionParameterBuilder builder) {
cin
Refactoring...
r277 var type = builder.ResolveInjectedValueType(TypeName);
builder.SetValue(type, TypeDescriptor.GetConverter(type).ConvertFromString(GetTextValue()));
cin
preview version of Unity xml configuration
r272 }
cin
Working on Unity container xml configuration
r270 }
}