/// <summary> /// Fall back to file persistence, in case of not available database /// </summary> private FilePersistence FallBackToPrimaryPersistence(PersistenceSecurity security) { Logging.Fatal("SQL Persistence layer failed to load. Fall back to File persistence"); var newSecurity = new PersistenceSecurity(security); var persistence = new FilePersistence(newSecurity, this.favoriteIcons, this.connectionManager); this.settings.PersistenceSecurity = newSecurity; return(persistence); }
/// <summary> /// Fall back to file persistence, in case of not available database /// </summary> internal static void FallBackToPrimaryPersistence(PersistenceSecurity security) { PromptForFallback(); var newSecurity = new PersistenceSecurity(security); var persistence = new FilePersistence(newSecurity); Settings.Instance.PersistenceSecurity = newSecurity; Nested.instance.persistence = persistence; persistence.Initialize(); }
/// <summary> /// Fall back to file persistence, in case of not available database /// </summary> internal FilePersistence FallBackToPrimaryPersistence(PersistenceSecurity security) { Logging.Fatal("SQL Persistence layer failed to load. Fall back to File persistence"); var newSecurity = new PersistenceSecurity(security); var persistence = new FilePersistence(newSecurity, favoriteIcons, connectionManager); settings.PersistenceSecurity = newSecurity; persistence.Initialize(); return(persistence); }
/// <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); }
/// <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); }
private void InitializeSecurity(PersistenceSecurity security) { this.Security = security; this.Security.AssignPersistence(this); }
internal Factory(PersistenceSecurity persistenceSecurity, Groups groups, DataDispatcher dispatcher) { this.groups = groups; this.dispatcher = dispatcher; this.persistenceSecurity = persistenceSecurity; }
/// <summary> /// Try to reuse current security in case of changing persistence, because user is already authenticated /// </summary> internal FilePersistence(PersistenceSecurity security) : this(security, new DataFileWatcher(Settings.Instance.FileLocations.Favorites)) { }
protected void UpdateFrom(CredentialBase source) { this.EncryptedUserName = source.EncryptedUserName; this.EncryptedDomain = source.EncryptedDomain; this.EncryptedPassword = source.EncryptedPassword; this.persistenceSecurity = source.persistenceSecurity; }
/// <summary> /// Creates new instance and initializes internal state from sourceSecurity. /// </summary> /// <param name="sourceSecurity">Not null current security instance to initialize from.</param> internal PersistenceSecurity(PersistenceSecurity sourceSecurity) { this.KeyMaterial = sourceSecurity.KeyMaterial; }
internal StoredCredentials(PersistenceSecurity persistenceSecurity) { this.persistenceSecurity = persistenceSecurity; this.cache = new List<ICredentialSet>(); InitializeFileWatch(); }
internal StoredCredentials(PersistenceSecurity persistenceSecurity) { this.persistenceSecurity = persistenceSecurity; this.cache = new List <ICredentialSet>(); this.InitializeFileWatch(); }
/// <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) { }
public ToolTipBuilder(PersistenceSecurity persistenceSecurity) { this.persistenceSecurity = persistenceSecurity; }
internal void AssignStore(PersistenceSecurity persistenceSecurity) { this.TsGateway.Security.AssignStore(persistenceSecurity); }
internal void AssignStore(PersistenceSecurity persistenceSecurity) { this.persistenceSecurity = persistenceSecurity; }