2
0

ListHelper.cs 629 B

123456789101112131415161718192021222324252627
  1. #pragma warning disable CS1591
  2. using System;
  3. namespace MediaBrowser.Model.Extensions
  4. {
  5. // TODO: @bond remove
  6. public static class ListHelper
  7. {
  8. public static bool ContainsIgnoreCase(string[] list, string value)
  9. {
  10. if (value == null)
  11. {
  12. throw new ArgumentNullException(nameof(value));
  13. }
  14. foreach (var item in list)
  15. {
  16. if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
  17. {
  18. return true;
  19. }
  20. }
  21. return false;
  22. }
  23. }
  24. }