瀏覽代碼

update GetService to GetRequiredService

master
yangxiaodong 7 年之前
父節點
當前提交
3a205b0b84
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs

+ 4
- 4
src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs 查看文件

@@ -110,15 +110,15 @@ namespace DotNetCore.CAP.Processor
var returnedProcessors = new List<IProcessor>();
for (int i = 0; i < processorCount; i++)
{
var messageProcessors = _provider.GetService<IDispatcher>();
var messageProcessors = _provider.GetRequiredService<IDispatcher>();
_messageDispatchers.Add(messageProcessors);
}
returnedProcessors.AddRange(_messageDispatchers);

returnedProcessors.Add(_provider.GetService<PublishQueuer>());
returnedProcessors.Add(_provider.GetService<SubscribeQueuer>());
returnedProcessors.Add(_provider.GetRequiredService<PublishQueuer>());
returnedProcessors.Add(_provider.GetRequiredService<SubscribeQueuer>());

returnedProcessors.Add(_provider.GetService<IAdditionalProcessor>());
returnedProcessors.Add(_provider.GetRequiredService<IAdditionalProcessor>());

return returnedProcessors.ToArray();
}


Loading…
取消
儲存