private void Concatenate(string value, Expression expression) { if (Processed.Contains(expression)) { return; } Result.Push(new { value, expression, expression.NodeType }); Processed.Add(expression); }
/// <inheritdoc /> public void Removed(string file) { var item = Processing.First(entry => entry.File == file); Processing.Remove(item); item.FileStatus = FileStatus.Aborted; Processed.Add(item); }
/// <inheritdoc /> public void DoesNotExists(string file) { var item = Processing.First(entry => entry.File == file); Processing.Remove(item); item.FileStatus = FileStatus.DoesNotExist; Processed.Add(item); }
public override ValueTask <EventHandlingStatus> HandleEvent(IMessageConsumeContext ctx) { Count++; if (ctx == null) { throw new InvalidOperationException(); } Processed.Add(ctx); return(default);
public void SaveProcessedTuples(DadTupleId upstreamId, List <DadTuple> processedTuples) { Debug.Assert(!Processed.ContainsKey(upstreamId)); Debug.Assert(!Delivered.Contains(upstreamId)); foreach (var processedTuple in processedTuples) { Debug.Assert(!Deleted.Contains(processedTuple.Id)); } Processed.Add(upstreamId, processedTuples); // TODO: remove from shared? }
private void BuildPatterns(string pattern) { if (Processed.Contains(pattern)) { return; } Processed.Add(pattern); string[] groups = pattern.Split('~'); for (int i = 0; i < groups.Length; i++) { string v = groups[i]; if (v == "0" || v == "1" || v == "2") { List <string> target = v == "0" ? S1 : (v == "1" ? S2 : S3); BuildSeries(pattern, i, target); } } }
public void Execute_BFS() { BFSQueue.Enqueue(sourceVertex); Discovered.Add(sourceVertex.Id); Parent.Add(sourceVertex.Id, -1); while (BFSQueue.Count != 0) { var current = BFSQueue.Dequeue(); ProcessVertex_Early(current); Processed.Add(current.Id); foreach (var node in current.AdjacencyList) { if (!Processed.Contains(node.Id)) { ProcessEdge(current, node); } if (!Discovered.Contains(node.Id)) { Discovered.Add(node.Id); BFSQueue.Enqueue(node); if (!Parent.ContainsKey(node.Id)) { Parent[node.Id] = current.Id; } else { Console.WriteLine("We shouldn't be here during BFS"); } } } ProcessVertex_Late(current); } }
void FindPath() { var node = FindLowestCostNode(); while (node != null) { var cost = Costs[node]; var neighbors = Graph[node]; foreach (var neighbor in neighbors.Keys) { var newCost = cost + neighbors[neighbor]; if (Costs[neighbor] > newCost) { Costs[neighbor] = newCost; Parents[neighbor] = node; } } Processed.Add(node); node = FindLowestCostNode(); } }
protected override void ProcessStream(CommittedEventStreamWithContext committedEventStreamWithContext) { Processed.Add(committedEventStreamWithContext); }
public bool NotProcessed() { return(Processed.Add(ProcessingIndex + Direction * _totalCommands)); }