public T[] GetParamArray <T>() where T : new() { var typeName = typeof(T).Name; var entity = JsonParams.Find(typeName + "[]"); if (entity == null) { return(new T[0]); } else { return(JsonConvert.DeserializeObject <T[]>(entity.JsonBody)); } }
public void SetParamArray <T>(T[] args) where T : new() { var typeName = typeof(T).Name + "[]"; var entity = JsonParams.Find(typeName); if (entity == null) { entity = new JsonParam { Id = typeName }; JsonParams.Add(entity); } entity.JsonBody = JsonConvert.SerializeObject(args); }