annotate Implab.ServiceHost/Unity/RegisterElement.cs @ 274:22629bf26121 v3

Unity xml configuration, alpha2
author cin
date Fri, 27 Apr 2018 04:47:52 +0300
parents 79110a16cab7
children 963b17c275be
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
269
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
1 using System;
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
2 using System.Xml.Serialization;
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
3 using Unity.Lifetime;
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
4 using Unity.Registration;
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
5
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
6 namespace Implab.ServiceHost.Unity {
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
7
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
8 [XmlRoot("register", Namespace = Schema.ContainerConfigurationNamespace)]
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
9 public class RegisterElement : AbstractRegistration {
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
10
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
11 /// <summary>
271
d4d437ec4483 Working on Unity xml configuration
cin
parents: 270
diff changeset
12 /// An optional type which is registered as a service in the container, must be assignable to <see cref="ProvidesType">.
269
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
13 /// </summary>
273
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents: 272
diff changeset
14 [XmlAttribute("mapTo")]
79110a16cab7 Working on Unity xml configuration: Refactoring in progress
cin
parents: 272
diff changeset
15 public string MapToType { get; set; }
269
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
16
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
17
270
ade80d94dfb5 Working on Unity container xml configuration
cin
parents: 269
diff changeset
18 [XmlElement("constructor", typeof(ConstructorInjectionElement))]
ade80d94dfb5 Working on Unity container xml configuration
cin
parents: 269
diff changeset
19 [XmlElement("property", typeof(PropertyInjectionElement))]
ade80d94dfb5 Working on Unity container xml configuration
cin
parents: 269
diff changeset
20 [XmlElement("method", typeof(MethodInjectionElement))]
ade80d94dfb5 Working on Unity container xml configuration
cin
parents: 269
diff changeset
21 public AbstractInjectionElement[] Injectors { get; set; }
272
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 271
diff changeset
22
274
22629bf26121 Unity xml configuration, alpha2
cin
parents: 273
diff changeset
23 public override void Visit(ContainerBuilder context) {
272
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 271
diff changeset
24 context.Visit(this);
9d1cca834b05 preview version of Unity xml configuration
cin
parents: 271
diff changeset
25 }
269
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
26 }
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
27
ff581cff7003 Working on Unity container xml configuration
cin
parents:
diff changeset
28 }