namespace IOL.BookmarkThing.Server; public static class StartupTasks { private static IEnumerable PathsToEnsureCreated => new List { AppPaths.DataProtectionKeys.HostPath, AppPaths.AppData.HostPath, }; /// /// Execute startup tasks. /// /// public static Task Execute() { EnsureCreated(); return Task.CompletedTask; } private static void EnsureCreated() { foreach (var path in PathsToEnsureCreated) { if (path.IsNullOrWhiteSpace() || Directory.Exists(path)) { continue; } Directory.CreateDirectory(path!); Console.WriteLine("Created new directory: " + path); } } }