Example #1
0
        void PopulateParaList(SqlConfig setting, JArray dataArray, OperateType type, IDbBuilder parent)
        {
            dataArray.ToList().ForEach(x =>
            {
                var parserData     = new ParserData(this.Data, (JObject)x["data"], setting, type, parent);
                IDbBuilder builder = new Parser(parserData, GetSystemFieldValue).ToBuilder();
                InitSystemField(builder);

                if (setting.Children != null && setting.Children.Any() && (JObject)x["children"] != null)
                {
                    foreach (var sqlSetting in setting.Children)
                    {
                        ParseChild(builder, sqlSetting, (JObject)x["children"]);
                    }
                }
            });
        }
Example #2
0
 public Parser(ParserData data, Func <string, object> getSystemFieldValue)
 {
     this.Data = data;
     this.GetSystemFieldValue = getSystemFieldValue;
 }