public void FillSnapshotWithLatestChanges(Snapshot snapshot, DateTime? sinceDate)
        {
            foreach (var connection in snapshot.Servers)
            {
                foreach (var databaseFromDB in sqlserver.GetDatabases(connection))
                {
                    var databaseInMemory = connection.Databases.SingleOrDefault(c => c.Id == databaseFromDB.Id);

                    if (databaseInMemory == null)
                    {
                        connection.Databases.Add(databaseFromDB);
                        databaseInMemory = databaseFromDB;
                    }

                }
            }
        }
        public Snapshot GetFullSnapshot()
        {
            var watch = Stopwatch.StartNew();

            var result = new Snapshot();

            var servers = sqlserver.GetServers();

            var tasks = new List<Task>();

            foreach (var server in servers)
            {
                tasks.Add(Task.Factory.StartNew(() =>
                {
                    FillServerWithDatabases(server);

                    if (server.Databases.Count > 0) ; // don't add connections with no databases
                    {
                        result.Servers.Add(server);
                    }

                }));

            }

            Task.WaitAll(tasks.ToArray());

            result.SnapshotTaken = DateTime.Now;

            watch.Stop();

            Logger.Log(string.Format("{0} servers investigated ({1} databases in total) in {2} seconds",
                servers.Count,
                result.Servers.SelectMany(c => c.Databases).Count(),
                Math.Round(watch.Elapsed.TotalSeconds, 1)));

            return result;
        }