public ISyncResultInfoStore GetSyncResultStore(SdataContext context)
        {
            ISyncResultInfoStore store;

            string connectionString = ConnStringFactory.GetConnectionString(context);

            if (!ContextStoreResolver.TryResolve <ISyncResultInfoStore>(context, out store))
            {
                IJetConnectionProvider connectionProvider = new SimpleJetConnectionProvider(connectionString);

                store = new SyncResultInfoStore(connectionProvider, context);

                ContextStoreResolver.Register <ISyncResultInfoStore>(context, store);
            }

            return(store);
        }
        public ICorrelatedResSyncInfoStore GetCorrelatedResSyncStore(SdataContext context)
        {
            ICorrelatedResSyncInfoStore store;

            string connectionString = ConnStringFactory.GetConnectionString(context);

            if (!ContextStoreResolver.TryResolve <ICorrelatedResSyncInfoStore>(context, out store))
            {
                IJetConnectionProvider connectionProvider    = new SimpleJetConnectionProvider(connectionString);
                ICorrelatedResSyncInfoStoreProvider provider = new CorrelatedResSyncStoreProvider(connectionProvider, context);

                store = new CorrelatedResSyncInfoStore(provider);
                ContextStoreResolver.Register <ICorrelatedResSyncInfoStore>(context, store);
            }

            return(store);
        }
        public ISynctickProvider GettickProvider(SdataContext context)
        {
            ISynctickProvider tickProvider;

            string connectionString = ConnStringFactory.GetConnectionString(context);

            if (!ContextStoreResolver.TryResolve <ISynctickProvider>(context, out tickProvider))
            {
                IJetConnectionProvider connectionProvider = new SimpleJetConnectionProvider(connectionString);

                tickProvider = new tickProvider(connectionProvider, context);

                ContextStoreResolver.Register <ISynctickProvider>(context, tickProvider);
            }

            return(tickProvider);
        }
Пример #4
0
        public static IAppBookmarkInfoStore GetAppBookmarkStore(SdataContext context)
        {
            IAppBookmarkInfoStore store;

            string connectionString = ConnStringFactory.GetConnectionString(context);

            if (!ContextStoreResolver.TryResolve <IAppBookmarkInfoStore>(connectionString, out store))
            {
                IJetConnectionProvider        connectionProvider = new SimpleJetConnectionProvider(connectionString);
                IAppBookmarkInfoStoreProvider provider           = new AppBookmarkInfoStoreProvider(connectionProvider, context);

                store = new AppBookmarkInfoStoreClient(provider);
                ContextStoreResolver.Register <IAppBookmarkInfoStore>(connectionString, store);
            }

            return(store);
        }