private void CloseCurrentTypeIfRequired(TypeRequestInfo typeRequestInfoForTypeJustConstructed) { lock (_serviceLocator.LockObject) { if (_currentTypeRequestPath != null) { _currentTypeRequestPath.MarkTypeAsNotCreated(typeRequestInfoForTypeJustConstructed); if (_currentTypeRequestPath.TypeCount == 1) { // We failed to create the only type in the request path, exit _currentTypeRequestPath = null; } } } }