Example #1
0
    private static void Main(string[] args)
    {
      Args = args.Select(a => a.ToLower()).ToArray();

      string tArg = Args.Where(a => a.StartsWith(TArgMarker)).SingleOrDefault();
      if (tArg!=null) {
        tArg = tArg.Remove(0, TArgMarker.Length);
        ToolNames = tArg.RevertibleSplit('/', ',').Distinct().ToList();
      }

      IDisposable jsonWriterScope = null;
      string jsonArg = args.Where(a => a.ToLower().StartsWith(JsonArgMarker)).SingleOrDefault();
      if (jsonArg!=null) {
        jsonArg = jsonArg.Remove(0, Math.Min(JsonArgMarker.Length, jsonArg.Length));
        if (jsonArg.IsNullOrEmpty())
          jsonWriterScope = JsonWriter.Initialize(JsonOutputFile);
        else
          jsonWriterScope = JsonWriter.Initialize(jsonArg);
      }

      using (jsonWriterScope) {
        var linqTestRunner = new LinqTestRunner();
        var performanceTestRunner = new PerformanceTestRunner();
        linqTestRunner.Run();
        performanceTestRunner.Run();
      }

      if (Args.Where(a => a==WArgMarker).SingleOrDefault()!=null)
        Console.ReadKey();
    }
Example #2
0
        private static void Main(string[] args)
        {
            Args = args.Select(a => a.ToLower()).ToArray();

            string tArg = Args.Where(a => a.StartsWith(TArgMarker)).SingleOrDefault();

            if (tArg != null)
            {
                tArg      = tArg.Remove(0, TArgMarker.Length);
                ToolNames = tArg.RevertibleSplit('/', ',').Distinct().ToList();
            }

            IDisposable jsonWriterScope = null;
            string      jsonArg         = args.Where(a => a.ToLower().StartsWith(JsonArgMarker)).SingleOrDefault();

            if (jsonArg != null)
            {
                jsonArg = jsonArg.Remove(0, Math.Min(JsonArgMarker.Length, jsonArg.Length));
                if (jsonArg.IsNullOrEmpty())
                {
                    jsonWriterScope = JsonWriter.Initialize(JsonOutputFile);
                }
                else
                {
                    jsonWriterScope = JsonWriter.Initialize(jsonArg);
                }
            }

            using (jsonWriterScope) {
                var linqTestRunner        = new LinqTestRunner();
                var performanceTestRunner = new PerformanceTestRunner();
                linqTestRunner.Run();
                performanceTestRunner.Run();
            }

            if (Args.Where(a => a == WArgMarker).SingleOrDefault() != null)
            {
                Console.ReadKey();
            }
        }