Exemplo n.º 1
0
 public void Setup()
 {
     // Arrange
     this.stringFilterQuery = new StringFilterQuery();
     this.sampleInput       = new List <string> {
         "al", "albums", "aver", "bar", "barely", "be", "befoul", "bums", "by", "cat", "con", "convex", "ely", "foul", "here", "hereby", "jig", "jigsaw", "or", "saw", "tail", "tailor", "vex", "we", "weaver", "Jamiee"
     };
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var input = new List<string> { "al", "albums", "aver", "bar", "barely", "be", "befoul", "bums", "by", "cat", "con", "convex", "ely", "foul", "here", "hereby", "jig", "jigsaw", "or", "saw", "tail", "tailor", "vex", "we", "weaver", "Jamiee" };

            // This would normally be injected via an interface.
            var stringFilter = new StringFilterQuery();

            stringFilter.Invoke(input).ToList().ForEach(Console.WriteLine);

            // Quick performance test over 10,000 iterations. Leaving this here incase useful. Wouldn't leave this in prod code.
            /* var now = DateTime.Now;

            for (var i = 0; i <= 100000; i++)
            {
                stringFilter.Invoke(input).ToList();
            }

            Console.WriteLine(now - DateTime.Now);*/
            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var input = new List <string> {
                "al", "albums", "aver", "bar", "barely", "be", "befoul", "bums", "by", "cat", "con", "convex", "ely", "foul", "here", "hereby", "jig", "jigsaw", "or", "saw", "tail", "tailor", "vex", "we", "weaver", "Jamiee"
            };

            // This would normally be injected via an interface.
            var stringFilter = new StringFilterQuery();

            stringFilter.Invoke(input).ToList().ForEach(Console.WriteLine);

            // Quick performance test over 10,000 iterations. Leaving this here incase useful. Wouldn't leave this in prod code.

            /* var now = DateTime.Now;
             *
             * for (var i = 0; i <= 100000; i++)
             * {
             *  stringFilter.Invoke(input).ToList();
             * }
             *
             * Console.WriteLine(now - DateTime.Now);*/
            Console.ReadLine();
        }
 public void Setup()
 {
     // Arrange
     this.stringFilterQuery = new StringFilterQuery();
     this.sampleInput = new List<string> { "al", "albums", "aver", "bar", "barely", "be", "befoul", "bums", "by", "cat", "con", "convex", "ely", "foul", "here", "hereby", "jig", "jigsaw", "or", "saw", "tail", "tailor", "vex", "we", "weaver", "Jamiee" };
 }