CSP_Foundation.StructureMapDependencyResolver.DoGetInstance C# (CSharp) Method

DoGetInstance() protected method

protected DoGetInstance ( Type serviceType, string key ) : object
serviceType System.Type
key string
return object
        protected override object DoGetInstance(Type serviceType, string key)
        {
            var container = (CurrentNestedContainer ?? Container);

            if (string.IsNullOrEmpty(key))
            {
                return serviceType.IsAbstract || serviceType.IsInterface
                           ? container.TryGetInstance(serviceType)
                           : container.GetInstance(serviceType);
            }

            return container.GetInstance(serviceType, key);
        }