/// <summary>
 /// For testing purpose allowes to inject internaly used services
 /// </summary>
 internal FilePersistence(PersistenceSecurity security, IDataFileWatcher fileWatcher)
 {
     this.InitializeSecurity(security);
     this.Dispatcher = new DataDispatcher();
     this.storedCredentials = new StoredCredentials(security);
     this.groups = new Groups(this);
     this.favorites = new Favorites(this);
     this.connectionHistory = new ConnectionHistory(this.favorites);
     this.factory = new Factory(security, this.groups, this.Dispatcher);
     this.InitializeFileWatch(fileWatcher);
 }
Beispiel #2
0
 /// <summary>
 /// For testing purpose allowes to inject internaly used services
 /// </summary>
 internal FilePersistence(PersistenceSecurity security, IDataFileWatcher fileWatcher,
                          FavoriteIcons favoriteIcons, ConnectionManager connectionManager)
 {
     this.fileLocations = Settings.Instance.FileLocations;
     this.serializer    = new FavoritesFileSerializer(connectionManager);
     this.InitializeSecurity(security);
     this.Dispatcher        = new DataDispatcher();
     this.storedCredentials = new StoredCredentials(security);
     this.groups            = new Groups(this);
     this.favorites         = new Favorites(this, favoriteIcons, connectionManager);
     this.connectionHistory = new ConnectionHistory(this.favorites);
     this.factory           = new Factory(this.groups, this.Dispatcher, connectionManager);
     this.contextBuilder    = new SerializationContextBuilder(this.groups, this.favorites, this.Dispatcher);
     this.InitializeFileWatch(fileWatcher);
 }