Ejemplo n.º 1
0
 public void Dispose()
 {
     if (!_alreadyBuilt)
     {
         ContainerProvider <TState> .EndCreation();
     }
     foreach (var systemType in _registeredSystems)
     {
         GetSystem(systemType).Dispose();
     }
 }
Ejemplo n.º 2
0
        public IContainer <TState> Build()
        {
            if (_alreadyBuilt)
            {
                throw new InvalidOperationException("Container is already built");
            }
            _resolver.Compile();
            foreach (var type in _registeredTypes)
            {
                _resolver.Resolve(type);
            }
            BuildExecutionOrder();
            _alreadyBuilt = true;
            ContainerProvider <TState> .EndCreation();

            return(this);
        }