Example #1
0
        public SitePublisher
        (
            ConnectDbContext connectDb,
            ConnectCoreOptions coreOptions,
            IdentityDbContext identityDb,
            SiteTemplateManager templateManager,
            PageMasterManager masterPageManager,
            PageManager pageManager,
            ContentManager contentManager,
            ClientManager clientManager,
            IFolderManager <FileDocument> folderManager
        )
        {
            _connectDb         = connectDb;
            _identityDb        = identityDb;
            _templateManager   = templateManager;
            _contentManager    = contentManager;
            _clientManager     = clientManager;
            _folderManager     = folderManager;
            _pageManager       = pageManager;
            _masterPageManager = masterPageManager;
            _coreOptions       = coreOptions;

            _defaultDataFolder = _coreOptions.FileSystemRoot + "\\data\\json\\seeddata";
        }
Example #2
0
        public SiteTemplateExporter
        (
            ConnectDbContext connectDb,
            ConnectCoreOptions coreOptions,
            ContentManager contentManager,
            WidgetProvider widgetProvider,
            SiteManager siteManager,
            SiteTemplateManager templateManager,
            PageMasterManager masterPageManager,
            PageManager pageManger,
            DbLogService logger
        )
        {
            _connectDb         = connectDb;
            _coreOptions       = coreOptions;
            _contentManager    = contentManager;
            _siteManager       = siteManager;
            _widgetProvider    = widgetProvider;
            _templateManager   = templateManager;
            _masterPageManager = masterPageManager;
            _pageManager       = pageManger;
            _logger            = logger;

            _exportRootFolder = Path.Combine(_coreOptions.FileSystemRoot, _coreOptions.TemplateExportPath.Replace("/", @"\"));

            _masterPageMap = new Dictionary <string, SiteTemplateMasterPage>();
            _pageMap       = new Dictionary <string, SiteTemplatePage>();

            _jsonSettings = new JsonSerializerSettings
            {
                Formatting            = Formatting.Indented,
                ContractResolver      = new CamelCasePropertyNamesContractResolver(),
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
                NullValueHandling     = NullValueHandling.Ignore,
            };
        }