src/LEA_Lib/Tasks/QueueByKey.cs
/// <summary>
///   Returns the object at the beginning by TKye of the Queue without removing it.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
Returns the object at the beginning by TKye of the Queue without removing it.
Returns the object at the beginning by TKye of the Queue without removing it .
public TValue Peek(TKey key)
        {
            lock (lockObject)
            {
                var topItem = (from x in queueItems
                               where x.key.Equals(key)
                               orderby x.timestamp
                               select x)
                         ?.FirstOrDefault();
                if (topItem != null)
                {
                    return topItem.item;
                }
            }
            return default(TValue);
        }
public TValue Peek ( TKey key ) { lock ( lockObject ) { var topItem = ( from x in queueItems where x . key . Equals ( key ) orderby x . timestamp select x ) ? . FirstOrDefault ( ) ; if ( topItem != null ) { return topItem . item ; } } return default ( TValue ) ; }
Returns the object at the beginning by TKye of the Queue without removing it.
Returns the object at the beginning by TKye of the Queue without removing it .
None
key
TKey
None