예제 #1
0
        private object GetInstance(IDependency dependency)
        {
            if (dependency.Instance == null || dependency.Scope == InstantiationScope.NonSingleton)
            {
                var parameters = ResolveConstructorParameters(dependency);

                dependency.CreateInstance(parameters.ToArray());
            }

            return(dependency.Instance);
        }