示例#1
0
    public void setError(TypeErrorKnownValues new_value)
    {
        TypeError new_full_value = new TypeError();

        Debug.Assert(new_value != TypeErrorKnownValues.Error__none);
        new_full_value.in_known_list = true;
        new_full_value.list_value    = new_value;
        setError(new_full_value);
    }
示例#2
0
    public static string  stringFromError(TypeErrorKnownValues the_enum)
    {
        switch (the_enum)
        {
        case TypeErrorKnownValues.Error_DataUnavailable:
            return("DataUnavailable");

        default:
            Debug.Assert(false);
            return(null);
        }
    }
示例#3
0
            protected override void handle_result(string result)
            {
                TypeErrorKnownValues known     = stringToError(result);
                TypeError            new_value = new TypeError();

                if (known == TypeErrorKnownValues.Error__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);
            }
示例#4
0
    public void setError(string chars)
    {
        TypeErrorKnownValues known     = stringToError(chars);
        TypeError            new_value = new TypeError();

        if (known == TypeErrorKnownValues.Error__none)
        {
            new_value.in_known_list = false;
            new_value.string_value  = chars;
        }
        else
        {
            new_value.in_known_list = true;
            new_value.list_value    = known;
        }
        setError(new_value);
    }