private string CreateFile(TypeInfo type, string templateName, string className, bool markAsGenerated) { var relativeName = Path.Combine(GetPackageDir(type), className + (markAsGenerated ? ".generated" : "") + ".cs"); var fullname = Path.Combine(BaseOutputPath, relativeName); Directory.CreateDirectory(Path.Combine(BaseOutputPath, GetPackageDir(type))); TemplateWrapper template = new TemplateWrapper(templateName); template.StartSession(); template.SetAttribute("it", type); template.SetAttribute("class", className); File.WriteAllText(fullname, template.Render()); // FormatFileWithNArranger(fullname); FormatFileWithAStyle(fullname); log.Info("Created file " + relativeName); return(relativeName); }
private string CreateFile(TypeInfo type, string templateName, string className, bool markAsGenerated) { var relativeName = Path.Combine(GetPackageDir(type), className + (markAsGenerated ? ".generated" : "") + ".cs"); var fullname = Path.Combine(BaseOutputPath, relativeName); Directory.CreateDirectory(Path.Combine(BaseOutputPath, GetPackageDir(type))); TemplateWrapper template = new TemplateWrapper(templateName); template.StartSession(); template.SetAttribute("it", type); template.SetAttribute("class", className); File.WriteAllText(fullname, template.Render()); // FormatFileWithNArranger(fullname); FormatFileWithAStyle(fullname); log.Info("Created file " + relativeName); return relativeName; }