/// <summary>
        /// Creates a new instance of the <see cref="PathBenchmarkBuilderAsSyntax"/> class.
        /// </summary>
        /// <param name="generator">The text generator.</param>
        /// <param name="path">The path that the output should be written to.</param>
        public PathBenchmarkBuilderAsSyntax(TextGenerator generator, string path)
        {
            Ensure.ArgumentNotNull(generator, "generator");
            Ensure.NotNullOrEmpty(path, "path");

            this.generator = generator;
            this.path = path;
        }
        /// <summary>
        /// Writes the output to the specified path or filename. If a filename or relative path is specified it will be
        /// relative the current base directory of the executing app domain.
        /// </summary>
        /// <param name="filenameOrPath"></param>
        public static IBenchmarkBuilderAsSyntax ToPath(this IBenchmarkBuilderToSyntax builder, string filenameOrPath)
        {
            Ensure.NotNullOrEmpty(filenameOrPath, "filenameOrPath", "Please specify a valid path or filename");

            var generator = new TextGenerator(builder);
            string path = PathGenerator.Generate(filenameOrPath);

            return new PathBenchmarkBuilderAsSyntax(generator, path);
        }
 /// <summary>
 /// Creates a new instance of the <see cref="ConsoleBenchmarkBuilderAsSyntax"/> class.
 /// </summary>
 /// <param name="generator">The text generator.</param>
 public ConsoleBenchmarkBuilderAsSyntax(TextGenerator generator)
 {
     Ensure.ArgumentNotNull(generator, "generator");
     this.generator = generator;
 }
 /// <summary>
 /// Writes the output to the console.
 /// </summary>
 public static IBenchmarkBuilderAsSyntax ToConsole(this IBenchmarkBuilderToSyntax builder)
 {
     var generator = new TextGenerator(builder);
     return new ConsoleBenchmarkBuilderAsSyntax(generator);
 }