private static MongoDbOptions <TContext> MongoDbOptionsFactory <TContext>( IComponentContext componentContext, Action <IComponentContext, MongoDbOptionBuilder> optionsAction) where TContext : MongoDbContext { var builder = new MongoDbOptionBuilder <TContext>(); optionsAction.Invoke(componentContext, builder); return((MongoDbOptions <TContext>)builder.Options); }
private static MongoDbOptions <TContext> MongoDbOptionsFactory <TContext>( IKernel kernel, Action <IKernel, MongoDbOptionBuilder> optionsAction) where TContext : MongoDbContext { var builder = new MongoDbOptionBuilder <TContext>(); optionsAction.Invoke(kernel, builder); return((MongoDbOptions <TContext>)builder.Options); }
private static MongoDbOptions <TContext> MongoDbOptionsFactory <TContext>( IServiceProvider applicationServiceProvider, Action <IServiceProvider, MongoDbOptionBuilder> optionsAction) where TContext : MongoDbContext { var builder = new MongoDbOptionBuilder <TContext>(); optionsAction.Invoke(applicationServiceProvider, builder); return((MongoDbOptions <TContext>)builder.Options); }