Exemplo n.º 1
0
 public override void Load()
 {
     var bHelper = new BinderHelper();
     var binder = new NinjectBinder(Bind);
     binder.Bind(bHelper.ReadFromTypes(typeof(IResolver).Assembly.GetTypes(), BindingScope.Singleton));
     binder.Bind(bHelper.ReadFromTypes(typeof(NinjectResolver).Assembly.GetTypes(), BindingScope.Singleton));
 }
Exemplo n.º 2
0
        public void CheckAll()
        {
            var kernel = new StandardKernel();
            var bh = new BinderHelper();
            var b = new NinjectBinder(kernel.Bind);
            b.Bind(bh.ReadFromTypes(typeof(BinderHelper).Assembly.GetTypes() ));

            var errors = new EnumsChecker(new[]
            {
                typeof (IWrappersDisposer).Assembly,
            }, kernel.Get<IEnumFieldReader>()).CheckDescription().CheckIdentityValues().Errors;

            if (errors.Any())
            {
                Assert.Fail(string.Join("\r\n", errors));
            }
        }