Example #1
0
 /// <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(),
     });
Example #2
0
    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);
        }
    }
Example #3
0
 protected override void handle_result(TypeFieldType result)
 {
     top.value.Add(result);
 }
Example #4
0
            protected override void handle_result(TypeFieldType result)
            {
//@@@        Debug.Assert(!have_value);
                have_value = true;
                value      = result;
            }
Example #5
0
 protected abstract void handle_result(TypeFieldType result);
Example #6
0
 public void setFieldType(TypeFieldType new_value)
 {
     flagHasFieldType = true;
     storeFieldType   = new_value;
 }