public StructuredDataServer()
        {
            var config = Catalog.Factory.Resolve <IConfig>(SpecialFactoryContexts.Routed);

            _commandsInbox = config.Get <IMessageInbox>(StructuredDataServerLocalConfig.Inbox);
            _outboxFactory = config.Get <Func <string, IMessageOutbox> >(StructuredDataServerLocalConfig.OutboxFactory);
            _dataStore     = config.Get <IStructuredDataStorage <string> >(StructuredDataServerLocalConfig.Store);
        }
Exemplo n.º 2
0
        public PersistentHashTable()
        {
            var config = Catalog.Factory.Resolve <IConfig>(SpecialFactoryContexts.Routed);


            _comparer = config.Get <IComparer <TKey> >(PersistedHashTableLocalConfig.Comparer);
            _cloner   = config.Get <Func <TKey, TKey> >(PersistedHashTableLocalConfig.Cloner);
            Name      = config[PersistedHashTableLocalConfig.Name];
            _store    = config.Get <IPersistentStore <TKey> >(PersistedHashTableLocalConfig.Store);
            _parent   = config.Get <IStructuredDataStorage <TKey> >(PersistedHashTableLocalConfig.Database);
            _trx      = config.Get <ThreadLocal <Guid> >(PersistedHashTableLocalConfig.Transaction);

            Id = config.Get <int>(PersistedHashTableLocalConfig.Id);

            _parent.TableStates[Id] = new PersistedHashTableState <TKey>(_comparer, _cloner);
        }