Jupyter(IPython)中的变量浏览器是否像Spyder一样?每次运行测试代码时,必须始终打印变量列表,这是非常不舒服的.
这个功能已经实现了吗?如果是这样,如何启用它?
如何使用Castle WcfFacility并使用标准的Wcf配置文件设置?
如果我这样注册:
container.Register(
AllTypes.Pick()
.FromAssemblyNamed("{ServicesAssembly}") // <-- service assembly here
.If(type => type.Name.EndsWith("Service"))
.WithService.FirstInterface()
.Configure(configurer => configurer.LifeStyle.Transient)
.Configure(configurer => configurer.Named(configurer.Implementation.Name))
.Configure(configurer => configurer.ActAs(new DefaultServiceModel()))
);
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
服务"{name}"没有应用程序(非基础结构)端点.
如果我离开:
.Configure(configurer => configurer.ActAs(new DefaultServiceModel()))
Run Code Online (Sandbox Code Playgroud)
好像配置中的行为被忽略了.
这里的正确用法是什么?
我有使用windsor,设施和nhibernate配置应用程序的问题.
我得到这个例外:
ObjectDisposedException: Session is closed
Run Code Online (Sandbox Code Playgroud)
不应该windsor负责每个请求实例化会话,并在我有这样的配置时打开它?我可以错过一些配置吗?这是我的承认:
public class PersistenceFacility : AbstractFacility
{
protected override void Init()
{
Configuration config = BuildDatabaseConfiguration();
Kernel.Register(
Component.For<ISessionFactory>()
.LifeStyle.Singleton
.UsingFactoryMethod(config.BuildSessionFactory),
Component.For<ISession>()
.LifeStyle.PerWebRequest
.UsingFactoryMethod(k => k.Resolve<ISessionFactory>().OpenSession()));
}
private Configuration BuildDatabaseConfiguration()
{
return Fluently.Configure()
.Database(SetupDatabase)
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<RnUlice>())
.ExposeConfiguration(ConfigurePersistence)
.BuildConfiguration() ;
}
......
}
Run Code Online (Sandbox Code Playgroud)