Esempio n. 1
0
 internal Favorites(FilePersistence persistence, FavoriteIcons favoriteIcons, ConnectionManager connectionManager)
 {
     this.persistence       = persistence;
     this.favoriteIcons     = favoriteIcons;
     this.connectionManager = connectionManager;
     this.dispatcher        = persistence.Dispatcher;
     this.groups            = this.persistence.GroupsStore;
     this.cache             = new Dictionary <Guid, IFavorite>();
     this.batchUpdates      = new FavoriteBatchUpdates(persistence);
 }
Esempio n. 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);
 }
Esempio n. 3
0
 /// <summary>
 /// Try to reuse current security in case of changing persistence, because user is already authenticated
 /// </summary>
 internal FilePersistence(PersistenceSecurity security, FavoriteIcons favoriteIcons, ConnectionManager connectionManager)
     : this(security, new DataFileWatcher(Settings.Instance.FileLocations.Favorites),
            favoriteIcons, connectionManager)
 {
 }
Esempio n. 4
0
 public PersistenceFactory(Settings settings, ConnectionManager connectionManager, FavoriteIcons favoriteIcons)
 {
     this.settings          = settings;
     this.favoriteIcons     = favoriteIcons;
     this.connectionManager = connectionManager;
 }