Exemplo n.º 1
0
    public static string  stringFromStatus(TypeStatusKnownValues the_enum)
    {
        switch (the_enum)
        {
        case TypeStatusKnownValues.Status_processing:
            return("processing");

        case TypeStatusKnownValues.Status_no_drivers_available:
            return("no_drivers_available");

        case TypeStatusKnownValues.Status_accepted:
            return("accepted");

        case TypeStatusKnownValues.Status_arriving:
            return("arriving");

        case TypeStatusKnownValues.Status_in_progress:
            return("in_progress");

        case TypeStatusKnownValues.Status_driver_canceled:
            return("driver_canceled");

        case TypeStatusKnownValues.Status_rider_canceled:
            return("rider_canceled");

        case TypeStatusKnownValues.Status_completed:
            return("completed");

        default:
            Debug.Assert(false);
            return(null);
        }
    }
Exemplo n.º 2
0
        public void setStatus(TypeStatusKnownValues new_value)
        {
            TypeStatus new_full_value = new TypeStatus();

            Debug.Assert(new_value != TypeStatusKnownValues.Status__none);
            new_full_value.in_known_list = true;
            new_full_value.list_value    = new_value;
            setStatus(new_full_value);
        }
Exemplo n.º 3
0
        public static string  stringFromStatus(TypeStatusKnownValues the_enum)
        {
            switch (the_enum)
            {
            case TypeStatusKnownValues.Status_set:
                return("set");

            case TypeStatusKnownValues.Status_failed:
                return("failed");

            default:
                Debug.Assert(false);
                return(null);
            }
        }
Exemplo n.º 4
0
                protected override void handle_result(string result)
                {
                    TypeStatusKnownValues known     = stringToStatus(result);
                    TypeStatus            new_value = new TypeStatus();

                    if (known == TypeStatusKnownValues.Status__none)
                    {
                        new_value.in_known_list = false;
                        new_value.string_value  = result;
                    }
                    else
                    {
                        new_value.in_known_list = true;
                        new_value.list_value    = known;
                    }
                    handle_result(new_value);
                }
Exemplo n.º 5
0
        public void setStatus(string chars)
        {
            TypeStatusKnownValues known     = stringToStatus(chars);
            TypeStatus            new_value = new TypeStatus();

            if (known == TypeStatusKnownValues.Status__none)
            {
                new_value.in_known_list = false;
                new_value.string_value  = chars;
            }
            else
            {
                new_value.in_known_list = true;
                new_value.list_value    = known;
            }
            setStatus(new_value);
        }
Exemplo n.º 6
0
    public static string  stringFromStatus(TypeStatusKnownValues the_enum)
    {
        switch (the_enum)
        {
        case TypeStatusKnownValues.Status_Completed:
            return("Completed");

        case TypeStatusKnownValues.Status_Ongoing:
            return("Ongoing");

        case TypeStatusKnownValues.Status_Upcoming:
            return("Upcoming");

        default:
            Debug.Assert(false);
            return(null);
        }
    }
Exemplo n.º 7
0
        public static string  stringFromStatus(TypeStatusKnownValues the_enum)
        {
            switch (the_enum)
            {
            case TypeStatusKnownValues.Status_success:
                return("success");

            case TypeStatusKnownValues.Status_no_current_trip:
                return("no_current_trip");

            case TypeStatusKnownValues.Status_cancel_cash_trip_not_allowed:
                return("cancel_cash_trip_not_allowed");

            case TypeStatusKnownValues.Status_failure:
                return("failure");

            case TypeStatusKnownValues.Status_unauthorized:
                return("unauthorized");

            default:
                Debug.Assert(false);
                return(null);
            }
        }