コード例 #1
0
 public ComponentByIdDataLoader(
     IComponentStore componentStore,
     IBatchScheduler batchScheduler)
     : base(batchScheduler)
 {
     _componentStore = componentStore;
 }
コード例 #2
0
        public PandoraContainer(IComponentStore componentStore, BehaviorConfiguration configuration)
        {
            this.componentStore = componentStore;
            lookupService       = BuildLookupService(configuration.EnableImplicitTypeInstantiation, configuration.ImplicitTypeLifestyle);
            var activator = new ComponentActivator();

            resolver = new Resolver(activator, lookupService);
        }
コード例 #3
0
 public ChunkMeshGenerator(Game game)
 {
     _game             = game;
     _meshManager      = game.Processors.GetOrThrow <MeshManager>();
     _chunkStore       = (LookupDictionaryStore <ChunkPos, Chunk>)game.Components.GetStore <Chunk>();
     _storageStore     = game.Components.GetStore <ChunkPaletteStorage <Block> >();
     _textureCellStore = game.Components.GetStore <TextureCoords4>();
 }
コード例 #4
0
 public GoofyActionSelector(
     IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable <IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory,
     IComponentStore componentStore)
     : base(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory)
 {
     _componentStore = componentStore;
 }
コード例 #5
0
 public ComponentService(
     IComponentStore componentStore,
     IDataLoader <Guid, Component> componentById,
     ISchemaService schemaService,
     IChangeLogService changeLogService)
 {
     _componentStore   = componentStore;
     _componentById    = componentById;
     _schemaService    = schemaService;
     _changeLogService = changeLogService;
 }
コード例 #6
0
 public void Execute(IComponentStore store)
 {
     var reg = new Registration
                   {
                       Name = Name,
                       Implementor = Implementor,
                       Service = Service,
                       Parameters = Parameters,
                   };
     if (Lifestyle != null)
         reg.Lifestyle = Lifestyle;
     store.AddRegistration(reg);
 }
コード例 #7
0
 public void Execute(IComponentStore store)
 {
     foreach (var type in ForTypes)
     {
         var reg = new Registration
         {
             Name        = Name,
             Service     = Service.MakeGenericType(new[] { type }),
             Implementor = Implementor.MakeGenericType(new[] { type })
         };
         store.AddRegistration(reg);
     }
 }
コード例 #8
0
 public void Execute(IComponentStore store)
 {
     foreach (var type in ForTypes)
     {
         var reg = new Registration
                       {
                           Name = Name,
                           Service = Service.MakeGenericType(new[] {type}),
                           Implementor = Implementor.MakeGenericType(new[] {type})
                       };
         store.AddRegistration(reg);
     }
 }
コード例 #9
0
 //TODO: Testear que se resuelva el IServiceProvider
 public ComponentStateManager(
     IServiceProvider serviceProvider,
     IComponentStore componentStore,
     IComponentsAssembliesProvider componentsAssembliesProvider,
     MigrationsModelDiffer modelDiffer,
     MigrationsSqlGenerator sqlGenerator,
     IEntityFrameworkDataProvider dataProvider)
 {
     _serviceProvider = serviceProvider;
     _componentStore  = componentStore;
     _componentsAssembliesProvider = componentsAssembliesProvider;
     _modelDiffer  = modelDiffer;
     _sqlGenerator = sqlGenerator;
     _dataProvider = dataProvider;
 }
コード例 #10
0
        public void Execute(IComponentStore store)
        {
            var reg = new Registration
            {
                Name        = Name,
                Implementor = Implementor,
                Service     = Service,
                Parameters  = Parameters,
            };

            if (Lifestyle != null)
            {
                reg.Lifestyle = Lifestyle;
            }
            store.AddRegistration(reg);
        }
コード例 #11
0
 public ApplicationService(
     IApplicationStore appStore,
     IChangeLogService changeLogService,
     IApplicationPartDataLoader applicationPartByIdDataLoader,
     IApplicationPartComponentDataLoader applicationPartComponentByIdDataloader,
     IComponentStore compStore,
     IDataLoader <Guid, Component> componentById,
     ISchemaService schemaService)
 {
     _appStore         = appStore;
     _changeLogService = changeLogService;
     _applicationPartByIdDataLoader           = applicationPartByIdDataLoader;
     _applicationPartByIdDataloaderDataLoader = applicationPartComponentByIdDataloader;
     _compStore     = compStore;
     _schemaService = schemaService;
     _componentById = componentById;
 }
コード例 #12
0
 public GoofyComponentsPopulate(
     IServiceCollection services,
     IComponentStateManager componentStateManager,
     IComponentStore componentStore,
     IComponentsInfoProvider componentsInfoProvider,
     IComponentsAssembliesProvider componentsAssembliesProvider,
     MigrationsModelDiffer modelDiffer,
     MigrationsSqlGenerator sqlGenerator,
     IEntityFrameworkDataProvider dataProvider
     )
 {
     _services = services;
     _componentStateManager       = componentStateManager;
     _componentStore              = componentStore;
     _componentsInfoProvider      = componentsInfoProvider;
     _componentAssembliesProvider = componentsAssembliesProvider;
     _modelDiffer  = modelDiffer;
     _sqlGenerator = sqlGenerator;
     _dataProvider = dataProvider;
 }
コード例 #13
0
        public int AddStore(IComponentStore store)
        {
            if (_byType.ContainsKey(store.ComponentType))
            {
                throw new ArgumentException(
                          $"Component type {store.ComponentType} is already being tracked");
            }
            if (Count == MAX_COMPONENT_TYPES)
            {
                throw new InvalidOperationException(
                          $"Current component type count is already at maximum ({MAX_COMPONENT_TYPES})");
            }

            var storeIndex = Count;

            _stores.Add(store);
            _byType.Add(store.ComponentType, storeIndex);

            store.ComponentAdded   += entityID => Set(entityID, storeIndex);
            store.ComponentRemoved += entityID => Unset(entityID, storeIndex);

            return(storeIndex);
        }
コード例 #14
0
 public LookupService(IComponentStore componentStore)
 {
     this.componentStore = componentStore;
 }
コード例 #15
0
 protected AbstractSharedContext()
 {
     _componentStore = new ConcurrentDictionaryComponentStore();
 }
コード例 #16
0
 public ComponentRepository(IComponentTypeLookup lookup, IComponentStore store, int expansionSize = 1024)
 {
     Lookup = lookup;
     Store  = store;
 }
コード例 #17
0
 public PandoraContainer(IComponentStore componentStore) : this(componentStore, new BehaviorConfiguration())
 {
 }
コード例 #18
0
 public FluentRegistration(IComponentStore store)
 {
     this.store = store;
 }
コード例 #19
0
 public LookupService(IComponentStore componentStore)
 {
     this.componentStore = componentStore;
 }