Esempio n. 1
0
        public static int Main(string[] args)
        {
            var appConfig         = ConfigurationUtils.Build(args).AddConsoleLogging();
            var contextFactory    = new SqliteBlockchainDbContextFactory("BlockchainDbContext");
            var repositoryFactory = new BlockchainStoreRepositoryFactory(contextFactory);
            var configuration     = BlockchainSourceConfigurationFactory.Get(appConfig);

            configuration.ProcessBlockTransactionsInParallel = false;
            return(ProcessorConsole.Execute(repositoryFactory, configuration).Result);
        }
Esempio n. 2
0
        public static int Main(string[] args)
        {
            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStorage.EFCore.Sqlite")
                            .AddConsoleLogging();

            var blockchainSourceConfiguration = BlockchainSourceConfigurationFactory.Get(appConfig);
            var contextFactory    = new SqliteBlockchainDbContextFactory(appConfig.GetBlockchainStorageConnectionString());
            var repositoryFactory = new BlockchainStoreRepositoryFactory(contextFactory);

            return(ProcessorConsole.Execute(repositoryFactory, blockchainSourceConfiguration).Result);
        }