Generated serialization code
Avoid single statement control structures


if (DecimalNumbers == null)
    writer.Write("null");
else



The one real argument in favor of the single statement version of control statements is that they save typing.  However, in this case, it increases the amount of typing, as you have to add special logic to handle the single statement case.  

if (DecimalNumbers == null)
{
    writer.Write("null");
}
else


If anyone ever edits the generated code directly, the single statement form can be actively harmful.  Someone not paying attention can add a second statement and not realize that it is not part of a block.  So a statement that is only supposed to run some of the time runs all the time.  

Indentation?


if (DecimalNumbers != null)
for(var i = 0; i &lt; DecimalNumbers.Count; i++)
{
    var value = DecimalNumbers[i];
    GeneratorByteConverter.Include(value, bytes, index);;
    index += 8;
}



Shouldn't most of these lines (all but the first) have another level of indent?  

Note that this is an example of when the single statement form can be confusing.  It would be more obvious that the for loop was inside a then block if it were in block form.  

foreach vs. for

In .NET, which loop runs faster, 'for' or 'foreach'?

Most answers agree that for is faster than the equivalent foreach but not all.  See here.  Note that that answer is newer than others.  

There is no reason why a foreach has to be slower than the equivalent for.  The compiler can certainly make that conversion for you.  Even if it is true for some case now, it may not be true in the future.  

Another answer also points out that you would gain as much performance by switching from List to an array.  

If performance is that important to you, then you should benchmark the various alternatives.  You might even find it useful to have the code generator run benchmarks for you.  Because apparently some situations are optimized and others not.