-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathIBlockingCollection.cs
More file actions
50 lines (32 loc) · 1.22 KB
/
IBlockingCollection.cs
File metadata and controls
50 lines (32 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
namespace ZusiTcpInterface
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public interface IBlockingCollection<T> : ICollection, IDisposable, IReadOnlyCollection<T>
{
int BoundedCapacity { get; }
bool IsAddingCompleted { get; }
bool IsCompleted { get; }
new int Count { get; }
void Add(T item);
void Add(T item, CancellationToken cancellationToken);
bool TryAdd(T item);
bool TryAdd(T item, TimeSpan timeout);
bool TryAdd(T item, int millisecondsTimeout);
bool TryAdd(T item, int millisecondsTimeout, CancellationToken cancellationToken);
T Take();
T Take(CancellationToken cancellationToken);
bool TryTake(out T item);
bool TryTake(out T item, TimeSpan timeout);
bool TryTake(out T item, int millisecondsTimeout);
bool TryTake(out T item, int millisecondsTimeout, CancellationToken cancellationToken);
void CompleteAdding();
T[] ToArray();
void CopyTo(T[] array, int index);
IEnumerable<T> GetConsumingEnumerable();
IEnumerable<T> GetConsumingEnumerable(CancellationToken cancellationToken);
}
}