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);
        }
Example #3
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);
        }
        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);
        }
        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);
        }
Example #7
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);
        }