Exemplo n.º 1
0
    public void setSeasonPhrasing(TypeSeasonPhrasingKnownValues new_value)
    {
        TypeSeasonPhrasing new_full_value = new TypeSeasonPhrasing();

        Debug.Assert(new_value != TypeSeasonPhrasingKnownValues.SeasonPhrasing__none);
        new_full_value.in_known_list = true;
        new_full_value.list_value    = new_value;
        setSeasonPhrasing(new_full_value);
    }
Exemplo n.º 2
0
    public string  getSeasonPhrasingAsString()
    {
        TypeSeasonPhrasing result = getSeasonPhrasing();

        if (result.in_known_list)
        {
            return(stringFromSeasonPhrasing(result.list_value));
        }
        else
        {
            return(result.string_value);
        }
    }
Exemplo n.º 3
0
    private void  fromJSONSeasonPhrasing(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 SeasonPhrasing of SportsSeasonJSON is not a string.");
        }
        TypeSeasonPhrasing the_open_enum = new TypeSeasonPhrasing();

        switch (json_string.getData()[0])
        {
        case 'C':
            if ((String.Compare(json_string.getData(), 1, "urrentSeason", 0, 12, false) == 0) && (json_string.getData().Length == 13))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypeSeasonPhrasingKnownValues.SeasonPhrasing_CurrentSeason;
                goto open_enum_is_done;
            }
            break;

        case 'L':
            if ((String.Compare(json_string.getData(), 1, "astSeason", 0, 9, false) == 0) && (json_string.getData().Length == 10))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypeSeasonPhrasingKnownValues.SeasonPhrasing_LastSeason;
                goto open_enum_is_done;
            }
            break;

        case 'Y':
            if ((String.Compare(json_string.getData(), 1, "ear", 0, 3, false) == 0) && (json_string.getData().Length == 4))
            {
                the_open_enum.in_known_list = true;
                the_open_enum.list_value    = TypeSeasonPhrasingKnownValues.SeasonPhrasing_Year;
                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 :;
        setSeasonPhrasing(the_open_enum);
    }
Exemplo n.º 4
0
            protected override void handle_result(string result)
            {
                TypeSeasonPhrasingKnownValues known     = stringToSeasonPhrasing(result);
                TypeSeasonPhrasing            new_value = new TypeSeasonPhrasing();

                if (known == TypeSeasonPhrasingKnownValues.SeasonPhrasing__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 setSeasonPhrasing(string chars)
    {
        TypeSeasonPhrasingKnownValues known     = stringToSeasonPhrasing(chars);
        TypeSeasonPhrasing            new_value = new TypeSeasonPhrasing();

        if (known == TypeSeasonPhrasingKnownValues.SeasonPhrasing__none)
        {
            new_value.in_known_list = false;
            new_value.string_value  = chars;
        }
        else
        {
            new_value.in_known_list = true;
            new_value.list_value    = known;
        }
        setSeasonPhrasing(new_value);
    }
Exemplo n.º 6
0
 protected override void handle_result(TypeSeasonPhrasing result)
 {
     top.value.Add(result);
 }
Exemplo n.º 7
0
            protected override void handle_result(TypeSeasonPhrasing result)
            {
//@@@        Debug.Assert(!have_value);
                have_value = true;
                value      = result;
            }
Exemplo n.º 8
0
 protected abstract void handle_result(TypeSeasonPhrasing result);
Exemplo n.º 9
0
 public void setSeasonPhrasing(TypeSeasonPhrasing new_value)
 {
     flagHasSeasonPhrasing = true;
     storeSeasonPhrasing   = new_value;
 }