public BackupTask(INotifyService notifyService, IStorageProvider storageProvider, IConfiguration configuration, BackupOptions backupOptions, MySqlOptions mySqlOptions) { this.notifyService = notifyService; this.storageProvider = storageProvider; this.configuration = configuration; this.backupOptions = backupOptions; this.mySqlOptions = mySqlOptions; }
private static string GetHostName(MySqlOptions mysqlOptions) { try { var connectionStringBuilder = new MySqlConnectionStringBuilder(mysqlOptions.ConnectionString); return(connectionStringBuilder.Server); } catch { return("CANNOTRESOLVEHOSTNAME"); } }