Example #1
0
        private string ApplyDataOfRequest(RequestDataModel Request)
        {
            string         ClassData = _template;
            ParamsReplacer Replacer  = new ParamsReplacer(_template, Request);

            return(Replacer.Process());
        }
        private void CreateRequest(string requestUrl, MethodModel model, string method, string classNamePrefix = "")
        {
            RequestDataModel request = new RequestDataModel(requestUrl, model, method, BasePath, classNamePrefix, GetShemeModel);

            if (Folders.IndexOf(request.Folder) == -1)
            {
                Folders.Add(request.Folder);
            }

            Requests.Add(request);

            //Debug.Log(request.ClassName);
        }
Example #3
0
        public void CreateFile(RequestDataModel Request)
        {
            string FileName = Request.Folder + "/" + Request.ClassName + ".cs";

            File.WriteAllText(FileName, ApplyDataOfRequest(Request));
        }
Example #4
0
 public ParamsReplacer(string template, RequestDataModel request)
 {
     _classText = template;
     _request   = request;
 }