コード例 #1
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType <HttpContextAccessor>().As <IHttpContextAccessor>().InstancePerLifetimeScope();
            builder.RegisterType <ImpersonationService>().InstancePerLifetimeScope();

            Plugins.CheckOverride <IUserInfo, ImpersonationUserInfo>(builder, typeof(WcfWindowsUserInfo));
            builder.RegisterType <ImpersonationUserInfo>().As <IUserInfo>().InstancePerLifetimeScope();

            base.Load(builder);
        }
コード例 #2
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType <AuthenticationService>().InstancePerLifetimeScope();

            Plugins.CheckOverride <IUserInfo, AspNetUserInfo>(builder, typeof(WcfWindowsUserInfo));
            builder.RegisterType <AspNetUserInfo>().As <IUserInfo>().InstancePerLifetimeScope();

            Plugins.FindAndRegisterPlugins <ISendPasswordResetToken>(builder);

            base.Load(builder);
        }
コード例 #3
0
 protected override void Load(ContainerBuilder builder)
 {
     Plugins.CheckOverride <IAuthorizationProvider, SimpleWindowsAuthorizationProvider>(builder, typeof(CommonAuthorizationProvider), typeof(NullAuthorizationProvider));
     builder.RegisterType <SimpleWindowsAuthorizationProvider>().As <IAuthorizationProvider>().InstancePerLifetimeScope();
     base.Load(builder);
 }