Prevent CodeDom from splitting large strings
See the question and my original answer on StackOverflowHmm.. I don't think so. Poking with .NET Reflector into the source code of Microsoft.CSharp.CSharpCodeGenerator (System's internal), we find this:
private void GeneratePrimitiveExpressionBase(CodePrimitiveExpression e)
{
...
else if (e.Value is string)
{
this.Output.Write(this.QuoteSnippetString((string) e.Value));
}
...
}
and ... this:
private string QuoteSnippetString(string value)
{
if (((value.Length >= 0x100) && (value.Length <= 0x5dc)) && (value.IndexOf('\0') == -1))
{
return this.QuoteSnippetStringVerbatimStyle(value);
}
return this.QuoteSnippetStringCStyle(value);
}
And if you dig further, both functions are not configurable.