public BroadcastBlock (Func<T, T> cloner, DataflowBlockOptions dataflowBlockOptions) { if (dataflowBlockOptions == null) throw new ArgumentNullException ("dataflowBlockOptions"); this.cloner = cloner; this.dataflowBlockOptions = dataflowBlockOptions; this.messageBox = new PassingMessageBox<T> (messageQueue, compHelper, () => outgoing.IsCompleted, BroadcastProcess, dataflowBlockOptions); this.outgoing = new MessageOutgoingQueue<T> (compHelper, () => messageQueue.IsCompleted); this.vault = new MessageVault<T> (); }
public WriteOnceBlock(Func <T, T> cloner, DataflowBlockOptions dataflowBlockOptions) { if (dataflowBlockOptions == null) { throw new ArgumentNullException("dataflowBlockOptions"); } this.cloner = cloner; this.dataflowBlockOptions = dataflowBlockOptions; this.messageBox = new PassingMessageBox <T> (messageQueue, compHelper, () => true, BroadcastProcess, dataflowBlockOptions); this.vault = new MessageVault <T> (); }
public BufferBlock(DataflowBlockOptions dataflowBlockOptions) { if (dataflowBlockOptions == null) { throw new ArgumentNullException("dataflowBlockOptions"); } this.dataflowBlockOptions = dataflowBlockOptions; this.messageBox = new PassingMessageBox <T> (messageQueue, compHelper, () => outgoing.IsCompleted, ProcessQueue, dataflowBlockOptions); this.outgoing = new MessageOutgoingQueue <T> (compHelper, () => messageQueue.IsCompleted); this.vault = new MessageVault <T> (); }
public BatchBlock(int batchSize, DataflowBlockOptions dataflowBlockOptions) { if (dataflowBlockOptions == null) { throw new ArgumentNullException("dataflowBlockOptions"); } this.batchSize = batchSize; this.dataflowBlockOptions = dataflowBlockOptions; this.messageBox = new PassingMessageBox <T> (messageQueue, compHelper, () => outgoing.IsCompleted, BatchProcess, dataflowBlockOptions); this.outgoing = new MessageOutgoingQueue <T[]> (compHelper, () => messageQueue.IsCompleted); this.vault = new MessageVault <T[]> (); }
public TransformBlock(Func <TInput, TOutput> transformer, ExecutionDataflowBlockOptions dataflowBlockOptions) { if (dataflowBlockOptions == null) { throw new ArgumentNullException("dataflowBlockOptions"); } this.transformer = transformer; this.dataflowBlockOptions = dataflowBlockOptions; this.messageBox = new ExecutingMessageBox <TInput> (messageQueue, compHelper, () => outgoing.IsCompleted, TransformProcess, dataflowBlockOptions); this.outgoing = new MessageOutgoingQueue <TOutput> (compHelper, () => messageQueue.IsCompleted); this.vault = new MessageVault <TOutput> (); }