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(StorageProcessorConsole.Execute(repositoryFactory, configuration).Result);
        }
        static int Main(string[] args)
        {
            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStore.CosmosCore.UserSecrets")
                            .AddConsoleLogging();

            var configuration     = BlockchainSourceConfigurationFactory.Get(appConfig);
            var repositoryFactory = CosmosRepositoryFactory.Create(appConfig);

            return(StorageProcessorConsole.Execute(repositoryFactory, configuration).Result);
        }
Exemple #3
0
        public static int Main(string[] args)
        {
            var storageProcessorConsole = new StorageProcessorConsole <AzureTablesRepositoryFactory>(
                args,
                "Nethereum.BlockchainStore.AzureTables",
                CreateRepositoryFactory
                );

            return(storageProcessorConsole.ExecuteAsync(
                       new CancellationToken())
                   .Result);
        }
        static int Main(string[] args)
        {
            var storageProcessorConsole = new StorageProcessorConsole <MongoDbRepositoryFactory>(
                args,
                "Nethereum.BlockchainStore.MongoDb.UserSecrets",
                config => MongoDbRepositoryFactory.Create(config)
                );

            return(storageProcessorConsole.ExecuteAsync(
                       new CancellationToken())
                   .Result);
        }
Exemple #5
0
        static int Main(string[] args)
        {
            var log = ApplicationLogging.CreateConsoleLogger <Program>().ToILog();

            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStore.MongoDb.UserSecrets");

            var configuration     = BlockchainSourceConfigurationFactory.Get(appConfig);
            var repositoryFactory = MongoDbRepositoryFactory.Create(appConfig);

            return(StorageProcessorConsole.Execute(repositoryFactory, configuration, log: log).Result);
        }
Exemple #6
0
        public static int Main(string[] args)
        {
            var storageProcessorConsole = new StorageProcessorConsole <BlockchainStoreRepositoryFactory>(
                args,
                "Nethereum.BlockchainStorage.EFCore.Sqlite",
                config => new BlockchainStoreRepositoryFactory(new SqliteBlockchainDbContextFactory(config.GetBlockchainStorageConnectionString()))
                );

            return(storageProcessorConsole.ExecuteAsync(
                       new CancellationToken())
                   .Result);
        }
        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(StorageProcessorConsole.Execute(repositoryFactory, blockchainSourceConfiguration).Result);
        }
        static int Main(string[] args)
        {
            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStore.Csv.UserSecrets")
                            .AddConsoleLogging();

            var configuration     = BlockchainSourceConfigurationFactory.Get(appConfig);
            var outputPath        = appConfig["CsvOutputPath"];
            var repositoryFactory = new CsvBlockchainStoreRepositoryFactory(outputPath);

            return(StorageProcessorConsole.Execute(repositoryFactory, configuration).Result);
        }
Exemple #9
0
        static int Main(string[] args)
        {
            var storageProcessorConsole = new StorageProcessorConsole <CsvBlockchainStoreRepositoryFactory>(
                args,
                "Nethereum.BlockchainStore.Csv.UserSecrets",
                config => new CsvBlockchainStoreRepositoryFactory(config["CsvOutputPath"]),
                repoFactory => repoFactory.DisposeRepositories()
                );

            return(storageProcessorConsole.ExecuteAsync(
                       new CancellationToken())
                   .Result);
        }
        public static int Main(string[] args)
        {
            var log = ApplicationLogging.CreateConsoleLogger <Program>().ToILog();

            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStorage.EFCore.SqlServer");

            var blockchainConfig  = BlockchainSourceConfigurationFactory.Get(appConfig);
            var dbContextFactory  = SqlServerCoreBlockchainDbContextFactory.Create(appConfig);
            var repositoryFactory = new BlockchainStoreRepositoryFactory(dbContextFactory);

            return(StorageProcessorConsole.Execute(repositoryFactory, blockchainConfig, log: log).Result);
        }
Exemple #11
0
        public static int Main(string[] args)
        {
            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStore.AzureTables")
                            .AddConsoleLogging();

            var configuration = BlockchainSourceConfigurationFactory.Get(appConfig);

            var connectionString = appConfig[ConnectionStringKey];

            if (string.IsNullOrEmpty(connectionString))
            {
                throw ConfigurationUtils.CreateKeyNotFoundException(ConnectionStringKey);
            }

            var repositoryFactory = new CloudTableSetup(connectionString, configuration.Name);

            return(StorageProcessorConsole.Execute(repositoryFactory, configuration).Result);
        }