comparison Implab.ServiceHost/Unity/FactoryElement.cs @ 281:e0916ddc9950 v3 tip

code cleanup and refactoring
author cin
date Fri, 01 Jun 2018 21:35:24 +0300
parents 8714471e8d78
children
comparison
equal deleted inserted replaced
280:f07be402ab02 281:e0916ddc9950
34 foreach(var item in Provides) { 34 foreach(var item in Provides) {
35 var activator = new FactoryActivator { 35 var activator = new FactoryActivator {
36 Name = item.RegistrationName, 36 Name = item.RegistrationName,
37 RegistrationType = builder.ResolveType(item.RegistrationType), 37 RegistrationType = builder.ResolveType(item.RegistrationType),
38 FactoryName = Name, 38 FactoryName = Name,
39 FactoryType = factoryType 39 FactoryType = factoryType,
40 Lifetime = item.Lifetime.GetLifetime(builder)
40 }; 41 };
41 builder.Visit(activator); 42 builder.Visit(activator);
42 } 43 }
43 } else { 44 } else {
44 // если регистрация явно не задана, в качестве сервиса для регистрации 45 // если регистрация явно не задана, в качестве сервиса для регистрации