protected void finish(RandomNumberGeneratorDiceRollRequestResultJSON result) { if (fieldGeneratorValues.have_value) { result.initValues(); int count = fieldGeneratorValues.value.Count; for (int num = 0; num < count; ++num) { result.appendValues(fieldGeneratorValues.value[num]); } fieldGeneratorValues.value.Clear(); fieldGeneratorValues.have_value = false; } if (fieldGeneratorNumFaces.have_value) { result.setNumFaces(fieldGeneratorNumFaces.value); fieldGeneratorNumFaces.have_value = false; } else if ((!(result.hasNumFaces())) && !allow_incomplete) { error("When parsing the object for %what%, the \"NumFaces\" field was missing."); } if (fieldGeneratorIsDnDStyle.have_value) { result.setIsDnDStyle(fieldGeneratorIsDnDStyle.value); fieldGeneratorIsDnDStyle.have_value = false; } else if ((!(result.hasIsDnDStyle())) && !allow_incomplete) { error("When parsing the object for %what%, the \"IsDnDStyle\" field was missing."); } if (fieldGeneratorTotal.have_value) { result.setTotal(fieldGeneratorTotal.value); fieldGeneratorTotal.have_value = false; } if (fieldGeneratorModifier.have_value) { result.setModifier(fieldGeneratorModifier.value); fieldGeneratorModifier.have_value = false; } base.finish(result); }
protected override void finish() { if (!(getRandomNumberGeneratorRequestResultJSONKey().Equals("DiceRollRequest"))) { throw new Exception("The key field has a value other than `DiceRollRequest'."); } RandomNumberGeneratorDiceRollRequestResultJSON result = new RandomNumberGeneratorDiceRollRequestResultJSON(); Debug.Assert(result != null); finish(result); int extra_count = unknownFieldGenerator.field_names.Count; Debug.Assert(extra_count == unknownFieldGenerator.field_values.Count); for (int extra_num = 0; extra_num < extra_count; ++extra_num) { result.extraRandomNumberGeneratorDiceRollRequestResultAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected override void handle_result(RandomNumberGeneratorDiceRollRequestResultJSON result) { top.value.Add(result); }
protected override void handle_result(RandomNumberGeneratorDiceRollRequestResultJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(RandomNumberGeneratorDiceRollRequestResultJSON new_result);