private void PreProcessSynchronizerParameteres(GXProcedure instance, string method, Dictionary <string, object> bodyParameters) { var gxParameterName = instance.GetType().GetMethod(method).GetParameters().First().Name.ToLower(); GxUnknownObjectCollection hashList; if (bodyParameters.ContainsKey(string.Empty)) { hashList = (GxUnknownObjectCollection)ReflectionHelper.ConvertStringToNewType(bodyParameters[string.Empty], typeof(GxUnknownObjectCollection)); } else { hashList = new GxUnknownObjectCollection(); } bodyParameters[gxParameterName] = TableHashList(hashList); }
//Convert GxUnknownObjectCollection of Object[] to GxUnknownObjectCollection of GxSimpleCollections public GxUnknownObjectCollection TableHashList(GxUnknownObjectCollection tableHashList) { GxUnknownObjectCollection result = new GxUnknownObjectCollection(); if (tableHashList != null && tableHashList.Count > 0) { foreach (object[] list in tableHashList) { GxStringCollection tableHash = new GxStringCollection(); foreach (string data in list) { tableHash.Add(data); } result.Add(tableHash); } } return(result); }
static public GxUnknownObjectCollection Matches(string txt, string rex) { resetError(); try { Regex r = new Regex(rex, RegexOptions.Multiline); MatchCollection mc = r.Matches(normalizeText(txt)); GxUnknownObjectCollection c = new GxUnknownObjectCollection(); foreach (Match m in mc) { c.Add(new GxRegexMatch(m)); } return(c); } catch (Exception e) { setError(1, e.Message); } return(new GxUnknownObjectCollection()); }