Example #1
0
        public async Task CreateNewSite(ISiteSettings newSite)
        {
            if (newSite == null)
            {
                throw new ArgumentNullException("you must pass in an instance of ISiteSettings");
            }

            newSite.Theme = setupOptions.DefaultLayout;

            await commands.Create(newSite, CancellationToken.None);

            if (multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                cacheHelper.ClearCache("folderList");
            }

            await eventHandlers.HandleSiteCreated(newSite).ConfigureAwait(false);
        }
Example #2
0
        public async Task CreateNewSite(ISiteSettings newSite)
        {
            if (newSite == null)
            {
                throw new ArgumentNullException("you must pass in an instance of ISiteSettings");
            }

            if (string.IsNullOrEmpty(newSite.Theme))
            {
                newSite.Theme = _setupOptions.DefaultTheme;
            }

            await _commands.Create(newSite, CancellationToken.None);

            if (_multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                await _cacheHelper.ClearSiteFolderListCache();
            }


            await _eventHandlers.HandleSiteCreated(newSite).ConfigureAwait(false);
        }