使用nservicebus.structuremap时出现此类错误.这是我的代码.
EndPointConfig.cs
namespace NSBus.Server
{
using NServiceBus;
/*
This class configures this endpoint as a Server. More information about how to configure the NServiceBus host
can be found here: http://particular.net/articles/the-nservicebus-host
*/
public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, UsingTransport<Msmq>, IWantCustomInitialization
{
public static IBus Bus { get; private set; }
public void Init()
{
ConfigureIocTool();
}
private static void ConfigureIocTool()
{
var container = new Container(y => y.Scan(scan =>
{
scan.TheCallingAssembly();
scan.AssemblyContainingType<SanelibRegistry>();
scan.AssemblyContainingType<CommonRegistry>();
scan.AssemblyContainingType<CoreRegistry>();
scan.WithDefaultConventions();
scan.LookForRegistries();
}));
Bus = Configure.With()
.StructureMapBuilder(container) …Run Code Online (Sandbox Code Playgroud) 我试图用1增加可观察变量,但它无法正常处理
JavaScript:
self.fiscalYear = ko.observable(0);
self.fiscalStartYear = ko.observable(0);
self.fiscalEndYear = ko.observable(0);
self.showYearsDetail = function () {
self.fiscalStartYear(self.fiscalYear());
self.fiscalEndYear(self.fiscalYear() + 1);
};
self.fiscalYear.subscribe(function () {
self.showYearsDetail();
});
Run Code Online (Sandbox Code Playgroud)
HTML:
<div class="row-fluid">
<div class="span2 display-label">Fiscal Year </div>
<input id="fiscalYear" type="text" data-bind="value: fiscalYear" placeholder="Fiscal Year">
</div>
<div class="row-fluid">
<div class="span2 display-label">Start Year </div>
<div class="span6 text-info"><span data-bind="text: fiscalStartYear"></span></div>
</div>
<div class="row-fluid">
<div class="span2 display-label">End Year </div>
<div class="span6 text-info"><span data-bind="text: fiscalEndYear"></span></div>
</div>
Run Code Online (Sandbox Code Playgroud)
如果我插入2014年
输出开始年份:2014年结束年份:20145