Revision fbbbe99b

b/trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs
94 94
// by using the '*' as shown below:
95 95
// [assembly: AssemblyVersion("1.0.*")]
96 96
[assembly: AssemblyVersion("0.1.0.0")]
97
[assembly: AssemblyFileVersionAttribute("0.1.20217.2055")]
97
[assembly: AssemblyFileVersionAttribute("0.1.20220.2042")]
b/trunk/Pithos.Core/Agents/FileAgent.cs
373 373

  
374 374

  
375 375
        private Dictionary<WatcherChangeTypes, FileStatus> _statusDict = new Dictionary<WatcherChangeTypes, FileStatus>
376
        {
376
                                                                             {
377 377
            {WatcherChangeTypes.Created,FileStatus.Created},
378 378
            {WatcherChangeTypes.Changed,FileStatus.Modified},
379 379
            {WatcherChangeTypes.Deleted,FileStatus.Deleted},
380 380
            {WatcherChangeTypes.Renamed,FileStatus.Renamed}
381 381
        };
382 382

  
383
        private Dictionary<string,string> _ignoreFiles=new Dictionary<string, string>();
383
        private Dictionary<string, string> _ignoreFiles=new Dictionary<string, string>();
384 384

  
385 385
        private WorkflowState UpdateFileStatus(WorkflowState state)
386 386
        {
......
483 483
            return false;
484 484
        }
485 485

  
486
        public static FileAgent GetFileAgent(AccountInfo accountInfo)
487
        {
488
            return GetFileAgent(accountInfo.AccountPath);
489
        }
490

  
491
        public static FileAgent GetFileAgent(string rootPath)
492
        {
493
            return AgentLocator<FileAgent>.Get(rootPath.ToLower());
494
        }
495

  
496

  
486 497
        public FileSystemInfo GetFileSystemInfo(string relativePath)
487 498
        {
488 499
            if (String.IsNullOrWhiteSpace(relativePath))
b/trunk/Pithos.Core/Agents/PollAgent.cs
333 333
                foreach (var objectInfo in cloudFiles)
334 334
                {
335 335
                    var relativePath = objectInfo.RelativeUrlToFilePath(accountInfo.UserName);
336
                    var item = GetFileAgent(accountInfo).GetFileSystemInfo(relativePath);
336
                    var item = FileAgent.GetFileAgent(accountInfo).GetFileSystemInfo(relativePath);
337 337
                    if (item.Exists)
338 338
                    {
339 339
                        if ((item.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
......
359 359
            if (changes == null)
360 360
                throw new ArgumentNullException();
361 361
            Contract.EndContractBlock();
362
            var fileAgent = GetFileAgent(accountInfo);
362
            var fileAgent = FileAgent.GetFileAgent(accountInfo);
363 363

  
364 364
            //In order to avoid multiple iterations over the files, we iterate only once
365 365
            //over the remote files
......
397 397
            if (creates == null)
398 398
                throw new ArgumentNullException();
399 399
            Contract.EndContractBlock();
400
            var fileAgent = GetFileAgent(accountInfo);
400
            var fileAgent = FileAgent.GetFileAgent(accountInfo);
401 401

  
402 402
            //In order to avoid multiple iterations over the files, we iterate only once
403 403
            //over the remote files
......
420 420
            }
421 421
        }
422 422

  
423
        private static FileAgent GetFileAgent(AccountInfo accountInfo)
424
        {
425
            return AgentLocator<FileAgent>.Get(accountInfo.AccountPath);
426
        }
427

  
428 423
        private void ProcessTrashedFiles(AccountInfo accountInfo, IEnumerable<ObjectInfo> trashObjects)
429 424
        {
430
            var fileAgent = GetFileAgent(accountInfo);
425
            var fileAgent = FileAgent.GetFileAgent(accountInfo);
431 426
            foreach (var trashObject in trashObjects)
432 427
            {
433 428
                var barePath = trashObject.RelativeUrlToFilePath(accountInfo.UserName);
......
456 451
                Directory.CreateDirectory(path);
457 452
            }
458 453
        }
459

  
460 454
    }
461 455
}

Also available in: Unified diff