Example #1
0
 public Spider AddDataFlow(IDataFlow dataFlow)
 {
     CheckIfRunning();
     dataFlow.Logger = _loggerFactory.CreateLogger(dataFlow.GetType());
     _dataFlows.Add(dataFlow);
     return(this);
 }
Example #2
0
 /// <summary>
 /// Add DataFlow
 /// </summary>
 /// <param name="dataFlow">数据流处理器</param>
 /// <returns></returns>
 public Spider AddDataFlow(IDataFlow dataFlow)
 {
     Check.NotNull(dataFlow, nameof(dataFlow));
     CheckIfRunning();
     dataFlow.Logger = _services.GetRequiredService <ILoggerFactory>().CreateLogger(dataFlow.GetType());
     _dataFlows.Add(dataFlow);
     return(this);
 }