Make controller Async

This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.

We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.

With this update, the controller is now fully async and all tests are updated.

Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.

Functionally, no changes are done.
This commit is contained in:
Kenneth Skovhede
2026-05-13 15:04:13 +02:00
parent 131df8f58b
commit 179d1ceb47
239 changed files with 6307 additions and 6035 deletions
@@ -18,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System.Threading.Tasks;
using Duplicati.Library.Crashlog;
namespace Duplicati.CommandLine.DatabaseTool.Net10
@@ -25,7 +26,7 @@ namespace Duplicati.CommandLine.DatabaseTool.Net10
// Wrapper class to keep code independent
public static class Program
{
public static int Main(string[] args)
=> CrashlogHelper.WrapWithCrashLog(() => DatabaseTool.Program.Main(args).ConfigureAwait(false).GetAwaiter().GetResult());
public static Task<int> Main(string[] args)
=> CrashlogHelper.WrapWithCrashLog(() => DatabaseTool.Program.MainAsync(args));
}
}