Example #1
0
 public CodeGen()
 {
     _codeString = "";
     _seed = new seed("");
     _template = new CodeTemplate();
     _worker = new InsertWorker();
 }
Example #2
0
        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);
        }
Example #3
0
 public CodeGen(seed pseed, CodeTemplate pcodetemplate, InsertWorker pworker)
 {
     this._seed = pseed;
     this._template = pcodetemplate;
     this._worker = pworker;
 }