incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [3/7] wp7 commit: Updated FileTransfer
Date Wed, 18 Jul 2012 21:10:15 GMT
Updated FileTransfer


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/db4333f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/db4333f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/db4333f0

Branch: refs/heads/master
Commit: db4333f0de9ab49f8da7f882a30f5232532fd336
Parents: c8336ea
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Jul 17 16:35:58 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Jul 17 16:35:58 2012 -0700

----------------------------------------------------------------------
 .../standalone/cordovalib/Commands/FileTransfer.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/db4333f0/templates/standalone/cordovalib/Commands/FileTransfer.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/FileTransfer.cs b/templates/standalone/cordovalib/Commands/FileTransfer.cs
index dbdc8ab..bf953ac 100644
--- a/templates/standalone/cordovalib/Commands/FileTransfer.cs
+++ b/templates/standalone/cordovalib/Commands/FileTransfer.cs
@@ -247,11 +247,11 @@ namespace WP7CordovaClassLib.Cordova.Commands
             Debug.WriteLine("options = " + options);
             options = options.Replace("{}", "null");
 
-            try
+            try 
             {
-                try
+                try 
                 {
-                    uploadOptions = JSON.JsonHelper.Deserialize<UploadOptions>(options);
+                    uploadOptions = JSON.JsonHelper.Deserialize<UploadOptions[]>(options)[0];
                 }
                 catch (Exception)
                 {
@@ -287,7 +287,11 @@ namespace WP7CordovaClassLib.Cordova.Commands
 
             try
             {
-                downloadOptions = JSON.JsonHelper.Deserialize<DownloadOptions>(options);
+                string[] optionStrings = JSON.JsonHelper.Deserialize<string[]>(options);
+
+                downloadOptions = new DownloadOptions();// JSON.JsonHelper.Deserialize<DownloadOptions>(options);
+                downloadOptions.Url = optionStrings[0];
+                downloadOptions.FilePath = optionStrings[1];
             }
             catch (Exception)
             {


Mime
View raw message