예제 #1
0
        public static void Run()
        {
            using (var context = ApplicationContext.Create(application => application
                                                           .Database(database => database
                                                                     .IntegrationDb(integrationDb => integrationDb
                                                                                    .Disable()))
                                                           .Services(services => services
                                                                     .Advanced(advanced => advanced
                                                                               .Register <MyFeature>()))))
            {
                MyFeature myFeature = context.Resolve <MyFeature>();

                IFeatureToggler toggler = context.Resolve <IFeatureToggler>();
                toggler.Disable <MyFeature>();

                myFeature.DoThing();

                toggler.Enable <MyFeature>();

                myFeature.DoThing();
            }
        }
 public override void Enable(IFeatureToggler toggler)
 {
     toggler.Enable <DbDistributedMutex>();
 }
예제 #3
0
 public override void Enable(IFeatureToggler toggler)
 {
     toggler.Enable <DbLogger>();
 }