/// <summary> /// Get Stratey /// </summary> /// <param name="type"></param> /// <returns>Stratety by TypeField</returns> public static IValidationStrategy GetStratey(TypeFieldType type) { return(type switch { TypeFieldType.TypeString => new ValidationString(), TypeFieldType.TypeInt => new ValidationInt(), TypeFieldType.TypeDecimal => new ValidationDecimal(), _ => new ValidationString(), });
public static string stringFromFieldType(TypeFieldType the_enum) { switch (the_enum) { case TypeFieldType.FieldType_To: return("To"); case TypeFieldType.FieldType_Unknown: return("Unknown"); default: Debug.Assert(false); return(null); } }
protected override void handle_result(TypeFieldType result) { top.value.Add(result); }
protected override void handle_result(TypeFieldType result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(TypeFieldType result);
public void setFieldType(TypeFieldType new_value) { flagHasFieldType = true; storeFieldType = new_value; }