Catel.IoC.TypeFactory.CloseCurrentTypeIfRequired C# (CSharp) Метод

CloseCurrentTypeIfRequired() приватный Метод

Marks the specified type as not being created. If this was the only type being constructed, the type request path will be closed.
private CloseCurrentTypeIfRequired ( Catel.IoC.TypeRequestInfo typeRequestInfoForTypeJustConstructed ) : void
typeRequestInfoForTypeJustConstructed Catel.IoC.TypeRequestInfo The type request info for type just constructed.
Результат void
        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;
                    }
                }
            }
        }