コード例 #1
0
ファイル: Installer.cs プロジェクト: makhalaf/frapid
        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 = GetInstallables(tenant);

            foreach (var installable in installables)
            {
                try
                {
                    InstallerLog.Verbose($"Installing module {installable.ApplicationName}.");
                    await new AppInstaller(tenant, tenant, installable).InstallAsync().ConfigureAwait(false);
                }
                catch (Exception ex)
                {
                    InstallerLog.Error(ex.Message);
                    InstallerLog.Error($"Could not install module {installable.ApplicationName}.");
                }
            }
        }
コード例 #2
0
ファイル: Installer.cs プロジェクト: frapid/frapid
        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 = GetInstallables(tenant);

            foreach (var installable in installables)
            {
                try
                {
                    InstallerLog.Verbose($"Installing module {installable.ApplicationName}.");
                    await new AppInstaller(tenant, tenant, installable).InstallAsync().ConfigureAwait(false);
                }
                catch (Exception ex)
                {
                    InstallerLog.Error(ex.Message);
                    InstallerLog.Error($"Could not install module {installable.ApplicationName}.");
                }
            }
        }
コード例 #3
0
ファイル: Installer.cs プロジェクト: isbullaml/frapid
        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");
        }