using System; using System.Collections.Generic; namespace Apewer.Internals.QrCode { internal delegate TResult Func<in T, out TResult>(T arg); internal static class Methods { public static bool Contains<T>(IEnumerable<T> objects, T cell) { foreach (var i in objects) { if ((object)i == (object)cell) return true; } return false; } public static List<int> Select(IEnumerable<string> input, Func<string, int> selector) { var list = new List<int>(); foreach (var oldValue in input) { list.Add(selector(oldValue)); } return list; } } }