예제 #1
0
 internal BasedOnDescriptor(Type basedOn, FromDescriptor from, Predicate<Type> additionalFilters)
 {
     this.basedOn = basedOn;
     this.from = from;
     //this.service = new ServiceDescriptor(this);
     this.If(additionalFilters);
 }
예제 #2
0
        public override void InstallFeatures(FromDescriptor from)
        {
            var mvcControllers = from
                                 .BasedOn(typeof(IController))
                                 .If(controller => controller.Is <IContextual>())
                                 .LifestyleCustom <ContextualLifestyleManager>()
                                 .WithServiceSelf();

            if (_configureMvc != null)
            {
                mvcControllers.Configure(_configureMvc);
            }

            var apiControllers = from
                                 .BasedOn(typeof(IHttpController))
                                 .If(controller => controller.Is <IContextual>())
                                 .LifestyleCustom <ContextualLifestyleManager>()
                                 .WithServiceSelf();

            if (_configureApi != null)
            {
                apiControllers.Configure(_configureApi);
            }
        }
예제 #3
0
 private BasedOnDescriptor Locate(FromDescriptor fromDescriptor)
 {
     return(_serviceDescriptor(fromDescriptor.BasedOn <T>().WithService));
 }
예제 #4
0
 public MapperInstaller(FromDescriptor classes)
 {
     this.classes = classes;
 }