ISelector.cs 821 B

1234567891011121314151617181920
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
  5. {
  6. /// <summary>Interface for matching objects in an <see cref="IStore{T}"/>.</summary>
  7. /// <typeparam name="T">The contravariant type of selectable objects.</typeparam>
  8. public interface ISelector<in T>
  9. : ICloneable
  10. {
  11. /// <summary>Match the passed in object, returning true if it would be selected by this selector, false
  12. /// otherwise.</summary>
  13. /// <param name="candidate">The object to be matched.</param>
  14. /// <returns><code>true</code> if the objects is matched by this selector, false otherwise.</returns>
  15. bool Match(T candidate);
  16. }
  17. }
  18. #pragma warning restore
  19. #endif