public async Task InstallAsync() { InstalledApps = new List <Installable>(); string tenant = TenantConvention.GetTenant(this.Url); InstallerLog.Verbose($"Creating database {tenant}."); var db = new DbInstaller(tenant); await db.InstallAsync().ConfigureAwait(false); InstallerLog.Verbose("Getting installables."); var installables = Installables.GetInstallables(tenant); foreach (var installable in installables) { try { await new AppInstaller(tenant, tenant, this.WithoutSample, installable).InstallAsync().ConfigureAwait(false); } catch (Exception ex) { InstallerLog.Error(ex.Message); InstallerLog.Error($"Could not install module {installable.ApplicationName}."); } } }
public async Task InstallAsync() { InstalledApps = new List <Installable>(); string tenant = TenantConvention.GetTenant(this.Url); this.Notify($"Creating database {tenant}."); var db = new DbInstaller(tenant); db.Notification += delegate(object sender, string message) { this.Notify(sender, message); }; await db.InstallAsync().ConfigureAwait(false); this.Notify("Getting installables."); var installables = Installables.GetInstallables(tenant); foreach (var installable in installables) { try { var installer = new AppInstaller(tenant, tenant, this.WithoutSample, installable); installer.Notification += delegate(object sender, string message) { this.Notify(sender, message); }; await installer.InstallAsync().ConfigureAwait(false); } catch (Exception ex) { this.Notify("Error: " + ex.Message); this.Notify($"Error: Could not install module {installable.ApplicationName}."); } } this.Notify("OK"); }