public string CaptureOptions(bool bWithIncludedFiles)
{
var buf = new StringBuilder();
// Options
buf.AppendFormat("linelen:{0}\n", MaxLineLength);
buf.AppendFormat("no-obfuscate:{0}\n", NoObfuscate);
buf.AppendFormat("detect-consts:{0}\n", DetectConsts);
buf.AppendFormat("formatted:{0}\n", Formatted);
buf.AppendFormat("diag-symbols:{0}\n", SymbolInfo);
buf.AppendFormat("output-encoding:{0}\n", OutputEncoding==null ? "null" : OutputEncoding.ToString());
// File list
buf.Append("files:\n");
foreach (var f in m_files)
{
buf.Append(f.filename);
buf.Append(System.IO.Path.PathSeparator);
buf.Append(f.encoding==null ? "null" : f.encoding.ToString());
buf.Append("\n");
}
// Included file list
if (bWithIncludedFiles)
{
buf.Append("included:\n");
foreach (var f in m_IncludedFiles)
{
buf.Append(f);
buf.Append("\n");
}
}
return buf.ToString();
}