public MongoDbFixture()
        {
            ConfigurationUtils.SetEnvironmentAsDevelopment();
            var appConfig = ConfigurationUtils.Build(CommandLineArgs);

            appConfig.SetMongoDbConnectionString(MongoDbConnectionString);

            Factory = MongoDbRepositoryFactory.Create(appConfig, deleteAllExistingCollections: true);
        }
        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);
        }
Пример #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);
        }