##// END OF EJS Templates
sync, minor changes
sync, minor changes

File last commit:

r279:8714471e8d78 v3
r284:bcb6c16f6fed v3
Show More
RegisterElement.cs
38 lines | 1.2 KiB | text/x-csharp | CSharpLexer
cin
Working on Unity container xml configuration
r269 using System;
cin
Container configuration cleanup, RC2
r279 using System.Collections.Generic;
cin
Working on Unity container xml configuration
r269 using System.Xml.Serialization;
using Unity.Lifetime;
using Unity.Registration;
namespace Implab.ServiceHost.Unity {
[XmlRoot("register", Namespace = Schema.ContainerConfigurationNamespace)]
cin
Container configuration cleanup, RC2
r279 public class RegisterElement : AbstractRegistration, ITypeRegistration {
cin
Working on Unity container xml configuration
r269
/// <summary>
cin
Working on Unity xml configuration
r271 /// An optional type which is registered as a service in the container, must be assignable to <see cref="ProvidesType">.
cin
Working on Unity container xml configuration
r269 /// </summary>
cin
Working on Unity xml configuration: Refactoring in progress
r273 [XmlAttribute("mapTo")]
public string MapToType { get; set; }
cin
Working on Unity container xml configuration
r269
cin
Working on Unity container xml configuration
r270 [XmlElement("constructor", typeof(ConstructorInjectionElement))]
[XmlElement("property", typeof(PropertyInjectionElement))]
[XmlElement("method", typeof(MethodInjectionElement))]
cin
Refactoring...
r277 public AbstractMemberInjection[] Injectors { get; set; }
cin
Container configuration cleanup, RC2
r279 IEnumerable<ITypeMemberInjection> ITypeRegistration.MemberInjections {
get {
return Injectors;
}
cin
Refactoring...
r277 }
cin
preview version of Unity xml configuration
r272
cin
Container configuration cleanup, RC2
r279 public Type GetImplementationType(ContainerBuilder builder) {
return builder.ResolveType(MapToType);
cin
preview version of Unity xml configuration
r272 }
cin
Refactoring...
r277
cin
Container configuration cleanup, RC2
r279 public override void Visit(ContainerBuilder builder) {
builder.Visit(this);
}
cin
Working on Unity container xml configuration
r269 }
}