我看到了一种使用 BusConfiguration() 配置 DefaultHost 的方法,但没有看到一种以编程方式配置 RemoteAppDomainHost 的方法(不使用 rhino.esb 配置文件部分)。
问问题
691 次
2 回答
0
var cashier = new RemoteAppDomainHost(typeof(CashierBootStrapper))
.Configuration("Cashier.config");
cashier.Start();
于 2011-11-01T19:41:40.177 回答
0
从引导程序覆盖 BeginStart 并调用 UseConfiguration。这是对我有用的示例代码:
public class RemoteAppBootstrapper : AutofacBootStrapper
{
protected override void OnBeginStart()
{
var busConfiguration = new HostConfiguration()
.Bus( "msmq://localhost/endpoint.a" )
.ToBusConfiguration();
UseConfiguration( busConfiguration );
base.OnBeginStart();
}
}
于 2012-03-26T18:52:46.053 回答