Ejemplo n.º 1
0
    public void setPaymentFrequency(TypePaymentFrequencyKnownValues new_value)
    {
        TypePaymentFrequency new_full_value = new TypePaymentFrequency();

        Debug.Assert(new_value != TypePaymentFrequencyKnownValues.PaymentFrequency__none);
        new_full_value.in_known_list = true;
        new_full_value.list_value    = new_value;
        setPaymentFrequency(new_full_value);
    }
Ejemplo n.º 2
0
    public string  getPaymentFrequencyAsString()
    {
        TypePaymentFrequency result = getPaymentFrequency();

        if (result.in_known_list)
        {
            return(stringFromPaymentFrequency(result.list_value));
        }
        else
        {
            return(result.string_value);
        }
    }
Ejemplo n.º 3
0
    private void  fromJSONPaymentFrequency(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field PaymentFrequency of MortgageCalculatorInputVariablePaymentFrequencyJSON is not a string.");
        }
        TypePaymentFrequency the_open_enum = new TypePaymentFrequency();

        switch (json_string.getData()[0])
        {
        case 'B':
            if ((String.Compare(json_string.getData(), 1, "iWeekly", 0, 7, false) == 0) && (json_string.getData().Length == 8))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypePaymentFrequencyKnownValues.PaymentFrequency_BiWeekly;
                goto open_enum_is_done;
            }
            break;

        case 'M':
            if ((String.Compare(json_string.getData(), 1, "onthly", 0, 6, false) == 0) && (json_string.getData().Length == 7))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypePaymentFrequencyKnownValues.PaymentFrequency_Monthly;
                goto open_enum_is_done;
            }
            break;

        case 'W':
            if ((String.Compare(json_string.getData(), 1, "eekly", 0, 5, false) == 0) && (json_string.getData().Length == 6))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypePaymentFrequencyKnownValues.PaymentFrequency_Weekly;
                goto open_enum_is_done;
            }
            break;

        default:
            break;
        }
        the_open_enum.in_known_list = false;
        the_open_enum.string_value  = json_string.getData();
        open_enum_is_done :;
        setPaymentFrequency(the_open_enum);
    }
Ejemplo n.º 4
0
            protected override void handle_result(string result)
            {
                TypePaymentFrequencyKnownValues known     = stringToPaymentFrequency(result);
                TypePaymentFrequency            new_value = new TypePaymentFrequency();

                if (known == TypePaymentFrequencyKnownValues.PaymentFrequency__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);
            }
Ejemplo n.º 5
0
    public void setPaymentFrequency(string chars)
    {
        TypePaymentFrequencyKnownValues known     = stringToPaymentFrequency(chars);
        TypePaymentFrequency            new_value = new TypePaymentFrequency();

        if (known == TypePaymentFrequencyKnownValues.PaymentFrequency__none)
        {
            new_value.in_known_list = false;
            new_value.string_value  = chars;
        }
        else
        {
            new_value.in_known_list = true;
            new_value.list_value    = known;
        }
        setPaymentFrequency(new_value);
    }
Ejemplo n.º 6
0
 protected override void handle_result(TypePaymentFrequency result)
 {
     top.value.Add(result);
 }
Ejemplo n.º 7
0
            protected override void handle_result(TypePaymentFrequency result)
            {
//@@@        Debug.Assert(!have_value);
                have_value = true;
                value      = result;
            }
Ejemplo n.º 8
0
 protected abstract void handle_result(TypePaymentFrequency result);
Ejemplo n.º 9
0
 public void setPaymentFrequency(TypePaymentFrequency new_value)
 {
     flagHasPaymentFrequency = true;
     storePaymentFrequency   = new_value;
 }