/// <summary>
        /// 打印组件信息
        /// </summary>
        public static string PrintComponent <T>(this Autofac.ILifetimeScope container)
        {
            IComponentRegistry            component     = container.ComponentRegistry;                                      //注册处
            List <IComponentRegistration> registrations = component.RegistrationsFor(new TypedService(typeof(T))).ToList(); //注册信息表

            return(GetComponent(registrations));
        }
Example #2
0
        protected override void ApplicationStartup(Autofac.ILifetimeScope container, Nancy.Bootstrapper.IPipelines pipelines)
        {
            CookieBasedSessions.Enable(pipelines);
            base.ApplicationStartup(container, pipelines);

            GlobalHost.DependencyResolver = new AutofacDependencyResolver(container);
            RouteTable.Routes.MapHubs();
            PublishrBootstrapper.Init();
        }
        /// <summary>
        /// 打印组件信息
        /// </summary>
        public static string PrintComponent(this Autofac.ILifetimeScope container)
        {
            IComponentRegistry            component     = container.ComponentRegistry;      //注册处
            List <IComponentRegistration> registrations = component.Registrations.ToList(); //注册信息表

            registrations.RemoveAt(0);

            return(GetComponent(registrations));
        }
 public UnitOfWorkInvoker(Autofac.ILifetimeScope scope)
 {
     this.scope = scope;
 }
Example #5
0
 public BaseJob(Autofac.ILifetimeScope lifetimeScope, DAL.IUnitOfWork unitOfWork)
 {
     this.lifetimeScope = lifetimeScope;
     this.unitOfWork    = unitOfWork;
     this.Logger        = NLog.LogManager.GetLogger(GetType().Name);
 }
Example #6
0
 protected override void ApplicationStartup(Autofac.ILifetimeScope container, Nancy.Bootstrapper.IPipelines pipelines)
 {
     base.ApplicationStartup(container, pipelines);
 }
 public AutofacInterceptor(Autofac.ILifetimeScope scope)
 {
     this.scope = scope;
 }
Example #8
0
 public HttpContextBase CreateContext(Autofac.ILifetimeScope lifetimeScope)
 {
     throw new System.NotImplementedException();
 }
Example #9
0
 public TestViewModelFactory(Autofac.ILifetimeScope container,
                             IFrozenContext frozenCtx,
                             ZetboxConfig cfg, IPerfCounter perfCounter, Func <DialogCreator> dialogFactory)
     : base(container, frozenCtx, cfg, perfCounter, dialogFactory)
 {
 }
Example #10
0
 protected override void ApplicationStartup(Autofac.ILifetimeScope container, Nancy.Bootstrapper.IPipelines pipelines)
 {
     StaticConfiguration.EnableRequestTracing = true;
 }