public IContainer Build()
        {
            var container = new DryIocContainerAdapter();

            _dryContainer.RegisterInstance <IContainer>(container, IfAlreadyRegistered.Keep);

            _dryContainer = _dryContainer.WithNoMoreRegistrationAllowed(); // lock for new registrations

            container.Initialize(_dryContainer);

            _buildActions.Apply(action => action?.Invoke(container));
            _buildActions.Clear();

            return(container);
        }