public CodeGen() { _codeString = ""; _seed = new seed(""); _template = new CodeTemplate(); _worker = new InsertWorker(); }
public static void run() { var para = new List<KeyValuePair<string,string>>(); KeyValuePair<string, string> p1 = new KeyValuePair<string, string>("id","int"); KeyValuePair<string, string> p2 = new KeyValuePair<string, string>("uid", "string"); para.Add(p1); para.Add(p2); var product = new BasicSeed { ReturnType= "ContactEmail", FuncName="Validate", Params = para }; string cls = JsonConvert.SerializeObject(product); seed test = new seed(cls); var basic = test.getBasicSeed(); CodeTemplate codet = new CodeTemplate(basic); var v1 = codet.gen(); codet.writeFile(v1); }
public CodeGen(seed pseed, CodeTemplate pcodetemplate, InsertWorker pworker) { this._seed = pseed; this._template = pcodetemplate; this._worker = pworker; }