UpdateFrom() 개인적인 메소드

private UpdateFrom ( JsonObject torrentObject ) : Torrent
torrentObject JsonObject
리턴 Torrent
        /*
         * Interesting methods: { "core.upload_plugin", "core.glob",
         * "core.remove_torrent", "core.resume_all_torrents", "core.queue_top", "core.set_torrent_options",
         * "core.set_torrent_prioritize_first_last", "core.get_session_state", "core.set_torrent_move_completed",
         * "core.set_torrent_file_priorities", "core.get_config", "core.disable_plugin",
         * "core.test_listen_port", "core.connect_peer", "core.enable_plugin", "core.get_filter_tree",
         * "core.set_torrent_remove_at_ratio", "core.get_config_values", "core.pause_torrent",
         * "core.move_storage", "core.force_reannounce", "core.add_torrent_file", "core.get_listen_port",
         * "core.set_torrent_move_completed_path", "core.set_torrent_stop_at_ratio", "core.rename_folder",
         * "core.add_torrent_url", "core.get_enabled_plugins", "core.get_libtorrent_version", "core.get_path_size",
         * "core.set_torrent_max_connections", "core.get_config_value", "core.get_session_status", "core.create_torrent",
         * "core.add_torrent_magnet", "core.set_torrent_stop_ratio", "core.set_torrent_auto_managed",
         * "core.pause_all_torrents", "core.rename_files", "core.get_free_space",
         * "core.queue_bottom", "core.set_torrent_max_upload_speed", "core.resume_torrent",
         * "core.set_torrent_max_upload_slots", "core.set_config", "core.get_cache_status", "core.queue_down",
         * "core.get_num_connections", "core.set_torrent_max_download_speed", "core.queue_up", "core.set_torrent_trackers"
         * }
         *
         * Implemented methods: {
         *  auth.login, system.listMethods, core.get_torrents_status, core.get_available_plugins,
         *  core.rescan_plugins, core.get_torrent_status
         * }
         */

        public Torrent GetTorrentStatus(Torrent t, string[] fields)
        {
            var result        = DoServiceCall("core.get_torrent_status", t.Hash, fields);
            var torrentObject = (JsonObject)result["result"];

            if (!t.Hash.Equals((string)torrentObject["hash"]))
            {
                throw new ApplicationException(String.Format("Hashes don't match, expected {0}, got {1}!", t.Hash, torrentObject["hash"]));
            }

            return(t.UpdateFrom(torrentObject));
        }
        /*
         * Interesting methods: { "core.upload_plugin", "core.glob",
         * "core.remove_torrent", "core.resume_all_torrents", "core.queue_top", "core.set_torrent_options",
         * "core.set_torrent_prioritize_first_last", "core.get_session_state", "core.set_torrent_move_completed",
         * "core.set_torrent_file_priorities", "core.get_config", "core.disable_plugin",
         * "core.test_listen_port", "core.connect_peer", "core.enable_plugin", "core.get_filter_tree",
         * "core.set_torrent_remove_at_ratio", "core.get_config_values", "core.pause_torrent",
         * "core.move_storage", "core.force_reannounce", "core.add_torrent_file", "core.get_listen_port",
         * "core.set_torrent_move_completed_path", "core.set_torrent_stop_at_ratio", "core.rename_folder",
         * "core.add_torrent_url", "core.get_enabled_plugins", "core.get_libtorrent_version", "core.get_path_size",
         * "core.set_torrent_max_connections", "core.get_config_value", "core.get_session_status", "core.create_torrent",
         * "core.add_torrent_magnet", "core.set_torrent_stop_ratio", "core.set_torrent_auto_managed",
         * "core.pause_all_torrents", "core.rename_files", "core.get_free_space",
         * "core.queue_bottom", "core.set_torrent_max_upload_speed", "core.resume_torrent",
         * "core.set_torrent_max_upload_slots", "core.set_config", "core.get_cache_status", "core.queue_down",
         * "core.get_num_connections", "core.set_torrent_max_download_speed", "core.queue_up", "core.set_torrent_trackers"
         * }
         *
         * Implemented methods: {
         *  auth.login, system.listMethods, core.get_torrents_status, core.get_available_plugins,
         *  core.rescan_plugins, core.get_torrent_status
         * }
         */
        public Torrent GetTorrentStatus(Torrent t, string[] fields)
        {
            var result = DoServiceCall ("core.get_torrent_status", t.Hash, fields);
            var torrentObject = (JsonObject) result["result"];

            if (!t.Hash.Equals ((string) torrentObject["hash"]))
                throw new ApplicationException (String.Format ("Hashes don't match, expected {0}, got {1}!", t.Hash, torrentObject["hash"]));

            return t.UpdateFrom (torrentObject);
        }