public static int Main(string[] args)
        {
            var storageProcessorConsole = new StorageProcessorConsole <BlockchainStoreRepositoryFactory>(
                args,
                "Nethereum.BlockchainStorage.EFCore.SqlServer",
                config => new BlockchainStoreRepositoryFactory(SqlServerCoreBlockchainDbContextFactory.Create(config))
                );

            return(storageProcessorConsole.ExecuteAsync(
                       new CancellationToken())
                   .Result);
        }
Пример #2
0
        public static int Main(string[] args)
        {
            var appConfig = ConfigurationUtils
                            .Build(args, userSecretsId: "Nethereum.BlockchainStorage.EFCore.SqlServer")
                            .AddConsoleLogging();

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

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