コード例 #1
0
 private object GetInstance(RegisteredObject registeredObject)
 {
     if (registeredObject.Instance == null ||
         registeredObject.LifeCycle == LifeCycle.Transient)
     {
         var parameters = ResolveConstructorParameters(registeredObject);
         registeredObject.CreateInstance(parameters.ToArray());
     }
     return(registeredObject.Instance);
 }