BuildIt.Autofac.AutofacServiceLocator.DoGetInstance C# (CSharp) Method

DoGetInstance() protected method

Resolves the requested service instance.
/// Thrown if is . ///
protected DoGetInstance ( Type serviceType, string key ) : object
serviceType System.Type Type of instance requested.
key string Name of registered service you want. May be .
return object
        protected override object DoGetInstance(Type serviceType, string key)
        {
            if (serviceType == null)
            {
                throw new ArgumentNullException("serviceType");
            }
            return key != null ? container.ResolveNamed(key, serviceType) : container.Resolve(serviceType);
        }