Пример #1
0
    private void  fromJSONVideos(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 Videos of MusicChartsCommandNativeDataJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <MusicVideoJSON> vector_Videos1 = new List <MusicVideoJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            MusicVideoJSON convert_classy = MusicVideoJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Videos1.Add(convert_classy);
        }
        initVideos();
        for (int num1 = 0; num1 < vector_Videos1.Count; ++num1)
        {
            appendVideos(vector_Videos1[num1]);
        }
        for (int num1 = 0; num1 < vector_Videos1.Count; ++num1)
        {
        }
    }
Пример #2
0
        protected override void finish()
        {
            MusicVideoJSON result = new MusicVideoJSON();

            Debug.Assert(result != null);
            finish(result);
            handle_result(result);
        }
Пример #3
0
 public void appendVideos(MusicVideoJSON to_append)
 {
     if (!flagHasVideos)
     {
         flagHasVideos = true;
         storeVideos.Clear();
     }
     Debug.Assert(flagHasVideos);
     storeVideos.Add(to_append);
 }
Пример #4
0
 protected void finish(MusicVideoJSON result)
 {
     if (fieldGeneratorVideoID.have_value)
     {
         result.setVideoID(fieldGeneratorVideoID.value);
         fieldGeneratorVideoID.have_value = false;
     }
     if (fieldGeneratorAutoPlayPreview.have_value)
     {
         result.setAutoPlayPreview(fieldGeneratorAutoPlayPreview.value);
         fieldGeneratorAutoPlayPreview.have_value = false;
     }
     if (fieldGeneratorTrack.have_value)
     {
         result.setTrack(fieldGeneratorTrack.value);
         fieldGeneratorTrack.have_value = false;
     }
 }
Пример #5
0
 protected override void handle_result(MusicVideoJSON result)
 {
     top.value.Add(result);
 }
Пример #6
0
        protected override void handle_result(MusicVideoJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Пример #7
0
 protected abstract void handle_result(MusicVideoJSON new_result);