summary refs log tree commit diff
path: root/crypto/src/util/collections/IStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/collections/IStore.cs')
-rw-r--r--crypto/src/util/collections/IStore.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/src/util/collections/IStore.cs b/crypto/src/util/collections/IStore.cs
new file mode 100644
index 000000000..12c19aaf4
--- /dev/null
+++ b/crypto/src/util/collections/IStore.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+
+namespace Org.BouncyCastle.Utilities.Collections
+{
+    /// <summary>A generic interface describing a simple store of objects.</summary>
+    /// <typeparam name="T">The covariant type of stored objects.</typeparam>
+    public interface IStore<out T>
+    {
+        /// <summary>Enumerate the (possibly empty) collection of objects matched by the given selector.</summary>
+        /// <param name="selector">The <see cref="ISelector{T}"/> used to select matching objects.</param>
+        /// <returns>An <see cref="IEnumerable{T}"/> of the matching objects.</returns>
+        IEnumerable<T> EnumerateMatches(ISelector<T> selector);
+    }
+}