Revision a0622735

b/trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs
53 53
// by using the '*' as shown below:
54 54
// [assembly: AssemblyVersion("1.0.*")]
55 55
[assembly: AssemblyVersion("0.1.0.0")]
56
[assembly: AssemblyFileVersionAttribute("0.1.20209.1999")]
56
[assembly: AssemblyFileVersionAttribute("0.1.20213.1894")]
b/trunk/Pithos.Core/Agents/NetworkAgent.cs
610 610
                                                            StringComparison.InvariantCultureIgnoreCase)
611 611
                                     select info).ToList();
612 612

  
613
                        //TODO: Introduced state here, must remove somehow
614
                        //Must move all this elsewhere
615
                        SnapshotDifferencer differencer;
616
                        if (!_differencers.TryGetValue(accountInfo.UserName,out differencer))
617
                        {
618
                            differencer = new SnapshotDifferencer();
619
                            _differencers[accountInfo.UserName] = differencer;
620
                        }
621
                        differencer.Post(cleanRemotes);                        
622

  
613
                        var differencer = _differencer.PostSnapshot(accountInfo, cleanRemotes);
614
                        
623 615
                        ProcessDeletedFiles(accountInfo, differencer.Deleted, pollTime);
624 616

  
625 617
                        //Create a list of actions from the remote files
......
655 647
            }
656 648
        }
657 649

  
658

  
659
        Dictionary<string, SnapshotDifferencer> _differencers= new Dictionary<string, SnapshotDifferencer>();
650
        AccountsDifferencer _differencer= new AccountsDifferencer();
660 651

  
661 652
/*
662 653
        Dictionary<string, List<ObjectInfo>> _currentSnapshot = new Dictionary<string, List<ObjectInfo>>();
b/trunk/Pithos.Core/Agents/SnapshotDifferencer.cs
5 5
// -----------------------------------------------------------------------
6 6

  
7 7
using Pithos.Interfaces;
8
using Pithos.Network;
8 9

  
9 10
namespace Pithos.Core.Agents
10 11
{
......
75 76
            }
76 77
        }
77 78
    }
79

  
80
    public class AccountsDifferencer
81
    {
82
        Dictionary<string, SnapshotDifferencer> _differencers = new Dictionary<string, SnapshotDifferencer>();
83

  
84
        public Dictionary<string, SnapshotDifferencer> Differencers { get { return _differencers; } }
85

  
86
        public SnapshotDifferencer PostSnapshot(AccountInfo accountInfo, List<ObjectInfo> cleanRemotes)
87
        {
88
            SnapshotDifferencer differencer;
89
            if (!_differencers.TryGetValue(accountInfo.UserName, out differencer))
90
            {
91
                differencer = new SnapshotDifferencer();
92
                _differencers[accountInfo.UserName] = differencer;
93
            }
94
            differencer.Post(cleanRemotes);
95
            return differencer;
96
        }
97

  
98
    }
78 99
}
b/trunk/Pithos.Core/Pithos.Core.csproj
377 377
  <ItemGroup>
378 378
    <Compile Include="Agents\Agent.cs" />
379 379
    <Compile Include="Agents\AgentLocator.cs" />
380
    <Compile Include="Agents\AsyncManualResetEvent.cs" />
380 381
    <Compile Include="Agents\BlockUpdater.cs" />
381 382
    <Compile Include="Agents\CloudTransferAction.cs" />
382 383
    <Compile Include="Agents\CollectionExtensions.cs" />

Also available in: Unified diff