public void setSearchErrorType(TypeSearchErrorTypeKnownValues new_value) { TypeSearchErrorType new_full_value = new TypeSearchErrorType(); Debug.Assert(new_value != TypeSearchErrorTypeKnownValues.SearchErrorType__none); new_full_value.in_known_list = true; new_full_value.list_value = new_value; setSearchErrorType(new_full_value); }
public string getSearchErrorTypeAsString() { TypeSearchErrorType result = getSearchErrorType(); if (result.in_known_list) { return(stringFromSearchErrorType(result.list_value)); } else { return(result.string_value); } }
protected override void handle_result(string result) { TypeSearchErrorTypeKnownValues known = stringToSearchErrorType(result); TypeSearchErrorType new_value = new TypeSearchErrorType(); if (known == TypeSearchErrorTypeKnownValues.SearchErrorType__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); }
public void setSearchErrorType(string chars) { TypeSearchErrorTypeKnownValues known = stringToSearchErrorType(chars); TypeSearchErrorType new_value = new TypeSearchErrorType(); if (known == TypeSearchErrorTypeKnownValues.SearchErrorType__none) { new_value.in_known_list = false; new_value.string_value = chars; } else { new_value.in_known_list = true; new_value.list_value = known; } setSearchErrorType(new_value); }
private void fromJSONSearchErrorType(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 SearchErrorType of MusicSearchErrorJSON is not a string."); } TypeSearchErrorType the_open_enum = new TypeSearchErrorType(); switch (json_string.getData()[0]) { case 'S': if ((String.Compare(json_string.getData(), 1, "ONG_NOT_FOUND_BY_ARTIST", 0, 23, false) == 0) && (json_string.getData().Length == 24)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeSearchErrorTypeKnownValues.SearchErrorType_SONG_NOT_FOUND_BY_ARTIST; goto open_enum_is_done; } break; case 'T': if ((String.Compare(json_string.getData(), 1, "ARGET_TYPE_NOT_FOUND", 0, 20, false) == 0) && (json_string.getData().Length == 21)) { the_open_enum.in_known_list = true; the_open_enum.list_value = TypeSearchErrorTypeKnownValues.SearchErrorType_TARGET_TYPE_NOT_FOUND; 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 :; setSearchErrorType(the_open_enum); }
protected override void handle_result(TypeSearchErrorType result) { top.value.Add(result); }
protected override void handle_result(TypeSearchErrorType result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(TypeSearchErrorType result);
public void setSearchErrorType(TypeSearchErrorType new_value) { flagHasSearchErrorType = true; storeSearchErrorType = new_value; }