Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }