1 instantiation of LogSortKey
aspire (1)
Mcp\Tools\ListConsoleLogsTool.cs (1)
146var key = new LogSortKey(timestamp, arrivalIndex++);
8 references to LogSortKey
aspire (8)
Mcp\Tools\ListConsoleLogsTool.cs (8)
29private static readonly Comparer<LogSortKey> s_latestFirst = Comparer<LogSortKey>.Create(static (x, y) => y.CompareTo(x)); 126var evictionOrder = fromHead ? s_latestFirst : Comparer<LogSortKey>.Default; 127var keptEntries = new PriorityQueue<LogEntry, LogSortKey>(limit + 1, evictionOrder); 146var key = new LogSortKey(timestamp, arrivalIndex++); 158else if (keptEntries.TryPeek(out _, out var evictedKey) && evictionOrder.Compare(key, evictedKey) > 0) 239private readonly record struct LogSortKey(DateTime Timestamp, long ArrivalIndex) : IComparable<LogSortKey> 241public int CompareTo(LogSortKey other)