/// <summary>The poll.</summary> /// <param name="collection">The collection.</param> /// <param name="timeoutMilliseconds">The timeout milliseconds.</param> /// <typeparam name="T">Type T</typeparam> /// <returns>The T.</returns> public static T Poll <T>(this BlockingCollection <T> collection, int timeoutMilliseconds) { return(collection.Poll(new TimeSpan(0, 0, 0, 0, timeoutMilliseconds))); }