/// <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); }
public void CompileFile_WhenGivenANullLogErrorAction_ThrowsArgumentNullException(string outputFile) { Assert.That(() => CompileManager.CompileFile("OK.peg", outputFile, null), Throws.InstanceOf <ArgumentNullException>()); }
public void CompileFile_WhenGivenANullInputFileName_ThrowsArgumentNullException(string outputFile) { Assert.That(() => CompileManager.CompileFile(null, outputFile, err => { }), Throws.InstanceOf <ArgumentNullException>()); }