コード例 #1
0
ファイル: PipedConcurrentQueue.cs プロジェクト: Nucs/nlib
 /// <summary>Initializes a new instance of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> class that contains elements copied from the specified collection</summary>
 /// <param name="collection">The collection whose elements are copied to the new <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" />.</param>
 /// <param name="style"></param>
 /// <exception cref="T:System.ArgumentNullException">The <paramref name="collection" /> argument is null.</exception>
 public PipedConcurrentQueue(IEnumerable <T> collection, PipedQueueStyle style)
 {
     Style = style;
     queue = new ConcurrentQueue <T>(collection);
 }
コード例 #2
0
ファイル: PipedConcurrentQueue.cs プロジェクト: Nucs/nlib
 /// <summary>Initializes a new instance of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> class.</summary>
 public PipedConcurrentQueue(PipedQueueStyle style)
 {
     Style = style;
     queue = new ConcurrentQueue <T>();
 }