public PipeWatcherProxy(IPipeLineWatcher watcher, string dataFlowKey, DataFlowOption option) { if (!string.IsNullOrEmpty(dataFlowKey)) { _dataFlowKey = dataFlowKey; _publisher = DataFlowFactory.RegisterFlow <WatchDataItem>(dataFlowKey, WatchCallBack, option); } else { _watchDataQueue = new ActionBlock <WatchDataItem>(WatchCallBack, new ExecutionDataflowBlockOptions() { MaxDegreeOfParallelism = 4 }); } _watcher = watcher; }
protected override IDataPublisher CreateFlow(string pipeDataKey, IDataSubscriber <TContext> subscriber, DataFlowOption option) { return(DataFlowFactory.RegisterFlow(pipeDataKey, subscriber, option)); }