SerializedElement.cs
31 lines
| 895 B
| text/x-csharp
|
CSharpLexer
cin
|
r273 | using System; | |
cin
|
r279 | using System.Collections.Generic; | |
cin
|
r273 | using System.Xml; | |
using System.Xml.Serialization; | |||
cin
|
r279 | namespace Implab.ServiceHost.Unity { | |
public class SerializedElement : AbstractRegistration, IInstanceRegistration { | |||
cin
|
r273 | [XmlAttribute("href")] | |
public string Location { get; set; } | |||
[XmlAttribute("serializedType")] | |||
public string SerializedType { get; set; } | |||
[XmlAnyElement] | |||
public XmlElement[] Content { get; set; } | |||
cin
|
r274 | ||
cin
|
r279 | public IEnumerable<IInjectionParameter> MemberInjections { | |
get { | |||
yield return new SerializedParameterElement { | |||
TypeName = SerializedType, | |||
Location = Location, | |||
Content = Content | |||
}; | |||
} | |||
} | |||
cin
|
r273 | ||
cin
|
r279 | public override void Visit(ContainerBuilder builder) { | |
builder.Visit(this); | |||
cin
|
r275 | } | |
cin
|
r273 | } | |
} |