private function resolveServiceProvider(string $name)
    {
        list($service, $isShared) = $this->serviceProviders[$name]->resolve($name, $this);

        if ($isShared) {
            $this->resolvedSharedServices[$name] = $service;
        }

        return $service;
    }