示例#1
0
        private object GetInstance(RegisteredObject service)
        {
            if (service.Instance == null || service.LifeCycle == LifeCycle.Transient)
            {
                var parameters = ResolveConstructorParameters(service);
                service.CreateInstance(parameters.ToArray());
            }

            return(service.Instance);
        }