Modifications to enable Sync Pausing for all operations
[pithos-ms-client] / trunk / Pithos.Core / PithosMonitor.cs
index 7ca5a30..b5c250e 100644 (file)
@@ -80,6 +80,8 @@ namespace Pithos.Core
         }
 
 
+
+
         private IPithosWorkflow _workflow;
 
         [Import]
@@ -116,7 +118,20 @@ namespace Pithos.Core
         [Import]
         public NetworkAgent NetworkAgent { get; set; }
         [Import]
-        public PollAgent PollAgent { get; set; }       
+        public PollAgent PollAgent { get; set; }
+
+        private Selectives _selectives;
+
+        [Import]
+        public Selectives Selectives
+        {
+            get { return _selectives; }
+            set
+            {
+                _selectives = value;
+                FileAgent.Selectives = value;
+            }
+        }
 
         public string UserName { get; set; }
         private string _apiKey;
@@ -431,10 +446,9 @@ namespace Pithos.Core
             //Convert the uris to paths
             var selectivePaths = UrisToFilePaths(uris);
             
-            FileAgent.SelectivePaths=selectivePaths;
-            WorkflowAgent.SelectivePaths = selectivePaths;
-            PollAgent.SetSyncUris(_accountInfo.AccountKey,uris);
-            
+            var selectiveUri = uris.ToList();
+            this.Selectives.SetSelectedUris(_accountInfo,selectiveUri);
+
             var removedPaths = UrisToFilePaths(removed);
             UnversionSelectivePaths(removedPaths);