/// <summary> /// /// </summary> /// <param name="info"></param> public void Create(SourceGenerateInfo createInfo) { var tempinfo = createInfo.TemplateInfo; foreach (string tableName in createInfo.TableNames) { TableList table = LinqSqlHelp.GetTable(tableName); if (table != null) { string code = this.CreateSourceCode(tempinfo, table, createInfo.SavePath); string fileName = tempinfo.FileName.Replace("{@TableNameCamelU}", this.GetCamelName(table.TableName, true)); string filePath = System.IO.Path.Combine(createInfo.SavePath, fileName); using (System.IO.StreamWriter writer = new System.IO.StreamWriter(filePath, false, Encoding.UTF8)) { writer.Write(code); } } } }
public SourceCreateForm() { InitializeComponent(); this._createInfo = new SourceGenerateInfo(); }