Beispiel #1
0
        public override async Task ExecuteCommandAsync()
        {
            if (!this.IsValid)
            {
                return;
            }

            ConsolePathMapper.SetPathToRoot();

            try
            {
                new ApprovedDomainSerializer().Add
                (
                    new ApprovedDomain
                {
                    DomainName                 = this.DomainName,
                    DbProvider                 = this.ProviderName,
                    Synonyms                   = new string[0],
                    BackupDirectory            = string.Empty,
                    AdminEmail                 = string.Empty,
                    EnforceSsl                 = false,
                    BackupDirectoryIsFixedPath = false,
                    CdnDomain                  = string.Empty
                });


                var installer = new Tenant.Installer(this.DomainName);
                await installer.InstallAsync().ConfigureAwait(false);
            }
            finally
            {
                if (this.CleanupWhenDone)
                {
                    var uninstaller = new Uninstaller(this.DomainName);
                    await uninstaller.UnInstallAsync().ConfigureAwait(false);
                }
            }
        }
Beispiel #2
0
        public override async Task ExecuteCommandAsync()
        {
            if(!this.IsValid)
            {
                return;
            }

            ConsolePathMapper.SetPathToRoot();

            try
            {
                new ApprovedDomainSerializer().Add
                    (
                     new ApprovedDomain
                     {
                         DomainName = this.DomainName,
                         DbProvider = this.ProviderName,
                         Synonyms = new string[0],
                         BackupDirectory = string.Empty,
                         AdminEmail = string.Empty,
                         EnforceSsl = false,
                         BackupDirectoryIsFixedPath = false,
                         CdnDomain = string.Empty
                     });


                var installer = new Tenant.Installer(this.DomainName);
                await installer.InstallAsync().ConfigureAwait(false);
            }
            finally
            {
                if(this.CleanupWhenDone)
                {
                    var uninstaller = new Uninstaller(this.DomainName);
                    await uninstaller.UnInstallAsync().ConfigureAwait(false);
                }
            }
        }