public SpaceStationManager(
     Core.IEntityAccess entityAccess,
     Core.AbstractEntityManager <Entity.MarketEntry> marketEntryManager,
     Core.AbstractEntityManager <Entity.JumpConnection> jumpConnectionManager
     )
     : base(entityAccess)
 {
     _marketEntryManager    = marketEntryManager;
     _jumpConnectionManager = jumpConnectionManager;
 }
        public EntityManagerFactory(Core.IEntityAccess entityAccess)
        {
            var marketEntryManager = new MarketEntryManager(entityAccess);

            var commodityTypeManager  = new CommodityTypeManager(entityAccess, marketEntryManager);
            var commodityGroupManager = new CommodityGroupManager(entityAccess, commodityTypeManager);

            var jumpConnectionManager = new JumpConnectionManager(entityAccess);
            var spaceStationManager   = new SpaceStationManager(entityAccess, marketEntryManager, jumpConnectionManager);
            var solarSystemManager    = new SolarSystemManager(entityAccess, spaceStationManager);


            _entityManagerStore.Add(marketEntryManager);
            _entityManagerStore.Add(commodityTypeManager);
            _entityManagerStore.Add(commodityGroupManager);
            _entityManagerStore.Add(jumpConnectionManager);
            _entityManagerStore.Add(spaceStationManager);
            _entityManagerStore.Add(solarSystemManager);
        }
示例#3
0
        /// <summary>
        /// Initializes the controller. You should have added any entity watchers at this point.
        /// </summary>
        /// <param name="entityAccess">The object which provides access to the entities.</param>
        public void Initialize(Core.IEntityAccess entityAccess)
        {
            entityAccess.LoadAll();

            // Re-establish links
            _entityLinker.SetupLinks();

            // Tell all registered
            Action     OnInitialEntriesLoadedFunctionSample = OnInitialEntriesLoaded <Core.IEntity>;
            MethodInfo InfoOfInitialEntriesLoadedFunction   = OnInitialEntriesLoadedFunctionSample.Method.GetGenericMethodDefinition();

            foreach (var entityType in _handledTypes)
            {
                if (!_entityWatcherStore.HasEntityWatcher(entityType))
                {
                    continue;
                }

                var MethodInfoForCurrentType = InfoOfInitialEntriesLoadedFunction.MakeGenericMethod(entityType);
                MethodInfoForCurrentType.Invoke(this, null);
            }
        }
示例#4
0
 public SolarSystemManager(Core.IEntityAccess entityAccess, Core.AbstractEntityManager <Entity.SpaceStation> spaceStationManager)
     : base(entityAccess)
 {
     _spaceStationManager = spaceStationManager;
 }
示例#5
0
 public JumpConnectionManager(Core.IEntityAccess entityAccess)
     : base(entityAccess)
 {
 }
示例#6
0
 public EntityLinker(Core.IEntityAccess entityAccess)
 {
     _entityAccess = entityAccess;
 }
示例#7
0
 public MarketEntryManager(Core.IEntityAccess entityAccess)
     : base(entityAccess)
 {
 }
 public CommodityTypeManager(Core.IEntityAccess entityAccess, Core.AbstractEntityManager <Entity.MarketEntry> marketEntryManager)
     : base(entityAccess)
 {
     _marketEntryManager = marketEntryManager;
 }
 public CommodityGroupManager(Core.IEntityAccess entityAccess, Core.AbstractEntityManager <Entity.CommodityType> commodityTypeManager)
     : base(entityAccess)
 {
     _commodityTypeManager = commodityTypeManager;
 }