static FieldFunc DispatchFieldFunc(Type type) { if (!fieldFuncTable.TryGetValue(type, out var func)) { if (type.IsEnum) { func = new FieldFunc((obj, t) => EnumField(obj)); } else if (TypeUtility.IsList(type)) { func = ListField; } else if (TypeUtility.IsRecursive(type)) { func = new FieldFunc((obj, t) => RecursiveField(obj)); } else { func = StandardField; } fieldFuncTable[type] = func; } return(func); }
static LabelRightFunc DispatchLabelRightFunc(Type type) { LabelRightFunc ret = null; if (TypeUtility.IsList(type)) { ret = ListLabelRightFunc; } return(ret); }