protected override void finish(int winning_index) { Typepicture_url result = new Typepicture_url(); result.key = winning_index; switch (winning_index) { case 0: { Debug.Assert(field0.have_value); result.choice0 = field0.value; break; } case 1: { Debug.Assert(field1.have_value); result.choice1 = field1.value; break; } default: { Debug.Assert(false); break; } } handle_result(result); }
public Holderpicture_url(Holderpicture_url other) { have_data = other.haveData(); data = other.referenced(); if (have_data) { } }
public Holderpicture_url(Typepicture_url init_data) { have_data = true; data = init_data; if (have_data) { } }
private void fromJSONpicture_url(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); Typepicture_url or_result = new Typepicture_url(); bool or_done = false; if (!or_done) { try { JSONStringValue json_string = json_value.string_value(); if (json_string == null) { throw new Exception("The value for ??? is not a string."); } or_result.choice0 = json_string.getData(); or_result.key = 0; or_done = true; } catch (Exception) { } } if (!or_done) { try { or_result.key = 1; or_done = true; } catch (Exception) { } } if (!or_done) { throw new Exception("The value for field picture_url of UberRequestVehicleJSON is not one of the allowed values."); } setpicture_url(or_result); switch (or_result.key) { case 0: break; case 1: break; default: Debug.Assert(false); break; } }
public void setpicture_url(Typepicture_url new_value) { flagHaspicture_url = true; switch (new_value.key) { case 0: break; case 1: break; default: Debug.Assert(false); break; } storepicture_url = new_value; }
protected override void handle_result(Typepicture_url result) { top.value.Add(result); }
protected override void handle_result(Typepicture_url result) { //@@@ Debug.Assert(!have_value); have_value = true; value = new Holderpicture_url(result); }
protected abstract void handle_result(Typepicture_url result);