Esempio n. 1
0
        public EntityCollectionManager(IEventSystem eventSystem, IEntityCollectionFactory entityCollectionFactory, IObservableGroupFactory observableGroupFactory)
        {
            EventSystem             = eventSystem;
            EntityCollectionFactory = entityCollectionFactory;
            ObservableGroupFactory  = observableGroupFactory;

            _groupAccessors = new Dictionary <ObservableGroupToken, IObservableGroup>();
            _pools          = new Dictionary <string, IEntityCollection>();

            CreateCollection(DefaultPoolName);
        }
Esempio n. 2
0
        public EntityDatabase(IEntityCollectionFactory entityCollectionFactory)
        {
            EntityCollectionFactory = entityCollectionFactory;

            _collections                = new CollectionLookup();
            _collectionSubscriptions    = new Dictionary <int, IDisposable>();
            _onCollectionAdded          = new Subject <IEntityCollection>();
            _onCollectionRemoved        = new Subject <IEntityCollection>();
            _onEntityAdded              = new Subject <CollectionEntityEvent>();
            _onEntityRemoved            = new Subject <CollectionEntityEvent>();
            _onEntityComponentsAdded    = new Subject <ComponentsChangedEvent>();
            _onEntityComponentsRemoving = new Subject <ComponentsChangedEvent>();
            _onEntityComponentsRemoved  = new Subject <ComponentsChangedEvent>();
        }
Esempio n. 3
0
        public EntityCollectionManager(IEntityCollectionFactory entityCollectionFactory, IObservableGroupFactory observableGroupFactory, IComponentTypeLookup componentTypeLookup)
        {
            EntityCollectionFactory = entityCollectionFactory;
            ObservableGroupFactory  = observableGroupFactory;
            ComponentTypeLookup     = componentTypeLookup;

            _observableGroups           = new ObservableGroupLookup();
            _collections                = new CollectionLookup();
            _collectionSubscriptions    = new Dictionary <int, IDisposable>();
            _onCollectionAdded          = new Subject <IEntityCollection>();
            _onCollectionRemoved        = new Subject <IEntityCollection>();
            _onEntityAdded              = new Subject <CollectionEntityEvent>();
            _onEntityRemoved            = new Subject <CollectionEntityEvent>();
            _onEntityComponentsAdded    = new Subject <ComponentsChangedEvent>();
            _onEntityComponentsRemoving = new Subject <ComponentsChangedEvent>();
            _onEntityComponentsRemoved  = new Subject <ComponentsChangedEvent>();


            CreateCollection(PoolLookups.DefaultPoolId);
        }
Esempio n. 4
0
        public EntityCollectionManager(IEntityCollectionFactory collectionFactory, IObservableGroupFactory groupFactory,
                                       IComponentTypeLookup componentTypeLookup)
        {
            CollectionFactory   = collectionFactory;
            GroupFactory        = groupFactory;
            ComponentTypeLookup = componentTypeLookup;

            observableGroups         = new Dictionary <ObservableGroupToken, IObservableGroup>();
            collections              = new Dictionary <string, IEntityCollection>();
            subscriptions            = new Dictionary <string, IDisposable>();
            entityAdded              = new Subject <CollectionEntityEvent>();
            entityRemoved            = new Subject <CollectionEntityEvent>();
            entityComponentsAdded    = new Subject <ComponentsChangedEvent>();
            entityComponentsRemoving = new Subject <ComponentsChangedEvent>();
            entityComponentsRemoved  = new Subject <ComponentsChangedEvent>();
            collectionAdded          = new Subject <IEntityCollection>();
            collectionRemoved        = new Subject <IEntityCollection>();

            CreateCollection(DefaultPoolName);
        }
 public FromEntityCollectionDataTransformer(IFromEntityDataTransformer entityDataTransformer, IEntityCollectionFactory entityCollectionFactory)
 {
     EntityDataTransformer   = entityDataTransformer;
     EntityCollectionFactory = entityCollectionFactory;
 }
Esempio n. 6
0
 public ToEntityDatabaseDataTransformer(IToEntityCollectionDataTransformer entityCollectionDataTransformer, IEntityCollectionFactory entityCollectionFactory)
 {
     EntityCollectionDataTransformer = entityCollectionDataTransformer;
 }