<#@ template language="C#" #> <#@ assembly name="System.Core" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ import namespace="ClassFileGenerator.Core.Meta.Words" #> <#@ import namespace="ClassFileGenerator.Core.Meta.Def.Methods" #> <# foreach(var usingDefinitions in usings){ #> <#= usingDefinitions.ToText() #>; <# } #> <# if(usings.Any()){ #> <# } #> namespace <#= nameSpace #> { public <# if(isPartial){ #>partial <# } #>class <#= className #> <# if(implementsSetting.HasAny){ #> : <#= implementsSetting.HeadImplement #> <# foreach(var elem in implementsSetting.TailImplement) { #> , <#= elem #> <# } #> <# }#> {<# if(fields.Any()){ #> <# } #> <# foreach(var field in fields){ #> <#= field.AccessLevel.ToText() #> <#if(field.IsReadonly){ #>readonly <# } #><#= field.Type #> <#= field.Name #><# if(field.Value != null){ #> = <#= field.Value #><# } #>; <# } #><# if( constructors.Any()){ #> <# } #> <# foreach(var constructor in constructors){ #> <#= constructor.AccessLevel.ToText() #> <#= className #>(<#= constructor.ArgumentsText(formatter) #>)<# if (constructor.CallBase) { #> : base(<#= constructor.CallArgumentsText() #>)<# } #><# if (constructor.CallThis) { #> : this(<#= constructor.CallArgumentsText() #>)<# } #> { <# foreach(var line in constructor.Body){ #> <#= line #> <# } #> } <# } #> <# var isFirst = true; foreach(var property in properties){ #> <# if(!isFirst) { #> <# } #> <# isFirst = false; #> <#= property.MaxAccessLevel.ToText() #> <#= property.Type #> <#= property.Name #> {<#= property.GetterAccessLevel == property.MaxAccessLevel ? "" : property.GetterAccessLevel.ToText() #> get;<# if(property.HasSetter){ #><#= property.SetterAccessLevel == property.MaxAccessLevel ? "" : " " + property.SetterAccessLevel.ToText() #> set;<# } #> } <# } #> <# foreach(var method in methods){ #> <# if(!isFirst) { #> <# } #> <# isFirst = false; #> <#= method.AccessLevel.ToText() #> <#= method.ReturnType #> <#= method.Name #><# if(method.HasAnyGenerics){ #><<#= method.GenericsList #>><# } #>(<#= method.ArgumentsText(formatter) #>)<# if(method.HasAnyGenericsWhere){ #> <# foreach(var condition in method.GenericsWheres){ #> where <#= condition #> <# } #> <# } #> <# if(!method.HasAnyGenericsWhere) { #> <# } #> { <# foreach(var line in method.Body){ #> <#= line #> <# } #> } <# } #> } }