|
@@ -402,20 +402,16 @@ namespace Flyinsono.DBCopy.Tool
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Task.Run(() =>
|
|
|
+ Dispatcher.CurrentDispatcher.Invoke(() =>
|
|
|
{
|
|
|
- try
|
|
|
+ var confirmDialog = new ConfirmDialog("The operation cannot be rolled back. Are you sure you want to delete it?");
|
|
|
+ if (confirmDialog.ShowDialog() == true)
|
|
|
{
|
|
|
|
|
|
- var searchPrefixList = new List<string>
|
|
|
- {
|
|
|
+ var searchPrefixList = new List<string>{
|
|
|
"Flyinsono_"
|
|
|
};
|
|
|
- _cosClear.RunClear(searchPrefixList, _excludeList.ToList());
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Logger.WriteLineWarn($"OnDBBakFileClearCommand err, ex:{ex}");
|
|
|
+ _cosClear.RunClear(searchPrefixList, _excludeList.ToList()).ConfigureAwait(false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -429,23 +425,18 @@ namespace Flyinsono.DBCopy.Tool
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Task.Run(() =>
|
|
|
+ Dispatcher.CurrentDispatcher.Invoke(() =>
|
|
|
{
|
|
|
- try
|
|
|
+ var confirmDialog = new ConfirmDialog("The operation cannot be rolled back. Are you sure you want to delete it?");
|
|
|
+ if (confirmDialog.ShowDialog() == true)
|
|
|
{
|
|
|
|
|
|
- var searchPrefixList = new List<string>
|
|
|
- {
|
|
|
+ var searchPrefixList = new List<string>{
|
|
|
"Mongodb",
|
|
|
"Database",
|
|
|
"2023-06"
|
|
|
};
|
|
|
-
|
|
|
- _cosClear.RunClear(searchPrefixList, _excludeList.ToList());
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Logger.WriteLineWarn($"OnDBBakFileClearCommand err, ex:{ex}");
|
|
|
+ _cosClear.RunClear(searchPrefixList, _excludeList.ToList()).ConfigureAwait(false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -459,25 +450,20 @@ namespace Flyinsono.DBCopy.Tool
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Task.Run(() =>
|
|
|
+ Dispatcher.CurrentDispatcher.Invoke(() =>
|
|
|
{
|
|
|
- try
|
|
|
+ var confirmDialog = new ConfirmDialog("The operation cannot be rolled back. Are you sure you want to delete it?");
|
|
|
+ if (confirmDialog.ShowDialog() == true)
|
|
|
{
|
|
|
|
|
|
- var searchPrefixList = new List<string>
|
|
|
- {
|
|
|
+ var searchPrefixList = new List<string>{
|
|
|
"test",
|
|
|
"Test",
|
|
|
"TEST",
|
|
|
"ceshi",
|
|
|
"测试"
|
|
|
};
|
|
|
-
|
|
|
- _cosClear.RunClear(searchPrefixList, _excludeList.ToList());
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Logger.WriteLineWarn($"OnTestFileClearCommand err, ex:{ex}");
|
|
|
+ _cosClear.RunClear(searchPrefixList, _excludeList.ToList()).ConfigureAwait(false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -495,22 +481,18 @@ namespace Flyinsono.DBCopy.Tool
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Task.Run(() =>
|
|
|
+ Dispatcher.CurrentDispatcher.Invoke(() =>
|
|
|
{
|
|
|
- try
|
|
|
+ var confirmDialog = new ConfirmDialog("The operation cannot be rolled back. Are you sure you want to delete it?");
|
|
|
+ if (confirmDialog.ShowDialog() == true)
|
|
|
{
|
|
|
|
|
|
- var searchPrefixList = new List<string>
|
|
|
- {
|
|
|
+ var searchPrefixList = new List<string>{
|
|
|
"DeploymentTool",
|
|
|
"FlyinsonoDeploymentTool",
|
|
|
"Server"
|
|
|
};
|
|
|
- _cosClear.RunClear(searchPrefixList, _excludeList.ToList());
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Logger.WriteLineWarn($"OnDeployFileClearCommand err, ex:{ex}");
|
|
|
+ _cosClear.RunClear(searchPrefixList, _excludeList.ToList()).ConfigureAwait(false);
|
|
|
}
|
|
|
});
|
|
|
}
|