private static ServiceDescriptor SetPropertyInjection(ServiceDescriptor descriptor, IPropertyResolverFactory resolverFactory)
 {
     if (resolverFactory.GetResolvers(descriptor.GetImplementationType()).Any())
     {
         if (null != descriptor.ImplementationInstance)
         {
             return(ServiceDescriptor.Describe(descriptor.ServiceType, provider =>
             {
                 provider.PropertyInjection(descriptor.ImplementationInstance);
                 return descriptor.ImplementationInstance;
             }, descriptor.Lifetime));
         }
         else if (null != descriptor.ImplementationFactory)
         {
             return(ServiceDescriptor.Describe(descriptor.ServiceType, provider =>
             {
                 var instance = descriptor.ImplementationFactory(provider);
                 provider.PropertyInjection(instance);
                 return instance;
             }, descriptor.Lifetime));
         }
         else
         {
             return(ServiceDescriptor.Describe(descriptor.ServiceType, provider =>
             {
                 var instance = ActivatorUtilities.CreateInstance(provider, descriptor.ImplementationType);
                 provider.PropertyInjection(instance);
                 return instance;
             }, descriptor.Lifetime));
         }
     }
     return(descriptor);
 }
 public IPropertyInjection Create(Type implementationType)
 {
     return _propertyInjections.GetOrAdd(implementationType, key => new DefaultPropertyInjection(_serviceProvider, _resolverFactory.GetResolvers(implementationType)));
 }