When using T4 to generate C# code, I can't get correct identation with TABS scattered around:
public partial class Foo : Base
{
public int C { get; set; }
[MappedProperty("A.B[{C}].Foo")]
public int Foo { get; set; }
}
I'm using a seemingly correctly indented .TT code similar to the following:
public partial class <#= ViewModelName #>
{
<# foreach(var property in ViewModelProperties) { #>
<# if(property.Mapping != null) { #>
[MappedProperty("<#= property.Mapping #>")]
<# } #>
public <#= property.TypeDeclaration #> <#= property.MemberName #> { get; set; }
<# } #>
}
This code snippet reflects what I've already tried to do: make control statements and blocks to a single line as much as possible.
public ...
on same line asif
end:<# } #>public ...
– Balzer