APIコントローラーに次のメソッドがあります
[System.Web.Mvc.HttpPost]
public Task<CommandResponse> Send(CommandBase command)
{
var result = new TaskCompletionSource<CommandResponse>();
this.Bus.Send(command).Register<int>(response =>
{
this.Bus.CurrentMessageContext is here null <-------
result.TrySetResult(commandResponse);
});
return result.Task;
}
CurrentMessageContext がここで null である理由を考えてください。私はリクエスト/レスポンスの例に従っています。ここでの唯一の違いは、Task を使用した非同期パターンです。
ありがとう、マリンコ