コード例 #1
0
 public static ProphetBuilder AddProphet(this IServiceCollection services, ProphetConfig prophetConfig)
 => new ProphetBuilder(services, prophetConfig);
コード例 #2
0
 public ProphetBuilder(IServiceCollection services, ProphetConfig prophetConfig)
 {
     services.AddDbContext <ProphetContext>(prophetConfig.DbContextOptions);
     services.AddHostedService(provider => new ProphetService(provider, prophetConfig.BoostrapServers, prophetConfig.Topic, prophetConfig.Group));
 }