コード例 #1
0
    private void  fromJSONDisambiguatePhoneNumbers(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONArrayValue json_array1 = json_value.array_value();

        if (json_array1 == null)
        {
            throw new Exception("The value for field DisambiguatePhoneNumbers of SMSAddressFieldJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <DisambiguatePhoneNumberJSON> vector_DisambiguatePhoneNumbers1 = new List <DisambiguatePhoneNumberJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            DisambiguatePhoneNumberJSON convert_classy = DisambiguatePhoneNumberJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_DisambiguatePhoneNumbers1.Add(convert_classy);
        }
        initDisambiguatePhoneNumbers();
        for (int num2 = 0; num2 < vector_DisambiguatePhoneNumbers1.Count; ++num2)
        {
            appendDisambiguatePhoneNumbers(vector_DisambiguatePhoneNumbers1[num2]);
        }
        for (int num1 = 0; num1 < vector_DisambiguatePhoneNumbers1.Count; ++num1)
        {
        }
    }
コード例 #2
0
        protected override void finish()
        {
            DisambiguatePhoneNumberJSON result = new DisambiguatePhoneNumberJSON();

            Debug.Assert(result != null);
            finish(result);
            handle_result(result);
        }
コード例 #3
0
 public void appendDisambiguatePhoneNumbers(DisambiguatePhoneNumberJSON to_append)
 {
     if (!flagHasDisambiguatePhoneNumbers)
     {
         flagHasDisambiguatePhoneNumbers = true;
         storeDisambiguatePhoneNumbers.Clear();
     }
     Debug.Assert(flagHasDisambiguatePhoneNumbers);
     storeDisambiguatePhoneNumbers.Add(to_append);
 }
コード例 #4
0
 protected void finish(DisambiguatePhoneNumberJSON result)
 {
     if (fieldGeneratorContactQueryName.have_value)
     {
         result.setContactQueryName(fieldGeneratorContactQueryName.value);
         fieldGeneratorContactQueryName.have_value = false;
     }
     if (fieldGeneratorDisambiguationCandidates.have_value)
     {
         result.initDisambiguationCandidates();
         int count = fieldGeneratorDisambiguationCandidates.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendDisambiguationCandidates(fieldGeneratorDisambiguationCandidates.value[num]);
         }
         fieldGeneratorDisambiguationCandidates.value.Clear();
         fieldGeneratorDisambiguationCandidates.have_value = false;
     }
     else if ((!(result.hasDisambiguationCandidates())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DisambiguationCandidates\" field was missing.");
     }
 }
コード例 #5
0
 protected override void handle_result(DisambiguatePhoneNumberJSON result)
 {
     top.value.Add(result);
 }
コード例 #6
0
        protected override void handle_result(DisambiguatePhoneNumberJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
コード例 #7
0
 protected abstract void handle_result(DisambiguatePhoneNumberJSON new_result);