コード例 #1
0
 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;
 }
コード例 #2
0
 private static string GetHostName(MySqlOptions mysqlOptions)
 {
     try
     {
         var connectionStringBuilder = new MySqlConnectionStringBuilder(mysqlOptions.ConnectionString);
         return(connectionStringBuilder.Server);
     }
     catch
     {
         return("CANNOTRESOLVEHOSTNAME");
     }
 }