Class SlidingBufferMatchCollection<T>
An ICollection holding unique SlidingBufferMatch objects. The backing collection is thread-safe and deduplicated.
Implements
IReadOnlyCollection<T>
Namespace: StreamRegex.Extensions
Assembly: StreamRegex.Extensions.dll
Syntax
public class SlidingBufferMatchCollection<T> : ICollection<T> where T : SlidingBufferMatch
Type Parameters
Name | Description |
---|---|
T | The type must inherit from SlidingBufferMatch |
Constructors
| Improve this Doc View SourceSlidingBufferMatchCollection()
Default constructor
Declaration
public SlidingBufferMatchCollection()
Properties
| Improve this Doc View SourceCount
The number of Matches in the collection
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsSynchronized
This collection is thread-safe.
Declaration
public bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
Boolean |
SyncRoot
Not supported.
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
Object |
Methods
| Improve this Doc View SourceAdd(T)
Add a SlidingBufferMatch to the collection. If the same match has already been added no-op.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The match to add. |
Clear()
Declaration
public void Clear()
Contains(T)
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
Boolean |
CopyTo(T[], Int32)
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | |
Int32 | arrayIndex |
GetEnumerator()
Gets an
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<T> | An |
Remove(T)
Remove the provided item.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
Boolean | True if the item was removed |
Implements
IReadOnlyCollection<>