function ServiceBag.Init(z)assert(not z._initializing,"\065\108\114\101\097\100\121 \105\110\105\116\105\097\108\105\122\105\110\103")assert(z._serviceTypesToInitializeSet,"\065\108\114\101\097\100\121 \105\110\105\116\105\097\108\105\122\101\100")z._initializing=true while next(z._serviceTypesToInitializeSet)do local p=next(z._serviceTypesToInitializeSet)z._serviceTypesToInitializeSet[p]=nil z:_ensureInitialization(p)end z._serviceTypesToInitializeSet=nil z._initializing=false end
--[=[
	Initializes the service bag and ensures recursive initialization
	can occur
]=]
function ServiceBag:Init()
	assert(not self._initializing, "Already initializing")
	assert(self._serviceTypesToInitializeSet, "Already initialized")
	self._initializing = true

	while next(self._serviceTypesToInitializeSet) do
		local serviceType = next(self._serviceTypesToInitializeSet)
		self._serviceTypesToInitializeSet[serviceType] = nil

		self:_ensureInitialization(serviceType)
	end

	self._serviceTypesToInitializeSet = nil
	self._initializing = false
end
