Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="messagesManager"><see cref="MessagesManager"/> where internal messages will be forwarded</param>
 /// <param name="idManager">Identifiers manager for all identified objects</param>
 /// <param name="assignIds">Should this register assigns ids if checked object has no identifier</param>
 /// <param name="key">Identifier of this ids register</param>
 public IdsRegister(MessagesManager messagesManager, IIdManager idManager, bool assignIds, string key)
 {
     this.messagesManager = messagesManager;
     this.idManager       = idManager;
     this.assignIds       = assignIds;
     Key = key;
 }
 public PageDependenciesFactory(
     IRenderContextFactory renderContextFactory,
     IIdManager idManager,
     IAssetManager assetManager,
     INameManager nameManager,
     ICssWriterFactory cssWriterFactory,
     IJavascriptWriterFactory javascriptWriterFactory,
     IDataScopeProviderFactory dataScopeProviderFactory,
     IDataConsumerFactory dataConsumerFactory,
     IDictionaryFactory dictionaryFactory,
     IDataContextBuilderFactory dataContextBuilderFactory,
     IDataCatalog dataCatalog,
     IDataDependencyFactory dataDependencyFactory)
 {
     _renderContextFactory      = renderContextFactory;
     _idManager                 = idManager;
     _assetManager              = assetManager;
     _nameManager               = nameManager;
     _cssWriterFactory          = cssWriterFactory;
     _javascriptWriterFactory   = javascriptWriterFactory;
     _dataScopeProviderFactory  = dataScopeProviderFactory;
     _dataConsumerFactory       = dataConsumerFactory;
     _dictionaryFactory         = dictionaryFactory;
     _dataContextBuilderFactory = dataContextBuilderFactory;
     _dataCatalog               = dataCatalog;
     _dataDependencyFactory     = dataDependencyFactory;
 }
Example #3
0
 public DataContextBuilderFactory(
     IDataContextFactory dataContextFactory,
     IIdManager idManager,
     IDataCatalog dataCatalog)
 {
     _dataContextFactory = dataContextFactory;
     _idManager          = idManager;
     _dataCatalog        = dataCatalog;
 }
Example #4
0
 public LoadPipeline(CouchDb couchDb,
                     IIdManager idManager,
                     IIdAccessor idAccessor,
                     IRevisionAccessor revisionAccessor)
 {
     _couchDb          = couchDb;
     _idManager        = idManager;
     _idAccessor       = idAccessor;
     _revisionAccessor = revisionAccessor;
 }
Example #5
0
 public CommitPipeline(
     CouchDb couchDb,
     IIdManager idManager,
     IRevisionAccessor revisionAccessor,
     ITransactionCoordinator transactionCoordinator)
 {
     _couchDb                = couchDb;
     _idManager              = idManager;
     _revisionAccessor       = revisionAccessor;
     _transactionCoordinator = transactionCoordinator;
 }
Example #6
0
        public DataContext(
            IDictionaryFactory dictionaryFactory,
            DataContextFactory dataContextFactory,
            IDataDependencyFactory dataDependencyFactory,
            IIdManager idManager)
        {
            _dataContextFactory    = dataContextFactory;
            _dataDependencyFactory = dataDependencyFactory;
            _properties            = new System.Collections.Generic.LinkedList <PropertyEntry>();
#if DEBUG
            _id = idManager.GetUniqueId();
#endif
        }
Example #7
0
        public DataContextFactory(
            IQueueFactory queueFactory,
            IDictionaryFactory dictionaryFactory,
            IDataDependencyFactory dataDependencyFactory,
            IIdManager idManager)
            : base(queueFactory)
        {
            _dictionaryFactory     = dictionaryFactory;
            _dataDependencyFactory = dataDependencyFactory;
            _idManager             = idManager;

            Initialize(100);
        }
Example #8
0
 public Session(
     LoadPipeline loadPipeline,
     QueryPipeline queryPipeline,
     CommitPipeline commitPipeline,
     QueryFactory queryFactory,
     IIdManager idManager,
     IIdAccessor idAccessor,
     ITrackingProvider tracking,
     ISessionCache sessionCache
     )
 {
     _sessionCache   = sessionCache;
     _loadPipeline   = loadPipeline;
     _queryPipeline  = queryPipeline;
     _commitPipeline = commitPipeline;
     _queryFactory   = queryFactory;
     _idManager      = idManager;
     _idAccessor     = idAccessor;
     _tracking       = tracking;
 }
Example #9
0
 public DataSupplierFactory(
     IIdManager idManager)
 {
     _idManager = idManager;
 }
Example #10
0
 public DataSupplier(IIdManager idManager)
 {
     _dataSupplierId = idManager.GetUniqueId();
     _dataSupplies   = new List <RegisteredSupply>();
     SuppliedTypes   = new List <Type>();
 }
 public IdManagerTests()
 {
     sut = new IdManager();
 }
Example #12
0
        public DataContextBuilder(
            IDataContextFactory dataContextFactory,
            IIdManager idManager,
            IDataCatalog dataCatalog,
            IDataScopeRules dataScopeRules)
        {
            _dataContextFactory = dataContextFactory;
            _idManager          = idManager;
            _dataCatalog        = dataCatalog;

            Id = idManager.GetUniqueId();

            var dataScopes = dataScopeRules.DataScopes;

            _dataScopes = dataScopes == null
                ? new List <IDataScope>()
                : dataScopes.ToList();

            var dataSupplies = dataScopeRules.DataSupplies;

            _requiredDataSupplies = dataSupplies == null
                ? new List <IDataSupply>()
                : dataSupplies.ToList();

            var suppliedDependencies = dataScopeRules.SuppliedDependencies;

            _requiredSuppliedDependencies = suppliedDependencies == null
                ? new List <SuppliedDependency>()
                : suppliedDependencies.Select(sd => new SuppliedDependency(sd)).ToList();

#if DETAILED_TRACE
            Trace.WriteLine("Data context builder #" + Id + " constructing from data scope rules " + dataScopeRules);

            if (_dataScopes.Count > 0)
            {
                Trace.WriteLine("Data context builder #" + Id + " scopes:");
                foreach (var s in _dataScopes)
                {
                    Trace.WriteLine("    " + s);
                }
            }

            if (_requiredDataSupplies.Count > 0)
            {
                Trace.WriteLine("Data context builder #" + Id + " data supplies:");
                foreach (var s in _requiredDataSupplies)
                {
                    Trace.WriteLine("    " + s);
                }
            }

            if (_requiredSuppliedDependencies.Count > 0)
            {
                Trace.WriteLine("Data context builder #" + Id + " supplied dependencies:");
                foreach (var s in _requiredSuppliedDependencies)
                {
                    Trace.WriteLine("    " + s);
                }
            }
#endif
        }
 public LoadManyFromDatabaseAction(CouchDb couchDb, IIdManager idManager, IIdAccessor idAccessor)
 {
     _couchDb    = couchDb;
     _idManager  = idManager;
     _idAccessor = idAccessor;
 }
Example #14
0
 public void Close()
 {
     _objectReader = null;
     if (_idManager != null)
     {
         _idManager.Clear();
         _idManager = null;
     }
     _storageEngine = null;
     FileSystemProcessor.Close();
 }
Example #15
0
 public void AfterInit()
 {
     _objectReader = _storageEngine.GetObjectReader();
     _nonNativeObjectWriter.AfterInit();
     _idManager = _storageEngine.GetIdManager();
 }