/// <summary> /// Processes the given settings and modifies the <see cref="ProcessArgumentBuilder"/> /// </summary> /// <param name="args"></param> /// <param name="environment"></param> internal void Evaluate(ProcessArgumentBuilder args, ICakeEnvironment environment) { if (Version) { args.Append("--version"); } if (Verbose) { args.Append("--verbose"); } if (TimingsMode) { args.Append("--timings"); } if (!string.IsNullOrEmpty(TemplateEngine)) { args.Append("--template-engine " + TemplateEngine); } if (TemplateDir != null) { args.Append("--template-dir " + TemplateDir.MakeAbsolute(environment).FullPath.Quote()); } if (SectionNumbers) { args.Append("--section-numbers"); } if (SafeMode.HasValue) { args.Append("--safe-mode " + Enum.GetName(typeof(SafeMode), SafeMode.Value).ToLower(CultureInfo.InvariantCulture)); } if (Require) { args.Append("--require"); } if (Quiet) { args.Append("--quiet"); } if (Output != null) { args.Append("--out-file " + Output.MakeAbsolute(environment).FullPath.Quote()); } if (SuppressHeaderAndFooter) { args.Append("--no-header-footer"); } foreach (var p in LoadPath) { args.Append("--load-path " + p.MakeAbsolute(environment).FullPath.Quote()); } if (ERuby.HasValue) { { args.Append("--eruby " + Enum.GetName(typeof(ERuby), ERuby.Value).ToLower(CultureInfo.InvariantCulture)); } } if (DocType.HasValue) { { args.Append("--doctype " + Enum.GetName(typeof(DocType), DocType.Value).ToLower(CultureInfo.InvariantCulture)); } } if (DestinationDir != null) { args.Append("--destination-dir " + DestinationDir.MakeAbsolute(environment).FullPath.Quote()); } if (Compact) { args.Append("--compact"); } foreach (var p in ClassPath) { args.Append("--classpath " + p.MakeAbsolute(environment).FullPath.Quote()); } if (BaseDir != null) { args.Append("--base-dir " + BaseDir.MakeAbsolute(environment).FullPath.Quote()); } if (!string.IsNullOrEmpty(Backend)) { args.Append("--backend " + Backend); } foreach (var kvp in Attributes) { args.Append($"--attribute {kvp.Key}={kvp.Value}"); } // input is last! foreach (var f in InputFiles) { args.Append(f.MakeAbsolute(environment).FullPath.Quote()); } }