Example #1
0
        /// <summary>
        /// Reads and compiles the specified grammars.
        /// </summary>
        /// <returns>true, if the compilation was successful; false, otherwise.</returns>
        public override bool Execute()
        {
            var inputs = this.InputFile;

            CompileManager.CompileFile(this.InputFile, this.OutputFile, this.LogError, new GraphQLGenerationOptions {
                Namespace = Namespace, LanguageVersion = LanguageVersion
            });

            return(!this.Log.HasLoggedErrors);
        }
Example #2
0
 public void CompileFile_WhenGivenANullLogErrorAction_ThrowsArgumentNullException(string outputFile)
 {
     Assert.That(() => CompileManager.CompileFile("OK.peg", outputFile, null), Throws.InstanceOf <ArgumentNullException>());
 }
Example #3
0
 public void CompileFile_WhenGivenANullInputFileName_ThrowsArgumentNullException(string outputFile)
 {
     Assert.That(() => CompileManager.CompileFile(null, outputFile, err => { }), Throws.InstanceOf <ArgumentNullException>());
 }