示例#1
0
        protected override void InitializeInner(CancellationToken cancellationToken)
        {
            _configuration = _configurationService.Get <ISQLiteConfiguration>();
            if (_configuration.WipeOnStart)
            {
                DataAccessService.Instance.WipeAll();
            }

            DataAccessService.Instance.LoadAllIdentities();
            DataAccessService.Instance.LoadAllKnownNodeIPs();
            DataAccessService.Instance.LoadAllImageKeys();
        }
 public static IEventFlowOptions ConfigureSQLite(
     this IEventFlowOptions eventFlowOptions,
     ISQLiteConfiguration sqLiteConfiguration)
 {
     return(eventFlowOptions
            .RegisterServices(f =>
     {
         f.Register <ISQLiteConnection, SQLiteConnection>();
         f.Register <ISQLiteConnectionFactory, SQLiteConnectionFactory>();
         f.Register <ISQLiteErrorRetryStrategy, SQLiteErrorRetryStrategy>();
         f.Register(_ => sqLiteConfiguration, Lifetime.Singleton);
     }));
 }
示例#3
0
 public SQLiteErrorRetryStrategy(
     ISQLiteConfiguration configuration)
 {
     _configuration = configuration;
 }
示例#4
0
 public SQLiteInitializer(IConfigurationService configurationService)
 {
     _configuration = configurationService.Get <ISQLiteConfiguration>();
 }
示例#5
0
 public DataContext(ISQLiteConfiguration configuration)
 {
     _configuration = configuration;
 }