public ExtendedProperty(string uid, KeyValuePair <string, JToken> keyValuePair, int depth) { //this.depth = depth; this.Uid = uid + "_" + keyValuePair.Key; this.KeyValuePair = keyValuePair; UpdateNameByNamingConventionsType(); this.type = DartHelper.ConverDartType(keyValuePair.Value.Type); PropertyAccessorType = ConfigHelper.Instance.Config.PropertyAccessorType; }
public virtual String GetBaseTypeString(String className = null) { if (className != null) { return(className); } var temp = Value; while (temp is JArray) { temp = temp.First; } return(DartHelper.GetDartTypeString(DartHelper.ConverDartType(temp?.Type ?? JTokenType.Object))); }
public virtual String GetTypeString(String className = null) { var temp = Value; String result = null; while (temp is JArray) { if (result == null) { result = "List<{0}>"; } else { result = String.Format("List<{0}>", result); } temp = temp.First; } if (result != null) { result = String.Format(result, className ?? DartHelper.GetDartTypeString(DartHelper.ConverDartType(temp?.Type ?? JTokenType.Object))); } return(result ?? (className ?? DartHelper.GetDartTypeString(Type))); }